From 73e28dfd792db409f16f04cb4e3f9e1d093397f4 Mon Sep 17 00:00:00 2001 From: Michael Weisman Date: Wed, 19 Dec 2012 10:02:13 -0800 Subject: [PATCH] Debian packaging updates for Geonode 2.0 --- build_geonode-geoserver-ext-deb.sh | 23 +++++++++++++++++++ debian/changelog | 6 +++++ debian/control | 6 +++++ debian/geoserver-geonode-suite.postinst | 4 ++++ .../{postinst => geoserver-geonode.postinst} | 2 +- debian/mvn_settings.xml | 3 +++ debian/rules | 20 +++++++++++----- 7 files changed, 57 insertions(+), 7 deletions(-) create mode 100755 build_geonode-geoserver-ext-deb.sh create mode 100755 debian/geoserver-geonode-suite.postinst rename debian/{postinst => geoserver-geonode.postinst} (92%) create mode 100644 debian/mvn_settings.xml diff --git a/build_geonode-geoserver-ext-deb.sh b/build_geonode-geoserver-ext-deb.sh new file mode 100755 index 00000000000..47a57b0fb88 --- /dev/null +++ b/build_geonode-geoserver-ext-deb.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +DL_ROOT=/var/www/geoserver +GIT_REV=$(git log -1 --pretty=format:%h) + +debuild + +if [ -d $DL_ROOT/$GIT_REV ]; then + rm -rf $DL_ROOT/$GIT_REV +fi + +mkdir $DL_ROOT/$GIT_REV +cp ../*.deb $DL_ROOT/$GIT_REV/. +cp target/geoserver.war $DL_ROOT/$GIT_REV/. +cp target/geonode-geoserver-ext-*-geoserver-plugin.zip $DL_ROOT/$GIT_REV/. + +# Remove all but last 4 builds to stop disk from filling up +(ls -t|tail -n 3)|sort|uniq -u | xargs rm -rf + +rm -rf $DL_ROOT/latest +ln -sf $DL_ROOT/$GIT_REV $DL_ROOT/latest diff --git a/debian/changelog b/debian/changelog index 09ce870bdfa..b5bbb8a6f99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +geoserver-geonode (2.0) precise; urgency=low + + * Updates for Geonode 2.0 + + -- Michael Weisman Mon, 17 Dec 2012 11:23:45 +0800 + geoserver-geonode (0.3) precise; urgency=low * Initial release. (Closes: #1) diff --git a/debian/control b/debian/control index 755a86c9306..7159c759f6c 100755 --- a/debian/control +++ b/debian/control @@ -13,3 +13,9 @@ Depends: tomcat7 Description: High performance, standards-compliant map and geospatial data server. GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. Contains GeoNode extensions. + +Package: geoserver-geonode-suite +Architecture: all +Depends: opengeo-geoserver +Description: GeoNode extensions for The OpenGeo Suite. + diff --git a/debian/geoserver-geonode-suite.postinst b/debian/geoserver-geonode-suite.postinst new file mode 100755 index 00000000000..bc5eb132893 --- /dev/null +++ b/debian/geoserver-geonode-suite.postinst @@ -0,0 +1,4 @@ +#!/bin/bash + +# start tomcat after installing geoserver +service tomcat6 restart diff --git a/debian/postinst b/debian/geoserver-geonode.postinst similarity index 92% rename from debian/postinst rename to debian/geoserver-geonode.postinst index eac9c351e60..44fd34e5a3a 100755 --- a/debian/postinst +++ b/debian/geoserver-geonode.postinst @@ -14,7 +14,7 @@ if [ "$(grep ^GEOSERVER /etc/default/tomcat7)" == "" ]; then fi # Fix permissions on deployed jar -chown -R tomcat7:tomcat7 /usr/share/geoserver/geoserver +chown -R tomcat7:tomcat7 /usr/share/geoserver/ # start tomcat after installing geoserver service tomcat7 restart diff --git a/debian/mvn_settings.xml b/debian/mvn_settings.xml new file mode 100644 index 00000000000..c9a7264568d --- /dev/null +++ b/debian/mvn_settings.xml @@ -0,0 +1,3 @@ + + debian/.mvn/ + diff --git a/debian/rules b/debian/rules index f72d18feadc..3c5470c720f 100755 --- a/debian/rules +++ b/debian/rules @@ -11,22 +11,30 @@ %: dh $@ + +build: + # build geoserver with exts + mvn clean install -s ./debian/mvn_settings.xml + install: dh_testdir dh_testroot dh_prep dh_installdirs - # copy geoserver in /usr/share/geoserver - mkdir -p $(CURDIR)/debian/geoserver/usr/share/geoserver/ - cp -r $(CURDIR)/target/geoserver/* $(CURDIR)/debian/geoserver/usr/share/geoserver/geoserver + mkdir -p $(CURDIR)/debian/geoserver-geonode/usr/share/geoserver/ + cp -r $(CURDIR)/target/geoserver/* $(CURDIR)/debian/geoserver-geonode/usr/share/geoserver/. # configure geoserver in tomcat - mkdir -p $(CURDIR)/debian/geoserver/etc/tomcat7/Catalina/localhost - echo '' >> $(CURDIR)/debian/geoserver/etc/tomcat7/Catalina/localhost/geoserver.xml + mkdir -p $(CURDIR)/debian/geoserver-geonode/etc/tomcat7/Catalina/localhost + echo '' >> $(CURDIR)/debian/geoserver-geonode/etc/tomcat7/Catalina/localhost/geoserver.xml + + # copy geonode-ext.jar into opengeo suite geoserver + mkdir -p $(CURDIR)/debian/geoserver-geonode-suite/usr/share/opengeo-suite/geoserver/WEB-INF/lib/ + unzip $(CURDIR)/target/geonode-geoserver-ext-0.3-geoserver-plugin.zip -d $(CURDIR)/debian/geoserver-geonode-suite/usr/share/opengeo-suite/geoserver/WEB-INF/lib/ binary-indep: build install -binary-arch: build install +binary-arch: install dh_testdir dh_testroot dh_installdocs