mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 07:07:14 +08:00
74 lines
2.6 KiB
Bash
74 lines
2.6 KiB
Bash
pkgname=qgis
|
|
pkgver=3.2.0
|
|
pkgrel=1
|
|
pkgdesc='A Geographic Information System (GIS) that supports vector, raster and database formats'
|
|
url='http://qgis.org/'
|
|
license=('GPL')
|
|
arch=('x86_64')
|
|
depends=('gcc-libs' 'glibc' 'gdal' 'libspatialite' 'spatialindex' 'qtkeychain' 'qca' 'qca-qt5' 'qt5-3d' 'qt5-webkit' 'qwt6' 'sqlite3' 'python3'
|
|
'libzip' 'python3-qscintilla-qt5' 'proj' 'python3-pyqt5' 'python2-pyqt5')
|
|
makedepends=('cmake' 'fcgi' 'gsl' 'python3-six' 'qt5-tools')
|
|
optdepends=('fcgi: qgis mapserver'
|
|
'grass: grass plugin'
|
|
'gsl: georeferencer'
|
|
'postgis: postgis support and SPIT plugin'
|
|
'python-jinja: MetaSearch plugin')
|
|
source=("http://qgis.org/downloads/$pkgname-$pkgver.tar.bz2")
|
|
sha256sums=('0bc7cc5bdec05bac1f0f50250ce705130b5c3a7df3f0115f26743431fca2beff')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
|
|
# # 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_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DWITH_GRASS=OFF \
|
|
-DGRASS_PREFIX=/opt/grass \
|
|
-DGRASS_INCLUDE_DIR=/opt/grass/include/ \
|
|
-DQGIS_MANUAL_SUBDIR=share/man \
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
|
-DENABLE_TESTS=FALSE \
|
|
-DCMAKE_SKIP_RPATH=TRUE
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver/build
|
|
make DESTDIR=$pkgdir install
|
|
|
|
# create a more user-friendly application name link
|
|
ln -s /usr/bin/qgis "$pkgdir/usr/bin/quantum-gis"
|
|
|
|
cd ..
|
|
|
|
# install some freedesktop.org compatibility
|
|
install -Dm644 debian/qgis.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
|
|
}
|