# Maintainer (Arch): Doug Newgard # Maintainer (Arch): XavierCLL # Contributor (Arch): SaultDon # Contributor (Arch): Lantald < lantald at gmx.com > # Contributor (Arch): Thomas Dziedzic < gostrc at gmail > # Contributor (Arch): dibblethewrecker dibblethewrecker.at.jiwe.dot.org # Contributor (Arch): Gerardo Exequiel Pozzi # Contributor (Arch): Eric Forgeot < http://esclinux.tk > # Maintainer: Omar Vega Ramos # Contributor: Isaac David # Globe Plugin and Map Server are disabled in cmake by default. # Uncomment them in the build() portion if you'd like them enabled. # You will also need to install osgearth-qt4 or fcgi, respectively, before building. pkgname=qgis pkgver=2.18.1 pkgrel=1.parabola1 pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats, without nonfree ElvenSword resource' url='http://qgis.org/' license=('GPL') arch=('i686' 'x86_64') depends=('qca-qt4' 'gdal' 'qwtpolar' 'spatialindex' python2-{qscintilla-qt4,sip,psycopg2,httplib2,future,jinja,markupsafe} python2-{owslib,pygments,dateutil,pytz,six}) makedepends=('cmake' 'gsl' 'perl' 'txt2tags') optdepends=('gpsbabel: GPS Tool plugin' 'python2-pyspatialite: Processing plugin' 'python2-yaml: Processing plugin') mksource=("http://qgis.org/downloads/$pkgname-$pkgver.tar.bz2") source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.bz2" "https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.bz2.sig" "libre.patch") sha256sums=('d4dff4a568d86af61c54f275f13765159b272ae06f940161e0de33b0dc30fb50' 'SKIP' '94c9457dc861a368edefb4fc8173471dbd2c4024b41346202d44d7aa7e03064e') validpgpkeys=('38D33EF29A7691134357648733466E12EC7BA943') # Isaac David mksource() { cd $pkgname-$pkgver # remove nonfree resource rm -rv "resources/cpt-city-qgis-min/es" } prepare() { cd $pkgname-$pkgver patch -Np1 -i "$srcdir/libre.patch" # Fix references to "python" sed -i 's/\(env \|\/usr\/bin\/\)python$/&2/' $(find . -iname "*.py") # Remove mime types already defined by freedesktop.org sed -e '/type="image\/tiff"/,/<\/mime-type>/d' \ -e '/type="image\/jpeg"/,/<\/mime-type>/d' \ -e '/type="image\/jp2"/,/<\/mime-type>/d' \ -e '/type="application\/x-adobe-mif"/,/<\/mime-type>/d' \ -i debian/qgis.xml [[ -d build ]] || mkdir build } build() { cd $pkgname-$pkgver/build cmake -G "Unix Makefiles" ../ \ -DCMAKE_INSTALL_PREFIX=/usr \ -DQGIS_MANUAL_SUBDIR=share/man \ -DENABLE_TESTS=FALSE \ -DCMAKE_SKIP_RPATH=TRUE \ -DPYTHON_EXECUTABLE=/usr/bin/python2 \ -DWITH_INTERNAL_QWTPOLAR=FALSE \ -DWITH_INTERNAL_{HTTPLIB2,JINJA2,MARKUPSAFE,OWSLIB,PYGMENTS,DATEUTIL,PYTZ,YAML,NOSE2,SIX}=FALSE \ # -DWITH_SERVER=TRUE \ # -DWITH_GLOBE=TRUE make } package() { cd $pkgname-$pkgver/build # Add optional deps based on selected or autodetected options [[ -n "$(sed -n '/^GRASS_PREFIX:/ s/.*=//p' CMakeCache.txt)" ]] && optdepends+=('grass6: GRASS6 plugin') [[ -n "$(sed -n '/^GRASS_PREFIX7:/ s/.*=//p' CMakeCache.txt)" ]] && optdepends+=('grass: GRASS7 plugin') [[ "$(sed -n '/^WITH_SERVER:/ s/.*=//p' CMakeCache.txt)" == "TRUE" ]] && optdepends+=('fcgi: Map Server') [[ "$(sed -n '/^WITH_GLOBE:/ s/.*=//p' CMakeCache.txt)" == "TRUE" ]] && optdepends+=('osgearth-qt4: Globe plugin') make DESTDIR="$pkgdir" install cd "$srcdir/$pkgname-$pkgver" # install desktop files and icons install -Dm644 debian/{qgis,qbrowser}.desktop -t "$pkgdir/usr/share/applications/" for icon in qgis-icon{,-16x16,-60x60} qbrowser-icon{,-60x60}; do local _resolution="${icon##*-}"; [[ "$_resolution" == "icon" ]] && _resolution="512x512" install -Dm644 images/icons/$icon.png "$pkgdir/usr/share/icons/hicolor/$_resolution/apps/${icon%%-*}.png" done for icon in {qgis,qbrowser}_icon; do install -Dm644 images/icons/$icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/${icon%%_*}.svg" done # install mime information and icon install -Dm644 debian/qgis.xml "$pkgdir/usr/share/mime/packages/qgis.xml" install -Dm644 images/icons/qgis-mime-icon.png "$pkgdir/usr/share/icons/hicolor/128x128/mimetypes/qgis-mime.png" # compile python files, since the cmake option doesn't seem to account for DESTDIR python2 -m compileall -q "$pkgdir" }