diff options
Diffstat (limited to 'gis/geoserver')
-rw-r--r-- | gis/geoserver/README | 20 | ||||
-rw-r--r-- | gis/geoserver/data_dir.patch | 17 | ||||
-rw-r--r-- | gis/geoserver/doinst.sh | 14 | ||||
-rw-r--r-- | gis/geoserver/geoserver.SlackBuild | 73 | ||||
-rw-r--r-- | gis/geoserver/geoserver.info | 10 | ||||
-rw-r--r-- | gis/geoserver/geoserver.xml | 1 | ||||
-rw-r--r-- | gis/geoserver/slack-desc | 19 |
7 files changed, 154 insertions, 0 deletions
diff --git a/gis/geoserver/README b/gis/geoserver/README new file mode 100644 index 0000000000..894c0569a7 --- /dev/null +++ b/gis/geoserver/README @@ -0,0 +1,20 @@ +GeoServer is a Java-base server that allows users to publish and edit +geospatial data using open standards. + +GeoServer is the reference implementation of the Open Geospatial Consortium's +Web Feature Service (WFS) and Web Coverage Service (WCS) standards, as well as +a high-performance Web Map Service (WMS). Additional functionality is available +through the use of plugins. + +This SlackBuild will install GeoServer as a web application for a Tomcat +servlet container. The SlackBuild will not overwrite any geoserver.war file +that has been deployed using /var/lib/tomcat/webapps, but by default they will +both be using the same /geoserver web path. This path can be changed from its +default by editing /etc/tomcat/Catalina/localhost/geoserver.xml. + +The SlackBuild will create a data directory for GeoServer at /var/lib/geoserver +but will not add any content, meaning that uninstalls, reinstalls, and upgrades +will not affect existing data directories. Nevertheless, the data directory +should still always be backed up prior to an upgrade. An empty data directory +will be populated by a minimal set of configuration files when GeoServer is +started for the first time. diff --git a/gis/geoserver/data_dir.patch b/gis/geoserver/data_dir.patch new file mode 100644 index 0000000000..b1a74707e3 --- /dev/null +++ b/gis/geoserver/data_dir.patch @@ -0,0 +1,17 @@ +diff -Nur WEB-INF.orig/web.xml WEB-INF/web.xml +--- WEB-INF.orig/web.xml 2013-11-06 23:08:11.384791737 -0800 ++++ WEB-INF/web.xml 2013-11-06 23:05:56.599793825 -0800 +@@ -47,12 +47,10 @@ + </context-param> + --> + +- <!-- + <context-param> + <param-name>GEOSERVER_DATA_DIR</param-name> +- <param-value>C:\eclipse\workspace\geoserver_trunk\cite\confCiteWFSPostGIS</param-value> ++ <param-value>/var/lib/geoserver</param-value> + </context-param> +- --> + + <!-- pick up all spring application contexts --> + <context-param> diff --git a/gis/geoserver/doinst.sh b/gis/geoserver/doinst.sh new file mode 100644 index 0000000000..8c44f6584b --- /dev/null +++ b/gis/geoserver/doinst.sh @@ -0,0 +1,14 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/tomcat/Catalina/localhost/geoserver.xml.new diff --git a/gis/geoserver/geoserver.SlackBuild b/gis/geoserver/geoserver.SlackBuild new file mode 100644 index 0000000000..87e41d33c6 --- /dev/null +++ b/gis/geoserver/geoserver.SlackBuild @@ -0,0 +1,73 @@ +#!/bin/sh + +# SlackBuild script for geoserver + +# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# 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=geoserver +VERSION=${VERSION:-2.4.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +rm -rf $TMP/$PRGNAM-$VERSION +cd $TMP +mkdir $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +unzip $CWD/$PRGNAM-$VERSION-war.zip +jar xvf $TMP/$PRGNAM-$VERSION/geoserver.war + +# patch web.xml so that it points to our custom data directory in /var/lib/geoserver +patch -p0 --verbose < $CWD/data_dir.patch + +# install the war components +mkdir -p $PKG/usr/share/geoserver +cp -r index.html META-INF WEB-INF $PKG/usr/share/geoserver + +# set up the deploy for tomcat +mkdir -p $PKG/etc/tomcat/Catalina/localhost +cp $CWD/geoserver.xml $PKG/etc/tomcat/Catalina/localhost/geoserver.xml.new + +# create an empty data directory owned by the tomcat user +mkdir -p $PKG/var/lib/geoserver +chown -R tomcat.tomcat $PKG/var/lib/geoserver +chmod 700 $PKG/var/lib/geoserver + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a GPL.txt LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir $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/geoserver/geoserver.info b/gis/geoserver/geoserver.info new file mode 100644 index 0000000000..71c7fe3cc2 --- /dev/null +++ b/gis/geoserver/geoserver.info @@ -0,0 +1,10 @@ +PRGNAM="geoserver" +VERSION="2.4.4" +HOMEPAGE="http://geoserver.org" +DOWNLOAD="http://sourceforge.net/projects/geoserver/files/GeoServer/2.4.4/geoserver-2.4.4-war.zip" +MD5SUM="e2e5e0f4fa37f5e756c514e529628514" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="apache-tomcat" +MAINTAINER="Benjamin Trigona-Harany" +EMAIL="slackbuilds@jaxartes.net" diff --git a/gis/geoserver/geoserver.xml b/gis/geoserver/geoserver.xml new file mode 100644 index 0000000000..74fa2ce495 --- /dev/null +++ b/gis/geoserver/geoserver.xml @@ -0,0 +1 @@ +<Context displayName="geoserver" docBase="/usr/share/geoserver" path="/geoserver"/> diff --git a/gis/geoserver/slack-desc b/gis/geoserver/slack-desc new file mode 100644 index 0000000000..7780bc7bd7 --- /dev/null +++ b/gis/geoserver/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------------------------------------------------------| +geoserver: geoserver (geospatial server) +geoserver: +geoserver: GeoServer is a Java server for publishing geospatial data using the +geoserver: Open Geospatial Consortium's Web Feature Service, Web Map Service and +geoserver: Web Coverage Service standards. +geoserver: +geoserver: Homepage: http://geoserver.org +geoserver: +geoserver: +geoserver: +geoserver: |