# # Apps Packages for Chakra, part of chakra-project.org # # maintainer (x86_64): Giuseppe CalĂ  # include global config source ../_buildscripts/${current_repo}-${_arch}-cfg.conf pkgname=grass pkgver=6.4.1 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') depends=('gdal' 'tk' 'sqlite3' 'python' 'mesa' 'swig' 'proj' 'libjpeg>=8' 'libpng>=1.4.0' 'libtiff') makedepends=('mysql' 'postgresql>=8.4.1' 'r' 'fftw' 'freetype2' 'xorg-server') 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' 'xorg-server: required for the graphical interface') categories=('education') options=('!libtool' '!makeflags') install=grass.install source=("http://grass.itc.it/grass64/source/${pkgname}-${pkgver}.tar.gz" "${pkgname}.desktop" "${pkgname}.sh" "${pkgname}.png") md5sums=('d8ca83d416b5b0cf2aa9d36c81a77b23' '0323f2533f47cf75f1a0340bef546a11' 'db93730dd330f1539bd31b4373e1c00e' 'ae778ed261a40b078a8465994a0eb25e') build() { cd ${pkgname}-${pkgver} # python2 fix #sed -i 's_python $< $(GISBASE) > $@_python2 $< $(GISBASE) > $@_' gui/wxpython/Makefile #for file in $(find . -name '*.py' -print) gui/wxpython/scripts/d.rast3d; do # sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file # sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file #done # see ${srcdir}/grass-6.4.0/REQUIREMENTS.html for options ./configure \ --prefix=/opt \ --with-mysql-includes=/usr/include/mysql \ --with-mysql \ --with-sqlite \ --with-postgres \ --with-fftw \ --with-gdal=/usr/bin/gdal-config \ --with-python \ --with-blas \ --with-lapack \ --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 #--with-freetype-includes=/usr/include make } package() { cd ${pkgname}-${pkgver} make \ INST_DIR=${pkgdir}/opt/grass-${pkgver} \ BINDIR=${pkgdir}/usr/bin \ install # fix $GISBASE path sed -i "s|GISBASE=${pkgdir}/opt/grass-${pkgver}|GISBASE=/opt/grass-${pkgver}|g" ${pkgdir}/usr/bin/grass64 # strip html docs rm -r ${pkgdir}/opt/grass-${pkgver}/docs/html # install profile.d file install -D ${srcdir}/grass.sh ${pkgdir}/etc/profile.d/grass.sh # install some freedesktop.org compatibility install -D -m644 ${srcdir}/${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop install -D -m644 ${srcdir}/${pkgname}.png ${pkgdir}/usr/share/pixmaps/${pkgname}.png # create a symlink for version work around ln -sf /opt/grass-${pkgver} ${pkgdir}/opt/grass install -d ${pkgdir}/etc/ld.so.conf.d/ echo '/opt/grass/lib' > ${pkgdir}/etc/ld.so.conf.d/grass.conf }