1 # Maintainer: Pietro Zambelli <peter.zamb at gmail dot com>
2 # Based off of gostrc's PKGBUILD for grass-svn in AUR.
6 pkgdesc="GRASS 7.0 is the new development branch of GRASS. \
7 Geographic Information System (GIS) used for geospatial data management and analysis, \
8 image processing, graphics/maps production, spatial modeling, and visualization"
10 url="http://grass.itc.it/index.php"
13 depends=('gdal' 'tk' 'sqlite3' 'xorg-server' 'python' 'mesa' 'swig' 'proj' 'libjpeg>=7' 'libpng' 'libtiff')
14 makedepends=('mysql' 'postgresql>=8.4.1' 'r' 'fftw' 'freetype2')
15 optdepends=('fftw: required for i.fft and i.ifft modules'
16 'postgresql: PostgreSQL database interface'
17 'r: R language interface'
18 'lapack: required for GMATH library'
19 'blas: required for GMATH library')
20 options=('!libtool' '!makeflags')
22 source=(grass.desktop grass.sh grass.png)
23 md5sums=('14a8cbd7a3d9e170fe49881bd74601c0'
24 'f764728ee7c5bc72e3611b343b9a5b76'
25 'ae778ed261a40b078a8465994a0eb25e')
27 _svntrunk=https://svn.osgeo.org/grass/grass/trunk
31 if [ -d $srcdir/$_svnmod/.svn ]; then
32 (cd $srcdir/$_svnmod && svn up)
34 msg "Starting SVN checkout"
35 svn co $_svntrunk $srcdir/$_svnmod
38 msg "SVN checkout done or server timeout"
39 msg "Starting configure..."
42 ./configure --prefix=/opt \
43 --with-gdal="/usr/bin/gdal-config" \
46 --with-wxwidgets="/usr/bin/wx-config"\
50 --with-proj-libs="/usr/lib" \
51 --with-proj-includes="/usr/include" \
52 --with-proj-share="/usr/share/proj" \
54 --with-fftw-includes="/usr/include" \
55 --with-fftw-libs="/usr/lib" \
57 --with-freetype-includes="/usr/include/freetype2/" \
58 --with-pthread || return 1
60 msg "Starting make..."
63 msg "Starting install..."
64 make INST_DIR=$pkgdir/opt/grass-$pkgver BINDIR=$pkgdir/usr/bin install || return 1
66 # install grass70 file
67 UGLYSTRING="$srcdir/grass70/bin.$CARCH-unknown-linux-gnu"
68 install -D -m755 "$UGLYSTRING/grass70" "$pkgdir/usr/bin/grass70" || return 1
71 sed -i 's/gisbase\s*=\s*\"\/.*\"\s*/gisbase = "\/opt\/grass70"/g' "$pkgdir/usr/bin/grass70" || return 1
74 rm -r "$pkgdir/opt/grass-$pkgver/docs/html"
76 # install profile.d file
77 install -D -m755 "$srcdir/grass.sh" "$pkgdir/etc/profile.d/grass70.sh" || return 1
79 # install some freedesktop.org compatibility
80 install -D -m644 "$srcdir/grass.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" || return 1
81 install -D -m644 "$srcdir/grass.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" || return 1
83 # create a symlink for version work around
84 ln -sf /opt/grass-$pkgver "$pkgdir/opt/grass70"