summaryrefslogtreecommitdiff
path: root/qgis/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'qgis/PKGBUILD')
-rw-r--r--qgis/PKGBUILD103
1 files changed, 58 insertions, 45 deletions
diff --git a/qgis/PKGBUILD b/qgis/PKGBUILD
index 21a46654..c057d919 100644
--- a/qgis/PKGBUILD
+++ b/qgis/PKGBUILD
@@ -13,39 +13,31 @@
# You will also need to install osgearth-qt4 or fcgi, respectively, before building.
pkgname=qgis
-pkgver=2.18.16
+pkgver=3.0.0
pkgrel=1
pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats'
url='http://qgis.org/'
license=('GPL')
arch=('i686' 'x86_64')
-depends=('expat' 'gcc-libs' 'gdal' 'geos' 'glibc' 'libspatialite' 'postgresql-libs' 'proj'
- 'qt4' 'qca-qt4' 'qjson' 'qscintilla-qt4' 'qwt-qt4' 'qwtpolar-qt4' 'spatialindex' 'sqlite'
- 'python2' 'python2-httplib2' 'python2-future' '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')
+depends=('qt5-tools' 'qt5-script' 'qtkeychain' 'qca-qt5' 'qt5-webkit' 'proj' 'geos' 'sqlite' 'python-gdal' 'python-owslib' 'python-future' 'python-sip' 'python-psycopg2' 'python-yaml' 'python-numpy' 'python-jinja' 'python-pygments' 'qwtpolar' 'expat' 'python-qscintilla-qt5' 'spatialindex' 'gsl' 'libzip')
+makedepends=('git' 'cmake' 'txt2tags' 'libglvnd')
+optdepends=('grass: for GRASS providers and plugin (6 or 7)'
+# 'gsl: for georeferencer'
+ 'postgresql: for postgis and SPIT support'
+ 'gpsbabel: for gps plugin'
+ 'fcgi: for qgis mapserver'
+ 'ocilib: oracle provider')
source=("https://qgis.org/downloads/$pkgname-$pkgver.tar.bz2")
-sha512sums=('1fe060c1d392f304eea10a211815e14081299a865e34114625f3a5f2a1b365f571bb30878a21cbf25bc32285ffc689d37cb7dbcab129ce5f03ccd6fa0781876d')
+sha512sums=('91201c5d48f9450734a6268f70cba830e363db15a979266af1a7f2ef73857ca11e89145d027f394d052d0536e54b4f62523b1ad49bbe698743fec882ceecfabe')
prepare() {
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
- # Make sure we find the -qt4 versions of qwt and qwtpolar
- sed -i '/QWT_LIBRARY_NAMES/ s/qwt /qwt-qt4 /' cmake/FindQwt.cmake
- sed -i '/PATH_SUFFIXES/ s/qwt$/&-qt4/;/LIBRARY NAMES/ s/qwtpolar/&-qt4/' cmake/FindQwtPolar.cmake
+ # Fix desktop file for /usr/bin/qgis-github
- # Fix references to "python"
- sed -i 's/\(env \|\/usr\/bin\/\)python$/&2/' $(find . -iname "*.py")
+ sed -e 's/\/usr\/bin\/qgis/\/usr\/bin\/qgis-git/g' \
+ -e 's/Icon=qgis/Icon=qgis-git/g' \
+ -i debian/qgis.desktop
# Remove mime types already defined by freedesktop.org
sed -e '/type="image\/tiff"/,/<\/mime-type>/d' \
@@ -58,17 +50,15 @@ prepare() {
}
build() {
- cd $pkgname-$pkgver/build
+ cd "$pkgname-$pkgver/build"
cmake -G "Unix Makefiles" ../ \
- -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_PREFIX=/opt/$pkgname \
-DQGIS_MANUAL_SUBDIR=share/man \
-DENABLE_TESTS=FALSE \
- -DCMAKE_SKIP_RPATH=TRUE \
- -DPYTHON_EXECUTABLE=/usr/bin/python2 \
- -DWITH_QTWEBKIT=FALSE \
-DWITH_INTERNAL_QWTPOLAR=FALSE \
- -DWITH_INTERNAL_{MARKUPSAFE,OWSLIB,DATEUTIL,PYTZ,YAML,NOSE2,SIX,FUTURE}=FALSE \
+ -DWITH_INTERNAL_{HTTPLIB2,JINJA2,MARKUPSAFE,OWSLIB,PYGMENTS,DATEUTIL,PYTZ,YAML,NOSE2,SIX,FUTURE}=FALSE \
+ -DWITH_GEOREFERENCER=TRUE
# -DWITH_SERVER=TRUE \
# -DWITH_GLOBE=TRUE
@@ -76,35 +66,58 @@ build() {
}
package() {
- cd $pkgname-$pkgver/build
+ 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')
+ [[ "$(sed -n '/^WITH_GLOBE:/ s/.*=//p' CMakeCache.txt)" == "TRUE" ]] && optdepends+=('osgearth: Globe plugin')
make DESTDIR="$pkgdir" install
- cd "$srcdir/$pkgname-$pkgver"
-
+ cd "$srcdir/$_pkgname"
+
+ install -d -m755 $pkgdir/usr/bin
+ ln -s /opt/$pkgname/bin/qgis "$pkgdir/usr/bin/qgis-git"
+
# 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"
+ install -Dm644 debian/qgis.desktop -t "$pkgdir/usr/share/applications/"
+ for resolution in `ls /usr/share/icons/hicolor/|egrep '[0-9]'`; do
+ if [ -e debian/icons/qgis-icon{$resolution}.png ]
+ then
+ install -Dm644 debian/icons/qgis-icon${resolution}.png "$pkgdir/usr/share/icons/hicolor/${resolution}/apps/$pkgname.png"
+ fi
done
-
- # install mime information and icons
+ install -Dm644 images/icons/qgis_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
+
+ # 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"
- for type in asc ddf dem dt0 dxf gml img mime mldata qgs qlr qml qpt shp sqlite; do
+ for resolution in `ls /usr/share/icons/hicolor/|egrep '[0-9]'`; do
+ if [ -e debian/icons/qgis-mime-icon{$resolution}.png ]
+ then
+ install -Dm644 debian/icons/qgis-mime-icon${resolution}.png "$pkgdir/usr/share/icons/hicolor/${resolution}/mimetypes/qgis-mime.png"
+ fi
+ done
+ install -Dm644 images/icons/qgis_mime_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/mimetypes/qgis-mime.svg"
+
+ for type in qgs qlr qml qpt; do
+ for resolution in `ls /usr/share/icons/hicolor/|egrep '[0-9]'`; do
+ if [ -e debian/icons/qgis-${type}${resolution}.png ]
+ then
+ install -Dm644 debian/icons/qgis-${type}${resolution}.png "$pkgdir/usr/share/icons/hicolor/${resolution}/mimetypes/qgis-$type.png"
+ fi
+ done
+ done
+ for type in asc ddf dem dt0 dxf gml img mime mldata qgs qlr qml qpt shp sqlite; do
install -Dm644 images/icons/qgis_${type}_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/mimetypes/qgis-$type.svg"
done
# compile python files, since the cmake option doesn't seem to account for DESTDIR
- python2 -m compileall -q "$pkgdir"
+ python -m compileall -q "$pkgdir"
+
+ # link libraries
+ install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
+ echo '/opt/qgis-git/lib' > "${pkgdir}"/etc/ld.so.conf.d/qgis-git.conf
}