Added .gitignore file and debian directory

This commit is contained in:
Tobi Schäfer 2012-03-22 18:21:29 +01:00
parent a094f59a28
commit 964fcc1e54
19 changed files with 505 additions and 0 deletions

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
.*
apps
db/*
lib/ext
modules/
server.properties

6
debian/README.Debian vendored Normal file
View file

@ -0,0 +1,6 @@
Helma for Debian
----------------
<possible notes regarding this package - if none, delete this file>
-- Hannes Wallnoefer <hannes@helma.at> Mon, 15 Dec 2008 11:04:41 +0100

34
debian/changelog vendored Normal file
View file

@ -0,0 +1,34 @@
helma1 (1.7.0-1) intrepid; urgency=low
* Update to final 1.7.0 release
-- Hannes Wallnoefer <hannes@helma.at> Tue, 29 Sep 2009 10:12:35 +0200
helma1 (1.7.0-rc3-2) intrepid; urgency=low
* Update build number to please launchpad build bots
-- Hannes Wallnoefer <hannes@helma.at> Fri, 11 Sep 2009 16:15:46 +0200
helma1 (1.7.0-rc3-1) intrepid; urgency=low
* Update to 1.7.0 release candidate 3
* Add package for HelmaSwarm
-- Hannes Wallnoefer <hannes@helma.at> Thu, 10 Sep 2009 16:43:12 +0200
helma1 (1.7+r9436-1) intrepid; urgency=low
* Change java dependencies to include more options
* Move properties files to /etc/helma1/ so they are not overwritten
on updates. (Still have to figure out how to prompt the user for
how to handle modified files.)
-- Hannes Wallnoefer <hannes@helma.at> Wed, 17 Dec 2008 11:00:00 +0100
helma1 (1.7+r9436) intrepid; urgency=low
* Initial release
-- Hannes Wallnoefer <hannes@helma.at> Tue, 16 Dec 2008 11:00:00 +0100

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
7

46
debian/control vendored Normal file
View file

@ -0,0 +1,46 @@
Source: helma1
Section: web
Priority: optional
Maintainer: Hannes Wallnoefer <hannes@helma.at>
Build-Depends: debhelper (>= 7), default-jdk, cdbs
Build-Depends-Indep: ant
Standards-Version: 3.7.3
Homepage: http://www.helma.org/
Package: helma1
Architecture: all
Depends: default-jre-headless | java2-runtime-headless |
java5-runtime-headless | sun-java5-jre | system-java,
jsvc, adduser, lsb-base (>= 3)
Description: A server-side JavaScript web application framework.
.
Helma is an open-source JavaScript framework written in Java.
It uses the Mozilla Rhino JavaScript engine to provide
a comprehensive framework for web application development.
Package: helma1-swarm
Section: web
Architecture: all
Depends: helma1 (>= ${source:Version})
Description: A cluster extension for the Helma web framework.
.
Helma is an open-source JavaScript framework written in Java.
It uses the Mozilla Rhino JavaScript engine to provide
a comprehensive framework for web application development.
.
This package contains HelmaSwarm, a cluster extension based
on JGroups.
Package: helma1-docs
Section: doc
Architecture: all
Depends: helma1 (>= ${source:Version})
Description: Online documentation for the Helma web framework.
.
Helma is an open-source JavaScript framework written in Java.
It uses the Mozilla Rhino JavaScript engine to provide
a comprehensive framework for web application development.
.
This package contains the online documentation, including Java
and JavaScript API documentation.

62
debian/copyright vendored Normal file
View file

@ -0,0 +1,62 @@
This package was debianized by Hannes Wallnoefer <hannes@helma.at> on
Mon, 15 Dec 2008 11:04:41 +0100.
It was downloaded from http://www.helma.org/
Upstream Authors:
Hannes Wallnoefer
Robert Gaggl
Daniel Rutharth
Stefan Pollach
Tobias Schaefer
Manfred Andres
Juerg Lehni
Copyright: 1999-2008 Helma Project. All rights reserved.
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Products derived from this software may not be called "Helma"
or "Hop", nor may "Helma" or "Hop" appear in their name, without
prior written permission of the Helma Project Group. For written
permission, please contact helma@helma.org.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 HELMA PROJECT OR ITS
CONTRIBUTORS 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.
Helma includes third party software released under different specific
license terms. See the licenses directory in the Helma distribution
for a list of these licenses.
The Debian packaging is (C) 2008, Hannes Wallnoefer <hannes@helma.at> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
Parts of Helma come with different licenses, see /usr/share/helma/licenses
for details.

2
debian/dirs vendored Normal file
View file

@ -0,0 +1,2 @@
usr/bin
usr/sbin

3
debian/helma1-docs.install vendored Normal file
View file

@ -0,0 +1,3 @@
docs/api/ /usr/share/doc/helma1/api/
docs/framework/ /usr/share/doc/helma1/framework/

1
debian/helma1-swarm.docs vendored Normal file
View file

@ -0,0 +1 @@
helmaswarm/README.txt

3
debian/helma1-swarm.install vendored Normal file
View file

@ -0,0 +1,3 @@
helmaswarm/lib/*.jar /usr/share/helma1/lib/ext/
helmaswarm/swarm.conf /etc/helma1/

18
debian/helma1.default vendored Normal file
View file

@ -0,0 +1,18 @@
# Run Helma as this user ID. Not setting this or leaving it blank will use the
# default of helma1.
#HELMA_USER=helma1
# The home directory of the Java development kit (JDK). You need at least
# JDK version 1.5. If JAVA_HOME is not set, some common directories for
# OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried.
#JAVA_HOME=/usr/lib/jvm/java-6-openjdk
# Directory for per-instance configuration files and webapps. It contains the
# directories conf, logs, webapps, work and temp. See RUNNING.txt for details.
# Default: /var/lib/helma1
#HELMA_BASE=/var/lib/helma1
# Arguments to pass to the Java virtual machine (JVM).
#JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"

5
debian/helma1.dirs vendored Normal file
View file

@ -0,0 +1,5 @@
var/log/helma1
var/lib/helma1/apps
var/lib/helma1/db
etc/helma1

2
debian/helma1.docs vendored Normal file
View file

@ -0,0 +1,2 @@
license.txt
README.txt

191
debian/helma1.init vendored Normal file
View file

@ -0,0 +1,191 @@
#!/bin/sh
#
# /etc/init.d/helma1 -- startup script for the Helma web framework
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Tomcat by Stefan Gybas <sgybas@debian.org>.
# Modified for Tomcat6 by Thierry Carrez <thierry.carrez@ubuntu.com>.
# Modified for Helma by Hannes Wallnoefer <hannes@helma.at>.
#
### BEGIN INIT INFO
# Provides: helma1
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Start Helma web application framework.
# Description: Start Helma web application framework.
### END INIT INFO
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NAME=helma1
DESC="Helma web application framework"
DAEMON=/usr/bin/jsvc
HELMA_HOME=/usr/share/$NAME
DEFAULT=/etc/default/$NAME
if [ `id -u` -ne 0 ]; then
echo "You need root privileges to run this script"
exit 1
fi
# Make sure helma is started with system locale
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG
fi
. /lib/lsb/init-functions
. /etc/default/rcS
# The following variables can be overwritten in $DEFAULT
# Run Helma as this user ID
HELMA_USER=helma1
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
# Look for the right JVM to use
for jdir in $JDK_DIRS; do
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
JAVA_HOME="$jdir"
fi
done
export JAVA_HOME
# Directory for per-instance configuration files and webapps
HELMA_BASE=/var/lib/$NAME
# Default Java options
# Set java.awt.headless=true if JAVA_OPTS is not set so the
# Xalan XSL transformer can work without X11 display on JDK 1.4+
# It also looks like the default heap size of 64M is not enough for most cases
# so the maximum heap size is set to 128M
if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
fi
# End of variables that can be overwritten in $DEFAULT
# overwrite settings from default file
if [ -f "$DEFAULT" ]; then
. "$DEFAULT"
fi
if [ ! -f "$HELMA_HOME/launcher.jar" ]; then
log_failure_msg "$NAME is not installed"
exit 1
fi
if [ ! -f "$DAEMON" ]; then
log_failure_msg "missing $DAEMON"
exit 1
fi
# Set juli LogManager if logging.properties is provided
if [ -r "$HELMA_BASE"/logging.properties ]; then
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$HELMA_BASE/logging.properties"
fi
# Define other required variables
HELMA_PID="/var/run/$NAME.pid"
BOOTSTRAP_CLASS=helma.main.launcher.Main
JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$HELMA_HOME/launcher.jar"
case "$1" in
start)
if [ -z "$JAVA_HOME" ]; then
log_failure_msg "no JDK found - please set JAVA_HOME"
exit 1
fi
if [ ! -d "$HELMA_BASE" ]; then
log_failure_msg "invalid HELMA_BASE: $HELMA_BASE"
exit 1
fi
log_daemon_msg "Starting $DESC" "$NAME"
if start-stop-daemon --test --start --pidfile "$HELMA_PID" \
--user $HELMA_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
cd "$HELMA_BASE"
$DAEMON -user "$HELMA_USER" -cp "$JSVC_CLASSPATH" \
-outfile SYSLOG -errfile SYSLOG \
-pidfile "$HELMA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS" \
-h "$HELMA_BASE"
sleep 1
if start-stop-daemon --test --start --pidfile "$HELMA_PID" \
--user $HELMA_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
log_end_msg 1
else
log_end_msg 0
fi
else
log_progress_msg "(already running)"
log_end_msg 0
fi
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
if start-stop-daemon --test --start --pidfile "$HELMA_PID" \
--user "$HELMA_USER" --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
log_progress_msg "(not running)"
else
$DAEMON -cp "$JSVC_CLASSPATH" -pidfile "$HELMA_PID" \
-stop "$BOOTSTRAP_CLASS"
fi
log_end_msg 0
;;
status)
if start-stop-daemon --test --start --pidfile "$HELMA_PID" \
--user $HELMA_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
if [ -f "$HELMA_PID" ]; then
log_success_msg "$DESC is not running, but pid file exists."
exit 1
else
log_success_msg "$DESC is not running."
exit 3
fi
else
log_success_msg "$DESC is running with pid `cat $HELMA_PID`"
fi
;;
restart|force-reload)
if start-stop-daemon --test --stop --pidfile "$HELMA_PID" \
--user $HELMA_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
$0 stop
sleep 1
fi
$0 start
;;
try-restart)
if start-stop-daemon --test --start --pidfile "$HELMA_PID" \
--user $HELMA_USER --startas "$JAVA_HOME/bin/java" \
>/dev/null; then
$0 start
fi
;;
*)
log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
exit 1
;;
esac
exit 0

7
debian/helma1.install vendored Normal file
View file

@ -0,0 +1,7 @@
launcher.jar /usr/share/helma1/
lib/*.jar /usr/share/helma1/lib/
licenses/ /usr/share/helma1/licenses/
build/main/*.properties /etc/helma1/
build/externals/modules/ /var/lib/helma1/
build/externals/welcome/ /var/lib/helma1/apps/
build/externals/manage/ /var/lib/helma1/apps/

5
debian/helma1.links vendored Normal file
View file

@ -0,0 +1,5 @@
/var/log/helma1 /var/lib/helma1/log
/etc/helma1/apps.properties /var/lib/helma1/apps.properties
/etc/helma1/server.properties /var/lib/helma1/server.properties
/etc/helma1/db.properties /var/lib/helma1/db.properties

49
debian/helma1.postinst vendored Normal file
View file

@ -0,0 +1,49 @@
#!/bin/sh
# postinst script for helma1
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
if ! id helma1 > /dev/null 2>&1 ; then
adduser --system --home /usr/share/helma1 --no-create-home \
--group --disabled-password --shell /bin/false \
helma1
fi
chown -R helma1:adm /var/lib/helma1
chown -R helma1:adm /var/log/helma1
chmod 750 /var/log/helma1
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

24
debian/patches/01_build_helmaswarm.diff vendored Normal file
View file

@ -0,0 +1,24 @@
--- helma-clean/build.xml 2009-09-11 14:50:36.000000000 +0200
+++ helma/build.xml 2009-09-11 15:00:23.000000000 +0200
@@ -481,4 +481,14 @@
</delete>
</target>
+ <!-- Build helmaswarm jar file -->
+ <target name="swarm-jar">
+ <ant dir="helmaswarm" antfile="build.xml" target="jar" inheritAll="false"/>
+ </target>
+
+ <!-- Clean up helmaswarm -->
+ <target name="swarm-clean">
+ <ant dir="helmaswarm" antfile="build.xml" target="clean" inheritAll="false"/>
+ </target>
+
</project>
--- helma-clean/helmaswarm/build.properties 2009-09-11 19:47:13.000000000 +0200
+++ helma/helmaswarm/build.properties 2009-09-11 19:50:29.000000000 +0200
@@ -1,3 +1,3 @@
# build properties for helmaswarm
-helma.install.dir=../helma
+helma.install.dir=../

40
debian/rules vendored Executable file
View file

@ -0,0 +1,40 @@
#!/usr/bin/make -f
# debian/rules for helma1 (uses CDBS)
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk
#include /usr/share/cdbs/1/rules/dpatch.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
JAVA_HOME := /usr/lib/jvm/default-java
DEB_ANT_BUILD_TARGET := jar javadocs jsdocs package-apps swarm-jar
DEB_ANT_CLEAN_TARGET := clean swarm-clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
binary-indep: build install
dh_testdir
dh_testroot
dh_installinit --error-handler=true -- start 90 2 3 4 5 . stop 10 1 .
dh_install --exclude=.bat
dh_installdocs
dh_installdebconf
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: build install
binary: binary-indep binary-arch