updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / grass-trunk / PKGBUILD
blob05a0f0822c859a73e98cc80c2fbd5abd8a47caf8
1 # Maintainer: Pietro Zambelli <peter.zamb at gmail dot com>
2 # Based off of gostrc's PKGBUILD for grass-svn in AUR.
3 pkgname=grass-trunk
4 pkgver=42358
5 pkgrel=1
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"
9 arch=('i686' 'x86_64')
10 url="http://grass.itc.it/index.php"
11 license=('GPL')
12 provides=('grass')
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')
21 install=grass.install
22 source=(grass.desktop grass.sh grass.png)
23 md5sums=('14a8cbd7a3d9e170fe49881bd74601c0'
24          'f764728ee7c5bc72e3611b343b9a5b76'
25          'ae778ed261a40b078a8465994a0eb25e')
27 _svntrunk=https://svn.osgeo.org/grass/grass/trunk
28 _svnmod=grass70
30 build() {
31   if [ -d $srcdir/$_svnmod/.svn ]; then
32     (cd $srcdir/$_svnmod && svn up)
33   else
34     msg "Starting SVN checkout"
35     svn co $_svntrunk $srcdir/$_svnmod
36   fi
38   msg "SVN checkout done or server timeout"
39   msg "Starting configure..."
41   cd "$srcdir/$_svnmod"
42     ./configure --prefix=/opt \
43       --with-gdal="/usr/bin/gdal-config" \
44       --with-sqlite \
45       --with-python \
46       --with-wxwidgets="/usr/bin/wx-config"\
47       --with-blas \
48       --with-lapack \
49       --with-postgres \
50       --with-proj-libs="/usr/lib" \
51       --with-proj-includes="/usr/include" \
52       --with-proj-share="/usr/share/proj" \
53       --with-fftw \
54       --with-fftw-includes="/usr/include" \
55       --with-fftw-libs="/usr/lib" \
56       --with-freetype=yes \
57       --with-freetype-includes="/usr/include/freetype2/" \
58       --with-pthread || return 1
60   msg "Starting make..."
61   make || return 1
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
70   # fix $GISBASE path
71   sed -i 's/gisbase\s*=\s*\"\/.*\"\s*/gisbase = "\/opt\/grass70"/g' "$pkgdir/usr/bin/grass70" || return 1
73   # strip html docs
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"
87 # vim:syntax=sh