desktop/qgis/PKGBUILD

78 lines
2.8 KiB
Bash
Raw Normal View History

2011-04-16 18:53:15 +08:00
pkgname=qgis
2018-02-11 00:18:24 +08:00
pkgver=2.18.16
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')
2017-12-12 19:44:38 +08:00
depends=('gcc-libs' 'glibc' 'gdal' 'proj' 'geos' 'expat' 'libspatialite' 'spatialindex' 'postgresql-libs' 'qca' 'qt' 'qwt6' 'sqlite3' 'python2' 'qscintilla-python2' 'pyqt4-python2' 'python2-pyspatialite'
'python2-jinja')
2017-03-12 22:21:03 +08:00
makedepends=('cmake' 'flex' 'bison' 'fcgi' 'grass' 'gsl' 'postgis' 'python2-sip' 'python2-pip' 'python2-setuptools')
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'
'python2-sip: python-support'
'postgis: postgis support and SPIT plugin')
2016-09-12 08:55:48 +08:00
source=("http://qgis.org/downloads/$pkgname-$pkgver.tar.bz2")
2018-02-11 00:18:24 +08:00
sha256sums=('8989e0f9003cfec41ff6cf984bb52866dd0f4d97fe88ec2326f1cf1140050835')
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
# 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
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 \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
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
# install python2-psycopg2
pip2 install --target=$pkgdir/usr/share/qgis/python psycopg2
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
2017-03-12 22:21:03 +08:00
install -Dm644 debian/{qgis,qbrowser}.desktop -t "$pkgdir/usr/share/applications/"
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
}