1 # Contributor: Anton Bazhenov <anton.bazhenov at gmail>
2 # Contributor: Graziano Giuliani <graziano.giuliani@poste.it>
7 pkgdesc="A program interface for encoding and decoding GRIB messages"
9 url="http://www.ecmwf.int/products/data/software/grib_api.html"
10 license=('LGPL3' 'GPL3')
11 depends=('openjpeg' 'libpng' 'python2')
12 makedepends=('gcc-fortran' 'python2' 'python-numpy')
13 optdepends=('grib_def: definition files')
14 source=(${url/g*/}/download/software_files/$pkgname-$pkgver.tar.gz)
15 md5sums=('fe6c684e4a41477f3a6e97ab8892f35d')
18 cd "$srcdir"/$pkgname-$pkgver
19 sed -i configure -e 's|share/samples|share/grib_api/samples|'
20 ./configure F77="gfortran" FC="gfortran" CPPFLAGS="$CPPFLAGS -fPIC" \
21 --prefix=/usr --enable-python --with-png-support \
22 --with-netcdf=/usr --datadir=/usr/share/$pkgname \
23 --datarootdir=/usr/share/$pkgname/definitions || return 1
24 sed -i ifs_samples/grib1/Makefile \
25 -e 's|/usr/ifs_samples/grib1|/usr/share/grib_api/ifs_samples/grib1|'
26 sed -i ifs_samples/grib1_mlgrib2/Makefile \
27 -e 's|/usr/ifs_samples/grib1_mlgrib2|/usr/share/grib_api/ifs_samples/grib1_mlgrib2|'
28 sed -i ifs_samples/grib1_mlgrib2_ieee64/Makefile \
29 -e 's|/usr/ifs_samples/grib1_mlgrib2_ieee64|/usr/share/grib_api/ifs_samples/grib1_mlgrib2_ieee64|'
30 sed -i tools/grib1to2.txt -e 's|/bin/ksh|/bin/bash|'
32 make DESTDIR="$pkgdir" install || return 1
33 rm -rf "$pkgdir"/usr/share/$pkgname/definitions