1 # Maintainer: Thomas Dziedzic < gostrc at gmail >
2 # Based off of dibblethewrecker's PKGBUILD for grass in community.
7 pkgdesc='Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization.'
9 url='http://grass.itc.it/index.php'
13 depends=('gdal' 'tk' 'sqlite3' 'xorg-server' 'python' 'mesa' 'swig' 'proj' 'libjpeg' 'libpng' 'libtiff')
14 makedepends=('mysql' 'postgresql' 'r' 'fftw' 'freetype2' 'subversion')
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 'xorg-server: required for the graphical interface')
21 options=('!libtool' '!makeflags')
23 source=('grass.desktop'
26 md5sums=('c0d669c77f60f8544a34a55c5e9e087c'
27 'db93730dd330f1539bd31b4373e1c00e'
28 'ae778ed261a40b078a8465994a0eb25e')
30 _svntrunk='https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4'
31 _svnmod='grass64_release'
34 if [ -d ${_svnmod} ]; then
38 svn co ${_svntrunk} ${_svnmod}
42 msg "SVN checkout done or server timeout"
43 msg "Starting make..."
47 sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile
48 for file in $(find . -name '*.py' -print); do
49 #sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
50 #sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
51 sed -i '1 i#!/usr/bin/python2' $file
54 find -type f -exec sed -i 's/$(PYTHON)/&2/g' {} \;
58 PYTHON=python2 ./configure \
60 --with-mysql-includes=/usr/include/mysql \
65 --with-gdal=/usr/bin/gdal-config \
66 --with-python=/usr/bin/python2-config \
69 --with-proj-libs=/usr/lib \
70 --with-proj-includes=/usr/include \
71 --with-proj-share=/usr/share/proj \
72 --with-fftw-includes=/usr/include \
73 --with-fftw-libs=/usr/lib
82 INST_DIR=${pkgdir}/opt/grass-${pkgver} \
83 BINDIR=${pkgdir}/usr/bin \
87 sed -i "s|GISBASE=${pkgdir}/opt/grass-${pkgver}|GISBASE=/opt/grass-${pkgver}|g" \
88 ${pkgdir}/usr/bin/grass64
91 #rm -r ${pkgdir}/opt/grass-${pkgver}/docs/html
93 # install profile.d file
94 install -D ${srcdir}/grass.sh \
95 ${pkgdir}/etc/profile.d/grass.sh
97 # install some freedesktop.org compatibility
98 install -D -m644 ${srcdir}/grass.desktop \
99 ${pkgdir}/usr/share/applications/grass.desktop
101 install -D -m644 ${srcdir}/grass.png \
102 ${pkgdir}/usr/share/pixmaps/grass.png
104 # create a symlink for version work around
105 ln -sf /opt/grass-${pkgver} ${pkgdir}/opt/grass
107 install -d ${pkgdir}/etc/ld.so.conf.d/
108 echo '/opt/grass/lib' > ${pkgdir}/etc/ld.so.conf.d/grass.conf