summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <slackbuilds@jaxartes.net>2013-12-01 01:10:57 -0600
committerRobby Workman <rworkman@slackbuilds.org>2013-12-02 00:58:17 -0600
commit19d31a78a77d4a784a29d879077e093bb2143000 (patch)
treec338e628c5bd443d7303e62346a12d79c42bfbcf
parentdf6003276dbb97610898abfdc17cca119d6287d0 (diff)
downloadslackbuilds-19d31a78a77d4a784a29d879077e093bb2143000.tar.gz
academic/geoserver: Added (geospatial server)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--academic/geoserver/README20
-rw-r--r--academic/geoserver/data_dir.patch17
-rw-r--r--academic/geoserver/doinst.sh14
-rw-r--r--academic/geoserver/geoserver.SlackBuild73
-rw-r--r--academic/geoserver/geoserver.info10
-rw-r--r--academic/geoserver/geoserver.xml1
-rw-r--r--academic/geoserver/slack-desc19
7 files changed, 154 insertions, 0 deletions
diff --git a/academic/geoserver/README b/academic/geoserver/README
new file mode 100644
index 0000000000..894c0569a7
--- /dev/null
+++ b/academic/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/academic/geoserver/data_dir.patch b/academic/geoserver/data_dir.patch
new file mode 100644
index 0000000000..b1a74707e3
--- /dev/null
+++ b/academic/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/academic/geoserver/doinst.sh b/academic/geoserver/doinst.sh
new file mode 100644
index 0000000000..8c44f6584b
--- /dev/null
+++ b/academic/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/academic/geoserver/geoserver.SlackBuild b/academic/geoserver/geoserver.SlackBuild
new file mode 100644
index 0000000000..d940300254
--- /dev/null
+++ b/academic/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.2}
+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/academic/geoserver/geoserver.info b/academic/geoserver/geoserver.info
new file mode 100644
index 0000000000..222e1b728f
--- /dev/null
+++ b/academic/geoserver/geoserver.info
@@ -0,0 +1,10 @@
+PRGNAM="geoserver"
+VERSION="2.4.2"
+HOMEPAGE="http://geoserver.org"
+DOWNLOAD="http://sourceforge.net/projects/geoserver/files/GeoServer/2.4.2/geoserver-2.4.2-war.zip"
+MD5SUM="1a0eaad29f322d6afd7a4fda3c005411"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="apache-tomcat"
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="slackbuilds@jaxartes.net"
diff --git a/academic/geoserver/geoserver.xml b/academic/geoserver/geoserver.xml
new file mode 100644
index 0000000000..74fa2ce495
--- /dev/null
+++ b/academic/geoserver/geoserver.xml
@@ -0,0 +1 @@
+<Context displayName="geoserver" docBase="/usr/share/geoserver" path="/geoserver"/>
diff --git a/academic/geoserver/slack-desc b/academic/geoserver/slack-desc
new file mode 100644
index 0000000000..7780bc7bd7
--- /dev/null
+++ b/academic/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: