summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD230
1 files changed, 71 insertions, 159 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c77512b55ac1..b999ea76bce5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,191 +1,103 @@
-# Maintainer: SaultDon <sault.don gmail>
+# Maintainer: Doug Newgard <scimmia at archlinux dot info>
+# Contributor: SaultDon <sault.don gmail>
# Contributor: Lantald < lantald at gmx.com >
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
# Contributor: Eric Forgeot < http://esclinux.tk >
-# GRASS 6 or 7 Processing and Plugin, Globe Plugin and QGIS Map Server are disabled in cmake by default.
-# Uncomment them in the build() portion if you'd like enabled during the build.
+# 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-ltr
_pkgname=${pkgname//-ltr}
-_pkgver=2.8
-pkgver=2.8.3
-pkgrel=5
-pkgdesc='QGIS (long-term release) is a Geographic Information System (GIS) that supports vector, raster & database formats'
+pkgver=2.14.7
+pkgrel=1
+pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats; Long Term Release'
url='http://qgis.org/'
license=('GPL')
arch=('i686' 'x86_64')
-# https://raw.githubusercontent.com/qgis/QGIS/final-2_6_0/INSTALL
-depends=('qt4'
- 'proj'
- 'geos'
- 'sqlite'
- 'gdal'
- 'expat'
- 'qwt'
- 'qwtpolar'
- 'gsl'
- 'python2'
- 'python2-pyqt4'
- 'python2-qscintilla'
- 'python2-sip'
- 'python2-psycopg2'
- 'python2-pygments'
- 'python2-dateutil'
- 'python2-jinja'
- 'python2-markupsafe'
- 'python2-pytz'
- 'python2-httplib2'
- 'libspatialite'
- 'spatialindex'
- 'icu')
-makedepends=('cmake'
- 'flex'
- 'bison'
- 'txt2tags'
- 'perl'
- 'git')
-optdepends=('grass: GRASS plugin support' # Uncomment relevant cmake option in build() below
- 'fcgi: QGIS Map Server support' # if you want GRASS, QGIS Map Server
- 'osgearth: QGIS Globe plugin support' # or the Globe Plugin enabled
- 'gpsbabel: GPS toolbar support')
+depends=('qca-qt4' 'gdal' 'qwtpolar' 'spatialindex'
+ 'python2-httplib2' 'python2-qscintilla-qt4' 'python2-sip' 'python2-six')
+makedepends=('cmake' 'gsl' 'perl' 'txt2tags')
+optdepends=('gpsbabel: GPS Tool plugin'
+ 'gsl: Georeferencer plugin'
+ 'python2-jinja: MetaSearch plugin'
+ 'python2-owslib: MetaSearch plugin'
+ 'python2-pygments: MetaSearch plugin'
+ 'python2-psycopg2: DB Manager plugin'
+ 'python2-pygments: DB Manager plugin'
+ 'python2-pyspatialite: DB Manager plugin'
+ 'python2-psycopg2: Processing plugin'
+ 'python2-pyspatialite: Processing plugin'
+ 'python2-yaml: Processing plugin')
provides=("$_pkgname=$pkgver")
-install="$pkgname.install"
-source=("${_pkgname}::git://github.com/qgis/QGIS.git#branch=release-${_pkgver//./_}"
- "$pkgname.png"
- "$pkgname.sh"
- "https://raw.githubusercontent.com/Ariki/QGIS/support-configure-ng/python/console/console.py")
-md5sums=('SKIP'
- '738cc27475119c899c1ce7bf495459ff'
- '3ebaf185073badd96e9c1b484b986d54'
- '57efd9c869ed2d0a50fb7cf35048d99d')
-
-
-pkgver() {
- cd "$_pkgname"
- # cutting off 'final' prefix that presents in the git tag
- git describe --long | sed 's/^final-//;s/\([^-]*-g\)/r\1/;s/-/./g;s/_/./g'
-}
-#pkgver() {
-# cd $_pkgname
-#
-# printf "%s.r%s" "${_pkgver}" "$(git rev-list --count HEAD)"
-#}
+conflicts=("$_pkgname")
+source=("https://qgis.org/downloads/$_pkgname-$pkgver.tar.bz2")
+md5sums=('5cc2377dfc40c07d6efde4bac7301ba5')
prepare() {
- cd $_pkgname
+ cd $_pkgname-$pkgver
+
+ # Fix references to "python"
+ sed -i 's/\(env \|\/usr\/bin\/\)python$/&2/' $(find . -iname "*.py")
+ sed -i 's/python /python2 /' scripts/pyuic4-wrapper.sh
- mv "${srcdir}/console.py" python/console/
+ # 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
- # Fixing by hand shebang for .py files.
- find . -iname '*.py' | xargs sed -ie 's:^#!/usr/bin/env python$:#!/usr/bin/env python2:'
- find . -iname '*.py' | xargs sed -ie 's:^#!/usr/bin/python$:#!/usr/bin/env python2:'
+ [[ -d build ]] || mkdir build
}
build() {
- # Fix insecure RPATH is weird, but just works ;)
- # echo "os.system(\"sed -i '/^LFLAGS/s|-Wl,-rpath,.\+ ||g' gui/Makefile core/Makefile\")" >> python/configure.py.in
-
- cd $_pkgname
-
- if [ -d build ]; then
- rm -rf build
- fi
- mkdir build
- cd build
+ cd $_pkgname-$pkgver/build
cmake -G "Unix Makefiles" ../ \
- -Wno-dev \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_SKIP_BUILD_RPATH=FALSE \
- -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
- -DCMAKE_INSTALL_RPATH=/opt/$pkgname/lib \
- -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \
- -DCMAKE_INSTALL_PREFIX=/opt/$pkgname/ \
- -DENABLE_TESTS=OFF \
+ -DCMAKE_INSTALL_PREFIX=/usr \
-DQGIS_MANUAL_SUBDIR=share/man \
+ -DENABLE_TESTS=FALSE \
+ -DCMAKE_SKIP_RPATH=TRUE \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
- -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
- -DPYTHON_INCLUDE_PATH=/usr/include/python2.7 \
- -DPYTHON_SITE_PACKAGES_DIR=/usr/lib/python2.7/site-packages \
- -DPYQT4_SIP_DIR=/usr/share/sip/PyQt4 \
- -DQSCI_SIP_DIR=/usr/share/sip/PyQt4 \
- -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 \
-DWITH_INTERNAL_QWTPOLAR=FALSE \
- -DQWTPOLAR_LIBRARY=/usr/lib/libqwtpolar.so \
- -DQWT_LIBRARY=/usr/lib/libqwt.so \
+ -DWITH_INTERNAL_{HTTPLIB2,JINJA2,MARKUPSAFE,OWSLIB,PYGMENTS,DATEUTIL,PYTZ,YAML,NOSE2,SIX}=FALSE \
# -DWITH_SERVER=TRUE \
-# -DWITH_SERVER_PLUGINS=TRUE \
-# -DWITH_GRASS7=ON \
-# -DGRASS_PREFIX7=/opt/grass \
-# -DGRASS_INCLUDE_DIR7=/opt/grass/include/ \
-# -DWITH_GRASS=ON \
-# -DGRASS_PREFIX=/opt/grass64 \
-# -DGRASS_INCLUDE_DIR=/opt/grass64/include \
-# -DWITH_GLOBE=TRUE \
+# -DWITH_GLOBE=TRUE
make
-
- # TODO: fix $srcdir warning if it's a real problem...
- # Looks like it's only showing up in non-critical files so can ignore warning.
-
}
package() {
- cd $_pkgname/build
-
- make DESTDIR="$pkgdir/" install
-
- # qgis.desktop
- sed -i -e "s,^Name=QGIS Desktop\$,Name=QGIS Desktop (long-term release)," \
- -e "s,^Icon=qgis\$,Icon=$pkgname," \
- -e "s,^TryExec=/usr/bin/qgis\$,TryExec=/usr/bin/$pkgname," \
- -e "s,^Exec=/usr/bin/qgis %F\$,Exec=/usr/bin/$pkgname %F," \
- "${srcdir}/${_pkgname}/debian/qgis.desktop"
-
- # qbrowser.desktop
- sed -i -e "s,^Name=QGIS Browser\$,Name=QGIS Browser (long-term release)," \
- -e "s,^Icon=qgis\$,Icon=qbrowser," \
- -e "s,^TryExec=/usr/bin/qbrowser\$,TryExec=/usr/bin/qbrowser-ltr," \
- -e "s,^Exec=/usr/bin/qbrowser %F\$,Exec=/usr/bin/qbrowser-ltr %F," \
- "${srcdir}/${_pkgname}/debian/qbrowser.desktop"
-
- # install some freedesktop.org compatibility
- install -Dm755 "$srcdir/$_pkgname/debian/qgis.desktop" \
- "$pkgdir/usr/share/applications/$pkgname.desktop"
-
- install -Dm755 "$srcdir/$_pkgname/debian/qbrowser.desktop" \
- "$pkgdir/usr/share/applications/qbrowser-ltr.desktop"
-
- install -Dm644 "$srcdir/$pkgname.png" \
- "$pkgdir/usr/share/pixmaps/$pkgname.png"
-
- #install -Dm644 $srcdir/$_pkgname/debian/qbrowser-icon512x512.png \
- # "$pkgdir/usr/share/pixmaps/qbrowser-ltr.png"
-
- # rename executables so they don't conflict with qgis or qgis-ltr
- mv $pkgdir/opt/$pkgname/bin/$_pkgname $pkgdir/opt/$pkgname/bin/$pkgname
-
- install -Dm755 $srcdir/$pkgname.sh \
- $pkgdir/usr/bin/$pkgname
-
- install -Dm755 $pkgdir/opt/$pkgname/bin/qbrowser \
- $pkgdir/usr/bin/qbrowser-ltr
-
- install -Dm755 $pkgdir/opt/$pkgname/bin/qgis_mapserv.fcgi \
- $pkgdir/usr/bin/qgis_mapserv_ltr.fcgi
-
- # TODO: these aren't working for some reason, ie, .qgs files are not opened by QGIS...
- # Appears to be a conflict with some file types being defaulted to google-chrome/chromium if that's installed as well.
- #install -dm755 "$pkgdir/usr/share/pixmaps" \
- # "$pkgdir/usr/share/mimelnk/application"
-
- #for mime in "$srcdir/$_pkgname/debian/mime/application/"*.desktop
- # do install -m644 "$mime" "$pkgdir/usr/share/mimelnk/application"
- #done
-
- #install -Dm644 "$srcdir/$pkgname/images/icons/qgis-mime-icon.png \
- # "$pkgdir/usr/share/pixmaps/qgis-mime.png"
+ 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 prog in qgis qbrowser; do
+ install -Dm644 images/icons/${prog}_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$prog.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"
}