summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ea1fa0bcec23afb727f3763c68c13d082c000a0 (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
# Contributor: St├ęphane Gaudreault <stephane@archlinux.org>
# Maintainer : Graziano Giuliani <graziano.giuliani@gmail.com>
pkgname=python2-pygrib
_gitname=pygrib
pkgver=2.0.1
pkgrel=3
pkgdesc="Python module for reading and writing GRIB (editions 1 and 2) files."
arch=('i686' 'x86_64')
url="https://github.com/jswhit/pygrib"
license=('MIT')
depends=('python2-pyproj' 'jasper' 'python2-numpy' 'eccodes')
source=(git://github.com/jswhit/$_gitname setup.cfg)
md5sums=('SKIP'
         'd5a6f196213d2a53c280c7be1cb1bb03')

build() {
  cd "${srcdir}/$_gitname"
  export JASPER_DIR=/usr
  export PNG_DIR=/usr
  export ZLIB_DIR=/usr
  export OPENJPEG_DIR=/usr
  export GRIBAPI_DIR=/usr
  cp ${srcdir}/setup.cfg .
  sed -i 's/image.inmem_.*=.*1;//' g2clib_src/enc_jpeg2000.c
  python2 setup.py build 
}

package() {
 cd "${srcdir}/$_gitname"
 python2 setup.py install --prefix=/usr \
   --root="${pkgdir}" --skip-build --optimize=1
 install -dm755 "${pkgdir}"/usr/share/licenses/${pkgname}
 install -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
 rm -fr ${pkgdir}/usr/bin
}

# vim:set ts=2 sw=2 et: