summaryrefslogtreecommitdiff
path: root/academic/qgis/qgis.SlackBuild
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2011-08-03 17:33:31 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2011-08-03 17:33:31 -0300
commit7cd2c647393d1c4a54ff3787f22dc71473a429ac (patch)
tree72ec62dd2d88f6877b4837ed0412ebbd073562aa /academic/qgis/qgis.SlackBuild
parent4e9754fce2dfd21d37f6e360eab75df911a28665 (diff)
downloadslackbuilds-7cd2c647393d1c4a54ff3787f22dc71473a429ac.tar.gz
academic/qgis: Updated for version 1.7.0.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'academic/qgis/qgis.SlackBuild')
-rw-r--r--academic/qgis/qgis.SlackBuild46
1 files changed, 39 insertions, 7 deletions
diff --git a/academic/qgis/qgis.SlackBuild b/academic/qgis/qgis.SlackBuild
index d9e6ebaecc..7cc73c5b60 100644
--- a/academic/qgis/qgis.SlackBuild
+++ b/academic/qgis/qgis.SlackBuild
@@ -1,11 +1,28 @@
#!/bin/sh
# Slackware build script for Quantum GIS
-# Written by David Spencer <baildon.research@googlemail.com>
-# This script is dedicated to the public domain
+# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
+# 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:-1.6.0}
+VERSION=${VERSION:-1.7.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -56,14 +73,21 @@ 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 \
- -DWITH_MAPSERVER=FALSE \
+ $WITHSERVER \
$WITHGRASS
make
@@ -81,12 +105,20 @@ install -D -m 0644 $CWD/$PRGNAM.png \
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS BUGS CODING CONTRIBUTORS COPYING ChangeLog \
- DONORS Exception_to_GPL_for_Qt.txt INSTALL \
- PROVENANCE README SPONSORS TODO TRANSLATORS \
+ doc/AUTHORS BUGS CODING doc/CONTRIBUTORS COPYING ChangeLog \
+ doc/DONORS Exception_to_GPL_for_Qt.txt INSTALL \
+ PROVENANCE README doc/SPONSORS TODO doc/TRANSLATORS \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 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