Skip to content

Commit

Permalink
Merge pull request #1 from mweisman/deb
Browse files Browse the repository at this point in the history
Debian packaging updates for Geonode 2.0
  • Loading branch information
Jeffrey Johnson committed Dec 19, 2012
2 parents 442672d + 73e28df commit 6f79232
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 7 deletions.
23 changes: 23 additions & 0 deletions build_geonode-geoserver-ext-deb.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
geoserver-geonode (2.0) precise; urgency=low

* Updates for Geonode 2.0

-- Michael Weisman <mweisman@opengeo.org> Mon, 17 Dec 2012 11:23:45 +0800

geoserver-geonode (0.3) precise; urgency=low

* Initial release. (Closes: #1)
Expand Down
6 changes: 6 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -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.

4 changes: 4 additions & 0 deletions debian/geoserver-geonode-suite.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# start tomcat after installing geoserver
service tomcat6 restart
2 changes: 1 addition & 1 deletion debian/postinst → debian/geoserver-geonode.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions debian/mvn_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<settings>
<localRepository>debian/.mvn/</localRepository>
</settings>
20 changes: 14 additions & 6 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<Context path="/geoserver" docBase="/usr/share/geoserver/geoserver" />' >> $(CURDIR)/debian/geoserver/etc/tomcat7/Catalina/localhost/geoserver.xml
mkdir -p $(CURDIR)/debian/geoserver-geonode/etc/tomcat7/Catalina/localhost
echo '<Context path="/geoserver" docBase="/usr/share/geoserver/" />' >> $(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
Expand Down

0 comments on commit 6f79232

Please sign in to comment.