Want more features on Pastebin? Sign Up, it's FREE!
Guest

qgis-git PKGBUILD

By: a guest on Oct 17th, 2012  |  syntax: Bash  |  size: 2.91 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Lantald < lantald at gmx.com
  2. # Contributor: Thomas Dziedzic < gostrc at gmail >
  3. # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
  4. # Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
  5. # Contributor: Eric Forgeot < http://esclinux.tk >
  6. # Maintainer: mutantmonkey <aur@mutantmonkey.in>
  7.  
  8. pkgname=qgis-git
  9. pkgver=20121016
  10. pkgrel=1
  11. pkgdesc='Quantum GIS is a Geographic Information System (GIS) that supports vector, raster & database formats'
  12. url='http://qgis.org/'
  13. license=('GPL')
  14. arch=('i686' 'x86_64')
  15. # update to http://www.qgis.org/wiki/Building_QGIS_from_Source#Overview
  16. depends=('libmysqlclient' 'postgresql-libs' 'sqlite3' 'jasper' 'curl' 'qt' 'python2'
  17.           'python2-qt' 'giflib' 'cfitsio' 'qwt5' 'gdal' 'flex' 'bison'
  18.           'libspatialite' 'spatialindex' 'git' 'pyqt' )
  19. makedepends=('cmake' 'grass7-svn' 'gsl' 'postgis' 'netcdf' 'fcgi' 'python2-sip' 'txt2tags')
  20. optdepends=('postgis: postgis support and SPIT plugin'
  21.             'fcgi: qgis mapserver'
  22.             'python2-sip: python-support'
  23.             'grass: grass plugin'
  24.             'gsl: georeferencer  ')
  25. provides=(${pkgname%-git})
  26. conflicts=(${pkgname%-git})
  27. options=('!makeflags')
  28.  
  29. _gitroot=git://github.com/qgis/Quantum-GIS.git
  30. _gitname=${pkgname%-git}
  31.  
  32. build() {
  33.     msg "Connecting to GIT server...."
  34.  
  35.     if [ -d $_gitname ] ; then
  36.         # pull specific branch only
  37.         (cd $_gitname && git pull origin master)
  38.         msg "The local files are updated."
  39.     else
  40.         # clone only the latest revision, saves MANY MB of download
  41.         git clone --depth=1 $_gitroot $_gitname
  42.     fi
  43.  
  44.     export LD_LIBRARY_PATH="${srcdir}/$_gitname-build/output/lib"
  45.  
  46.     # cmake supports out of tree builds
  47.     # there is no need to copy/clone - just make a new dir and specify
  48.     # src dir
  49.     rm -rf $_gitname-build && mkdir $_gitname-build && cd $_gitname-build
  50.  
  51.     cmake ../$_gitname \
  52.         -DCMAKE_BUILD_TYPE=Release \
  53.         -DCMAKE_SKIP_RPATH=ON \
  54.         -DCMAKE_INSTALL_PREFIX=/usr \
  55.         -DQGIS_MANUAL_SUBDIR=share/man \
  56.         -DQWT_INCLUDE_DIR=/usr/include/qwt5 \
  57.         -DQWT_LIBRARY=/usr/lib/libqwt5.so \
  58.         -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
  59.         -DPYTHON_EXECUTABLE=/usr/bin/python2 \
  60.         -DPYTHON_SITE_PACKAGES_DIR=/usr/lib/python2.7/site-packages \
  61.         -DPYTHON_INCLUDE_PATH=/usr/include/python2.7/ \
  62.     make
  63. }
  64.  
  65. package() {
  66.     cd $_gitname-build
  67.  
  68.     make DESTDIR="$pkgdir" install
  69.  
  70.     # create a more user-friendly application name link
  71.     ln -s /usr/bin/qgis "$pkgdir"/usr/bin/quantum-gis
  72.  
  73.     # install some freedesktop.org compatibility
  74.     install -D -m644 "$srcdir"/$_gitname/debian/qgis.desktop \
  75.                         "$pkgdir"/usr/share/applications/qgis.desktop
  76.  
  77.     # fix python crunchbang in grass scripts
  78.     #sed '1s_/usr/bin/env python_/usr/bin/env python2_' \
  79.     #    -i "$pkgdir"/usr/share/qgis/grass/scripts/*.py
clone this paste RAW Paste Data