desktop/qgis/PKGBUILD

74 lines
2.6 KiB
Bash
Raw Normal View History

2011-04-16 18:53:15 +08:00
pkgname=qgis
2018-10-28 22:27:12 +08:00
pkgver=3.4.0
2016-10-30 20:54:46 +08:00
pkgrel=1
2014-06-28 17:33:08 +08:00
pkgdesc='A Geographic Information System (GIS) that supports vector, raster and database formats'
2011-04-16 18:53:15 +08:00
url='http://qgis.org/'
license=('GPL')
arch=('x86_64')
2018-10-28 22:27:12 +08:00
depends=('gdal' 'libspatialite' 'spatialindex' 'qtkeychain' 'qca-qt5' 'qt5-3d' 'qt5-webkit' 'qwt6' 'sqlite' 'python3'
'libzip' 'python3-qscintilla-qt5' 'proj' 'python3-pyqt5')
makedepends=('cmake' 'fcgi' 'gsl' 'python3-six' 'qt5-tools' 'sip' 'txt2tags')
2014-06-28 17:33:08 +08:00
optdepends=('fcgi: qgis mapserver'
2011-04-16 18:53:15 +08:00
'grass: grass plugin'
2014-06-28 17:33:08 +08:00
'gsl: georeferencer'
2018-07-05 22:57:03 +08:00
'postgis: postgis support and SPIT plugin'
'python-jinja: MetaSearch plugin')
2018-10-28 22:27:12 +08:00
source=("https://qgis.org/downloads/$pkgname-$pkgver.tar.bz2")
sha256sums=('b63a6ebbd4e4afb2820887b18b0aa41e3c7862f7fbdc8a121d6fcd75f0321e98')
2015-12-07 08:10:41 +08:00
2016-07-28 07:25:11 +08:00
prepare() {
cd $pkgname-$pkgver
2017-03-12 22:21:03 +08:00
2018-07-05 22:57:03 +08:00
# # Fix references to "python"
# sed -i 's/\(env \|\/usr\/bin\/\)python$/&2/' $(find . -iname "*.py")
2017-03-12 22:21:03 +08:00
# 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
2016-07-28 07:25:11 +08:00
[[ -d build ]] || mkdir build
}
2012-08-11 18:13:50 +08:00
2014-06-28 17:33:08 +08:00
build() {
2017-12-12 19:44:38 +08:00
cd $pkgname-$pkgver/build
2017-03-12 22:21:03 +08:00
2016-03-19 19:57:53 +08:00
cmake -G "Unix Makefiles" ../ \
2014-06-28 17:33:08 +08:00
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
2015-03-21 17:26:12 +08:00
-DWITH_GRASS=OFF \
2014-06-28 17:33:08 +08:00
-DGRASS_PREFIX=/opt/grass \
2015-03-15 22:00:41 +08:00
-DGRASS_INCLUDE_DIR=/opt/grass/include/ \
2014-06-28 17:33:08 +08:00
-DQGIS_MANUAL_SUBDIR=share/man \
2018-07-05 22:57:03 +08:00
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
2016-03-19 19:57:53 +08:00
-DENABLE_TESTS=FALSE \
-DCMAKE_SKIP_RPATH=TRUE
make
2011-04-16 18:53:15 +08:00
}
package() {
2016-03-19 19:57:53 +08:00
cd $pkgname-$pkgver/build
make DESTDIR=$pkgdir install
2017-03-12 22:21:03 +08:00
2014-06-28 17:33:08 +08:00
# create a more user-friendly application name link
2016-03-19 19:57:53 +08:00
ln -s /usr/bin/qgis "$pkgdir/usr/bin/quantum-gis"
2014-06-28 17:33:08 +08:00
2017-12-12 19:44:38 +08:00
cd ..
2017-03-12 22:21:03 +08:00
2014-06-28 17:33:08 +08:00
# install some freedesktop.org compatibility
2018-07-05 22:57:03 +08:00
install -Dm644 debian/qgis.desktop -t "$pkgdir/usr/share/applications/"
2017-03-12 22:21:03 +08:00
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 icons
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
install -Dm644 images/icons/qgis_${type}_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/mimetypes/qgis-$type.svg"
done
2015-11-30 04:01:37 +08:00
}