summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dc4518a91e5a30b34f54ace0b65cd0e17c850635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ---------------------------------------------------------------
# Maintainer: Romain Bazile <gromain.baz@gmail.com>
# ---------------------------------------------------------------

pkgname=xygrib-git
pkgver=1.2.6.1.r120.g88c425c
pkgrel=1
pkgdesc="Grib reader and weather visualization software. Zygrib fork."
arch=('x86_64' 'aarch64')
license=("GPL3")
conflicts=('xygrib')
provides=('xygrib')
depends=('libnova' 'qwt' 'proj' 'qt5-base' 'openjpeg2' 'qt5-tools')
makedepends=('cmake' 'zlib' 'bzip2' 'libpng')
url="https://opengribs.org/"
source=("$pkgname::git+https://github.com/opengribs/XyGrib.git" "CMakelists.txt.patch" "xygrib.install")
sha1sums=('SKIP'
          '1cbac226906a24f9671558b043c072192f3df03f'
          '97eec7e40bd2d4f44986ffbf5096ac4ba37ebbfe')

pkgver() {
  cd $pkgname
  git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd $pkgname
  patch --strip=1 -i $srcdir/CMakelists.txt.patch
}

build() {
  cd $pkgname
  mkdir -p build
  cd build
  cmake ../
  make -j $(nproc)
}

package() {
  mkdir -p $pkgdir/usr/share/pixmaps
  mkdir -p $pkgdir/usr/share/applications
  mkdir -p $pkgdir/usr/bin
  cd $pkgname
  cp linux_online_installer/config/xyGrib_32.png $pkgdir/usr/share/pixmaps/xygrib.png
  cp debian/xygrib.desktop $pkgdir/usr/share/applications/
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr/share/openGribs/ ../
  DESTDIR="$pkgdir" make install
  mv $pkgdir/usr/share/openGribs/XyGrib/XyGrib $pkgdir/usr/bin/
}