Advertisement
rememberthemer

PKGBUILD

Apr 30th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.85 KB | None | 0 0
  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.  
  7. pkgname=qgis-git
  8. pkgver=20120430
  9. pkgrel=1
  10. pkgdesc='Quantum GIS is a Geographic Information System (GIS) that supports vector, raster & database formats'
  11. url='http://qgis.org/'
  12. license=('GPL')
  13. arch=('i686' 'x86_64')
  14. # update to http://www.qgis.org/wiki/Building_QGIS_from_Source#Overview
  15. depends=('libmysqlclient' 'postgresql-libs' 'sqlite3' 'jasper' 'curl' 'qt' 'python2'
  16.           'python2-qt' 'giflib' 'cfitsio' 'qwt5' 'gdal' 'flex' 'bison'
  17.           'libspatialite' 'libspatialindex')
  18. makedepends=('cmake' 'grass' 'gsl' 'postgis' 'netcdf' 'fcgi' 'python2-sip' 'txt2tags')
  19. optdepends=('postgis: postgis support and SPIT plugin'
  20.             'fcgi: qgis mapserver'
  21.             'python2-sip: python-support'
  22.             'grass: grass plugin'
  23.             'gsl: georeferencer  ')
  24. provides=(${pkgname%-git})
  25. conflicts=(${pkgname%-git})
  26. options=('!makeflags')
  27. install=qgis.install
  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.     # cmake supports out of tree builds
  45.     # there is no need to copy/clone - just make a new dir and specify
  46.     # src dir
  47.     rm -rf $_gitname-build && mkdir $_gitname-build && cd $_gitname-build
  48.     cmake ../$_gitname \
  49.         -DCMAKE_BUILD_TYPE=Release \
  50.         -DCMAKE_SKIP_RPATH=ON \
  51.         -DCMAKE_INSTALL_PREFIX=/usr \
  52.         -DGRASS_PREFIX=/opt/grass \
  53.         -DQGIS_MANUAL_SUBDIR=share/man \
  54.         -DQWT_INCLUDE_DIR=/usr/include/qwt5 \
  55.         -DQWT_LIBRARY=/usr/lib/libqwt5.so \
  56.         -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
  57.         -DPYTHON_EXECUTABLE=/usr/bin/python2 \
  58.         -DPYTHON_SITE_PACKAGES_DIR=/usr/lib/python2.7/site-packages \
  59.         -DPYTHON_INCLUDE_PATH=/usr/include/python2.7/
  60.     make
  61. }
  62.  
  63. package() {
  64.     cd $_gitname-build
  65.  
  66.     make DESTDIR="$pkgdir" install
  67.    
  68.     # create a more user-friendly application name link
  69.     ln -s /usr/bin/qgis "$pkgdir"/usr/bin/quantum-gis
  70.    
  71.     # install some freedesktop.org compatibility
  72.     install -D -m644 "$srcdir"/$_gitname/debian/qgis.desktop \
  73.                         "$pkgdir"/usr/share/applications/qgis.desktop
  74.  
  75.     # fix python crunchbang in grass scripts
  76.     sed '1s_/usr/bin/env python_/usr/bin/env python2_' \
  77.         -i "$pkgdir"/usr/share/qgis/grass/scripts/*.py
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement