Advertisement
Guest User

pkgbuild for qgis on arch linux - to repair gdal raster menu

a guest
Sep 7th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.55 KB | None | 0 0
  1. # Maintainer: SaultDon < sault.don@gmail.com >
  2. # Contributor: Lantald < lantald at gmx.com
  3. # Contributor: Thomas Dziedzic < gostrc at gmail >
  4. # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
  5. # Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
  6. # Contributor: Eric Forgeot < http://esclinux.tk >
  7.  
  8. pkgname=qgis
  9. pkgver=1.8.0
  10. pkgrel=5
  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' 'pyqt' 'python2' 'python2-pyqt' 'giflib'  'cfitsio' 'qwt'
  17. 'gdal' 'flex' 'bison' 'libspatialite' 'spatialindex')
  18. makedepends=('cmake' 'grass' 'gsl' 'postgis' 'netcdf' 'fcgi' 'python2-sip')
  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. options=('!makeflags')
  25. source=("http://qgis.org/downloads/qgis-${pkgver}.tar.bz2"
  26.         'qgis.desktop'
  27.         "http://osgeo-org.1560.x6.nabble.com/attachment/5072872/0/fix_gdaltools_version.patch")
  28.  
  29. md5sums=('1d60520f81d7763c026d0af887ac9a05'
  30.          '8ab66039f2aba519b92f52272ec3c13e'
  31.          '484d7b70ac4ed340c15b30e65bb5fbee')
  32.  
  33. build() {
  34.   # Fix insecure RPATH is weird, but just works ;)
  35.   # echo "os.system(\"sed -i '/^LFLAGS/s|-Wl,-rpath,.\+ ||g' gui/Makefile core/Makefile\")" >> python/configure.py.in
  36.   #cd qgis-${pkgver}
  37.  
  38.   rm -rf build
  39.   mkdir build
  40.   cd build
  41.  
  42.   cmake ../qgis-${pkgver} \
  43.     -DENABLE_TESTS=OFF \
  44.     -DCMAKE_BUILD_TYPE=Release \
  45.     -DCMAKE_SKIP_RPATH=ON \
  46.     -DCMAKE_INSTALL_PREFIX=/usr \
  47.     -DGRASS_PREFIX=/opt/grass \
  48.     -DQGIS_MANUAL_SUBDIR=share/man \
  49.     -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
  50.     -DPYTHON_EXECUTABLE=/usr/bin/python2 \
  51.     -DPYTHON_SITE_PACKAGES_DIR=/usr/lib/python2.7/site-packages \
  52.     -DPYTHON_INCLUDE_PATH=/usr/include/python2.7 \
  53.     -DQT_QMAKE_EXECUTABLE=qmake4
  54.  
  55.   make
  56.  
  57.   #Fix broken GDAL tools menu
  58.   cd "${srcdir}/qgis-$pkgver"
  59.   patch -Np1 -i "${srcdir}/fix_gdaltools_version.patch"
  60. }
  61.  
  62. package() {
  63.   cd build
  64.  
  65.   make DESTDIR=${pkgdir} install
  66.  
  67.   # create a more user-friendly application name link
  68.   ln -s /usr/bin/qgis $pkgdir/usr/bin/quantum-gis
  69.  
  70.   # install some freedesktop.org compatibility
  71.   install -D -m644 ${srcdir}/qgis.desktop \
  72.     ${pkgdir}/usr/share/applications/qgis.desktop
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement