# Maintainer: Thomas Dziedzic < gostrc at gmail > # Based off of dibblethewrecker's PKGBUILD for grass in community. pkgname=grass-svn pkgver=44925 pkgrel=1 pkgdesc='Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization.' arch=('i686' 'x86_64') url='http://grass.itc.it/index.php' license=('GPL') conflicts=('grass') provides=('grass') depends=('gdal' 'tk' 'sqlite3' 'xorg-server' 'python2' 'mesa' 'swig' 'proj' 'libjpeg>=7' 'libpng' 'libtiff') makedepends=('mysql' 'postgresql>=8.4.1' 'r' 'fftw' 'freetype2') optdepends=('fftw: required for i.fft and i.ifft modules' 'postgresql: PostgreSQL database interface' 'r: R language interface' 'lapack: required for GMATH library' 'blas: required for GMATH library') options=('!libtool' '!makeflags' '!strip') install=grass.install source=('grass.desktop' 'grass.sh' 'grass.png') md5sums=('c0d669c77f60f8544a34a55c5e9e087c' 'db93730dd330f1539bd31b4373e1c00e' 'ae778ed261a40b078a8465994a0eb25e') _svntrunk=https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 _svnmod=grass64_release build() { if [ -d "$srcdir/$_svnmod/.svn" ]; then (cd "$srcdir/$_svnmod" && svn up) else svn co $_svntrunk "$srcdir/$_svnmod" fi msg "SVN checkout done or server timeout" msg "Starting make..." cd $_svnmod # python2 fix sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile for file in $(find . -name '*.py' -print) gui/wxpython/scripts/d.rast3d.py; do sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file done ./configure --prefix=/opt --with-mysql-includes=/usr/include/mysql \ --with-mysql --with-fftw --with-gdal=/usr/bin/gdal-config --with-sqlite --with-python=/usr/bin/python2-config --with-blas --with-lapack --with-postgres \ --with-proj-libs=/usr/lib --with-proj-includes=/usr/include \ --with-proj-share=/usr/share/proj \ --with-fftw-includes=/usr/include --with-fftw-libs=/usr/lib || return 1 #--with-freetype-includes=/usr/include make || return 1 make INST_DIR="$pkgdir/opt/grass-$pkgver" BINDIR="$pkgdir/usr/bin" install || return 1 # fix $GISBASE path sed -i "s|GISBASE=$pkgdir/opt/grass-$pkgver|GISBASE=/opt/grass-$pkgver|g" "$pkgdir/usr/bin/grass64" || return 1 # strip html docs rm -r "$pkgdir/opt/grass-$pkgver/docs/html" # install profile.d file install -D -m755 "$srcdir/grass.sh" "$pkgdir/etc/profile.d/grass.sh" || return 1 # install some freedesktop.org compatibility install -D -m644 "$srcdir/grass.desktop" "$pkgdir/usr/share/applications/grass.desktop" || return 1 install -D -m644 "$srcdir/grass.png" "$pkgdir/usr/share/pixmaps/grass.png" || return 1 # create a symlink for version work around ln -sf /opt/grass-$pkgver "$pkgdir/opt/grass" install -d -m755 "$pkgdir/etc/ld.so.conf.d/" echo '/opt/grass/lib' > "$pkgdir/etc/ld.so.conf.d/grass.conf" }