MARMOTTA-431: added debian packaging for the webapp launcher
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/5dbe1f49 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/5dbe1f49 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/5dbe1f49 Branch: refs/heads/develop Commit: 5dbe1f49111d1304b59b379b6cbc584eb9d1bfcb Parents: 7429628 Author: Sergio Fernández <[email protected]> Authored: Mon Feb 3 08:23:37 2014 +0100 Committer: Sergio Fernández <[email protected]> Committed: Mon Feb 3 08:23:37 2014 +0100 ---------------------------------------------------------------------- launchers/marmotta-webapp/pom.xml | 57 +++++++++++++++++--- .../marmotta-webapp/src/deb/control/control | 8 +++ .../marmotta-webapp/src/deb/control/postinst | 8 +++ .../marmotta-webapp/src/deb/control/postrm | 18 +++++++ .../marmotta-webapp/src/deb/control/preinst | 5 ++ launchers/marmotta-webapp/src/deb/control/prerm | 4 ++ .../marmotta-webapp/src/deb/home/marmotta.txt | 2 + .../marmotta-webapp/src/deb/tomcat/marmotta.xml | 10 ++++ 8 files changed, 105 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/pom.xml ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml index 00e824e..84dc039 100644 --- a/launchers/marmotta-webapp/pom.xml +++ b/launchers/marmotta-webapp/pom.xml @@ -107,7 +107,6 @@ <plugin> <artifactId>maven-dependency-plugin</artifactId> </plugin> - <plugin> <groupId>org.jasig.maven</groupId> <artifactId>maven-notice-plugin</artifactId> @@ -120,6 +119,56 @@ <noticeMessage>* {0}, under {1}</noticeMessage> </configuration> </plugin> + <plugin> + <artifactId>jdeb</artifactId> + <groupId>org.vafer</groupId> + <version>1.0.1</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>jdeb</goal> + </goals> + <configuration> + <deb>${project.build.directory}/${project.artifactId}_${project.version}.deb</deb> + <controlDir>${basedir}/src/deb/control</controlDir> + <dataSet> + <data> + <src>${basedir}/src/deb/home</src> + <type>directory</type> + <mapper> + <type>perm</type> + <prefix>var/lib/marmotta</prefix> + <user>tomcat7</user> + <group>tomcat7</group> + </mapper> + </data> + <data> + <src>${project.build.directory}/${project.build.finalName}.war</src> + <type>file</type> + <mapper> + <type>perm</type> + <prefix>usr/share/marmotta</prefix> + <user>tomcat7</user> + <group>tomcat7</group> + </mapper> + </data> + <data> + <src>${basedir}/src/deb/tomcat/marmotta.xml</src> + <type>file</type> + <mapper> + <type>perm</type> + <prefix>var/lib/tomcat7/conf/Catalina/localhost</prefix> + <user>tomcat7</user> + <group>tomcat7</group> + </mapper> + </data> + </dataSet> + <verbose>false</verbose> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> @@ -160,7 +209,6 @@ </dependencies> </profile> - <profile> <id>titan-berkeleydb</id> <activation> @@ -188,7 +236,6 @@ </dependencies> </profile> - <profile> <id>titan-hbase</id> <activation> @@ -240,13 +287,9 @@ </exclusion> </exclusions> </dependency> - - - </dependencies> </profile> - <profile> <id>bigdata</id> <activation> http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/control/control ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/control/control b/launchers/marmotta-webapp/src/deb/control/control new file mode 100644 index 0000000..68c23b8 --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/control/control @@ -0,0 +1,8 @@ +Package: marmotta +Version: [[version]] +Section: java +Priority: extra +Architecture: all +Description: [[description]] +Maintainer: [email protected] +Depends: tomcat7 (>=7.0.30-1) http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/control/postinst ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/control/postinst b/launchers/marmotta-webapp/src/deb/control/postinst new file mode 100644 index 0000000..ca20fc2 --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/control/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +echo $(date) >> var/lib/marmotta/marmotta.txt + +service tomcat7 start + +exit 0 + http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/control/postrm ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/control/postrm b/launchers/marmotta-webapp/src/deb/control/postrm new file mode 100644 index 0000000..58cbe36 --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/control/postrm @@ -0,0 +1,18 @@ +#!/bin/sh + +operation="$1" + +case "$operation" in + remove) + + ;; + purge) + rm -rf /var/lib/marmotta + + ;; + *) + ;; +esac + +exit 0 + http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/control/preinst ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/control/preinst b/launchers/marmotta-webapp/src/deb/control/preinst new file mode 100644 index 0000000..b6c4e6e --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/control/preinst @@ -0,0 +1,5 @@ +#!/bin/sh + +service tomcat7 stop + +exit 0 http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/control/prerm ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/control/prerm b/launchers/marmotta-webapp/src/deb/control/prerm new file mode 100644 index 0000000..500fb1e --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/control/prerm @@ -0,0 +1,4 @@ +#!/bin/sh + +exit 0 + http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/home/marmotta.txt ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/home/marmotta.txt b/launchers/marmotta-webapp/src/deb/home/marmotta.txt new file mode 100644 index 0000000..b81bd2b --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/home/marmotta.txt @@ -0,0 +1,2 @@ +Apache Marmotta home directory +created by the debian package http://git-wip-us.apache.org/repos/asf/marmotta/blob/5dbe1f49/launchers/marmotta-webapp/src/deb/tomcat/marmotta.xml ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/src/deb/tomcat/marmotta.xml b/launchers/marmotta-webapp/src/deb/tomcat/marmotta.xml new file mode 100644 index 0000000..bfa33a3 --- /dev/null +++ b/launchers/marmotta-webapp/src/deb/tomcat/marmotta.xml @@ -0,0 +1,10 @@ +<Context docBase="/usr/share/marmotta/marmotta.war" unpackWAR="false" useNaming="true"> + + <Parameter name="marmotta.home" value="/var/lib/marmotta" override="false"/> + + <Resource name="BeanManager" auth="Container" + type="javax.enterprise.inject.spi.BeanManager" + factory="org.jboss.weld.resources.ManagerObjectFactory" + /> + +</Context>
