Commit 08598ab6 authored by shake's avatar shake
Browse files

Debian packaging files

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@174 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent 76e8799e
......@@ -14,7 +14,7 @@
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
<netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
</properties>
<build>
......@@ -42,6 +42,41 @@
</webResources>
</configuration>
</plugin>
<!-- debian package made easy -->
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>0.11</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<controlDir>${basedir}/src/main/deb/control</controlDir>
<dataSet>
<data>
<src>${project.build.directory}/${project.build.finalName}.war</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/var/lib/tomcat6/webapps</prefix>
</mapper>
</data>
<data>
<src>${basedir}/src/main/sql/ace-am.sql</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/tmp</prefix>
</mapper>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
......@@ -131,6 +166,11 @@
<artifactId>commons-fileupload</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
......@@ -192,16 +232,16 @@
</dependency> -->
<!-- web services -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>edu.umiacs.ace</groupId>
<artifactId>ace-ims-ws</artifactId>
......@@ -209,7 +249,7 @@
<type>jar</type>
</dependency>
</dependencies>
</project>
</project>
#!/bin/sh -e
. /usr/share/debconf/confmodule
echo "Config script initializing"
db_input high ace-am/mysql_root_pass || true
db_go
db_stop
Package: ace-am
Version: 1.7.1-SNAPSHOT
Section: misc
Priority: extra
Architecture: all
Depends: mysql-server, tomcat6, debconf (>= 0.5)
Maintainer: shake <shake@umiacs.umd.edu>
Description: Audit Control Environment
Distribution: development
#!/bin/sh -e
. /usr/share/debconf/confmodule
echo "Postinst called with $1"
db_version 2.0
ACE_USER="aceam"
ACE_PASS="ace"
db_get ace-am/mysql_root_pass && MYSQL_PASS="$RET" || MYSQL_PASS=""
# Probably don't want to drop if exists, so this will probably be changed later
case "$1" in
configure)
MYSQL_USER="root"
echo "Setting up ace-am database with user $ACE_USER and password $ACE_PASS"
COMMAND="mysql -u $MYSQL_USER"
[ -n "$MYSQL_PASS" ] && COMMAND="$COMMAND -p$MYSQL_PASS"
echo "$COMMAND"
eval $COMMAND << eof
DROP DATABASE IF EXISTS aceam;
create database aceam;
grant all on aceam.* to '$ACE_USER'@'localhost' identified by '$ACE_PASS';
use aceam;
source /tmp/ace-am.sql;
eof
;;
esac
if [ -x "/etc/init.d/tomcat6" ]; then
invoke-rc.d tomcat6 start || true
fi
# Remove the mysql pass from debconf
echo PURGE | debconf-communicate ace-am
#!/bin/sh -e
. /usr/share/debconf/confmodule
# Not sure if we really need this, but it can't hurt
if [ "$1" = "purge" -a -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
if [ -x "/etc/init.d/tomcat6" ]; then
invoke-rc.d tomcat6 start || true
fi
echo "Note: The ace-am database and jdbc connector symlink have not been "
echo " removed. If you do not want them, please remove them manually"
#!/bin/sh -e
. /usr/share/debconf/confmodule
# Create a symlink for the jdbc lib in tomcat
if [ ! -e "/usr/share/tomcat6/lib/mysql-connector-java.jar" ]; then
echo "Creating symlink for jdbc connector in /usr/share/tomcat6/lib"
ln -s /usr/share/java/mysql-connector-java.jar /usr/share/tomcat6/lib/mysql-connector-java.jar
fi
# Check tomcat/mysql services so that our install doesn't break
if [ -x "/etc/init.d/tomcat6" ]; then
invoke-rc.d tomcat6 stop || true
fi
MYSQL_CHECK=`service mysql status | grep start | wc -l`
if [ $MYSQL_CHECK -eq 0 ]; then
invoke-rc.d mysql start || true
fi
#!/bin/sh -e
. /usr/share/debconf/confmodule
if [ -x "/etc/init.d/tomcat6" ]; then
invoke-rc.d tomcat6 stop || true
fi
Template: ace-am/mysql_root_pass
Type: password
Description: Enter your MySQL Admin Password:
Template: ace-am/username
Type: string
Default: aceam
Description: MySQL name to connect with to create the database.
Template: ace-am/pass
Type: password
Default: ace
Description: Password to connect with.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment