summaryrefslogtreecommitdiff
path: root/gis/qgis
diff options
context:
space:
mode:
Diffstat (limited to 'gis/qgis')
-rw-r--r--gis/qgis/README11
-rw-r--r--gis/qgis/README.server23
-rw-r--r--gis/qgis/doinst.sh13
-rw-r--r--gis/qgis/qgis.SlackBuild134
-rw-r--r--gis/qgis/qgis.info10
-rw-r--r--gis/qgis/slack-desc19
6 files changed, 210 insertions, 0 deletions
diff --git a/gis/qgis/README b/gis/qgis/README
new file mode 100644
index 0000000000..38e0543964
--- /dev/null
+++ b/gis/qgis/README
@@ -0,0 +1,11 @@
+Quantum GIS (QGIS) is a user friendly Geographic Information System
+that lets you view and manipulate spatial data on your computer. It
+supports many common spatial data formats (e.g. PostGIS, ShapeFile and
+geotiff).
+
+Optional dependencies:
+ - postgresql and postgis: for PostGIS support
+ - gpsbabel: for the GPS plugin
+ - grass: for the Grass plugin
+ - gsl: for georeferencing support
+ - fcgi: for the QGIS server (see README.server)
diff --git a/gis/qgis/README.server b/gis/qgis/README.server
new file mode 100644
index 0000000000..40fb86b098
--- /dev/null
+++ b/gis/qgis/README.server
@@ -0,0 +1,23 @@
+QGIS Server is a WMS server for your QGIS project. It requires fcgi. It is
+optionally built at the same time as QGIS; you need to specify SERVER=yes
+to the SlackBuild, for example
+
+ SERVER=yes sh qgis.SlackBuild
+
+By default, the server is installed into /var/www/cgi-bin/qgis, and so the
+WMS URL is 'http://<hostname>/cgi-bin/qgis/qgis_mapserv.fcgi'. However, a
+different directory can be specified by passing CGIBINDIR=<path> to the
+SlackBuild script.
+
+After installing QGIS (and the server), you will need to set up the server.
+To serve a single QGIS project, this can be done as follows:
+
+* In the qgis 'Project Properties' window, on the 'General' tab, ensure
+that 'Save paths' is set to 'absolute', and on the 'WMS Server' tab, fill
+in all relevant details (particularly including 'Coordinate Systems
+Restrictions').
+
+* Create a symlink to your QGIS project file from /var/www/cgi-bin/qgis/:
+
+ ln -s /home/user/maps/mymap.qgs /var/www/cgi-bin/qgis/
+
diff --git a/gis/qgis/doinst.sh b/gis/qgis/doinst.sh
new file mode 100644
index 0000000000..69d003d68b
--- /dev/null
+++ b/gis/qgis/doinst.sh
@@ -0,0 +1,13 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/gis/qgis/qgis.SlackBuild b/gis/qgis/qgis.SlackBuild
new file mode 100644
index 0000000000..a431663d1c
--- /dev/null
+++ b/gis/qgis/qgis.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+# Slackware build script for Quantum GIS
+
+# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
+# Copyright 2013 Benjamin Trigona-Harany
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=qgis
+VERSION=${VERSION:-2.0.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+WITHGRASS=""
+if pkg-config --exists grass; then
+ WITHGRASS="-DGRASS_PREFIX=$(pkg-config --variable=prefix grass)"
+fi
+
+WITHSERVER="-DWITH_MAPSERVER=FALSE"
+CGIBINDIR="${CGIBINDIR:-/var/www/cgi-bin/qgis}"
+if [ "${SERVER:-no}" = "yes" ]; then
+ WITHSERVER="-DWITH_MAPSERVER=TRUE -DQGIS_CGIBIN_SUBDIR=$CGIBINDIR"
+fi
+
+cmake . \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
+ -DQGIS_LIB_SUBDIR=lib${LIBDIRSUFFIX} \
+ -DQGIS_LIBEXEC_SUBDIR=lib${LIBDIRSUFFIX}/qgis \
+ -DQGIS_PLUGIN_SUBDIR=lib${LIBDIRSUFFIX}/qgis \
+ $WITHSERVER \
+ $WITHGRASS
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+install -D -m 0644 debian/qgis.desktop \
+ $PKG/usr/share/applications/qgis.desktop
+install -D -m 0644 debian/qgis.xml \
+ $PKG/usr/share/mime/packages/qgis.xml
+
+mkdir -p $PKG/usr/share/pixmaps
+ln -s /usr/share/qgis/images/icons/qgis-icon.png $PKG/usr/share/pixmaps
+ln -s /usr/share/qgis/images/icons/qgis-mime-icon.png $PKG/usr/share/pixmaps
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ doc/AUTHORS BUGS CODING doc/CONTRIBUTORS COPYING ChangeLog \
+ doc/DONORS Exception_to_GPL_for_Qt.txt INSTALL NEWS \
+ PROVENANCE README doc/SPONSORS TODO doc/TRANSLATORS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.server > $PKG/usr/doc/$PRGNAM-$VERSION/README.server
+
+# Move a couple of optional server files to a more appropriate place -- they
+# need to be properly customised (and the server works without them).
+if [ -d $PKG/$CGIBINDIR ]; then
+ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
+ mv $PKG/$CGIBINDIR/wms_metadata.xml $PKG/$CGIBINDIR/admin.sld \
+ $PKG/usr/doc/$PRGNAM-$VERSION/examples
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/qgis/qgis.info b/gis/qgis/qgis.info
new file mode 100644
index 0000000000..d9d238407b
--- /dev/null
+++ b/gis/qgis/qgis.info
@@ -0,0 +1,10 @@
+PRGNAM="qgis"
+VERSION="2.0.1"
+HOMEPAGE="http://qgis.org/"
+DOWNLOAD="http://qgis.org/downloads/qgis-2.0.1.tar.bz2"
+MD5SUM="3822c7dd70e2d893a0f1baa9c72316d2"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="gdal libspatialindex libspatialite numpy psycopg2 qwt"
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/qgis/slack-desc b/gis/qgis/slack-desc
new file mode 100644
index 0000000000..70cb389d78
--- /dev/null
+++ b/gis/qgis/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+qgis: qgis (Quantum GIS)
+qgis:
+qgis: Quantum GIS is a user friendly Geographic Information System.
+qgis: It lets you browse and create map data on your computer.
+qgis: Many common spatial data formats are supported (including
+qgis: PostGIS, ESRI ShapeFile and geotiff).
+qgis:
+qgis: Homepage: http://qgis.org/
+qgis:
+qgis:
+qgis: