# Maintainer: Lantald < lantald at gmx.com # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org # Contributor: Gerardo Exequiel Pozzi # Contributor: Eric Forgeot < http://esclinux.tk > # Maintainer: mutantmonkey pkgname=qgis-git pkgver=20121016 pkgrel=1 pkgdesc='Quantum GIS is a Geographic Information System (GIS) that supports vector, raster & database formats' url='http://qgis.org/' license=('GPL') arch=('i686' 'x86_64') # update to http://www.qgis.org/wiki/Building_QGIS_from_Source#Overview depends=('libmysqlclient' 'postgresql-libs' 'sqlite3' 'jasper' 'curl' 'qt' 'python2' 'python2-qt' 'giflib' 'cfitsio' 'qwt5' 'gdal' 'flex' 'bison' 'libspatialite' 'spatialindex' 'git' 'pyqt' ) makedepends=('cmake' 'grass7-svn' 'gsl' 'postgis' 'netcdf' 'fcgi' 'python2-sip' 'txt2tags') optdepends=('postgis: postgis support and SPIT plugin' 'fcgi: qgis mapserver' 'python2-sip: python-support' 'grass: grass plugin' 'gsl: georeferencer ') provides=(${pkgname%-git}) conflicts=(${pkgname%-git}) options=('!makeflags') _gitroot=git://github.com/qgis/Quantum-GIS.git _gitname=${pkgname%-git} build() { msg "Connecting to GIT server...." if [ -d $_gitname ] ; then # pull specific branch only (cd $_gitname && git pull origin master) msg "The local files are updated." else # clone only the latest revision, saves MANY MB of download git clone --depth=1 $_gitroot $_gitname fi export LD_LIBRARY_PATH="${srcdir}/$_gitname-build/output/lib" # cmake supports out of tree builds # there is no need to copy/clone - just make a new dir and specify # src dir rm -rf $_gitname-build && mkdir $_gitname-build && cd $_gitname-build cmake ../$_gitname \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ -DQGIS_MANUAL_SUBDIR=share/man \ -DQWT_INCLUDE_DIR=/usr/include/qwt5 \ -DQWT_LIBRARY=/usr/lib/libqwt5.so \ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \ -DPYTHON_EXECUTABLE=/usr/bin/python2 \ -DPYTHON_SITE_PACKAGES_DIR=/usr/lib/python2.7/site-packages \ -DPYTHON_INCLUDE_PATH=/usr/include/python2.7/ \ make } package() { cd $_gitname-build make DESTDIR="$pkgdir" install # create a more user-friendly application name link ln -s /usr/bin/qgis "$pkgdir"/usr/bin/quantum-gis # install some freedesktop.org compatibility install -D -m644 "$srcdir"/$_gitname/debian/qgis.desktop \ "$pkgdir"/usr/share/applications/qgis.desktop # fix python crunchbang in grass scripts #sed '1s_/usr/bin/env python_/usr/bin/env python2_' \ # -i "$pkgdir"/usr/share/qgis/grass/scripts/*.py