summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Berman <tberman@gentoo.org>2003-04-27 19:08:24 +0000
committerTodd Berman <tberman@gentoo.org>2003-04-27 19:08:24 +0000
commit787bffd2353166dc0f16239d983181377db408a9 (patch)
tree7957120fac0832474a5079bb25d59ff3843f5da3 /dev-java/snipsnap
parentInitial Import. (diff)
downloadhistorical-787bffd2353166dc0f16239d983181377db408a9.tar.gz
historical-787bffd2353166dc0f16239d983181377db408a9.tar.bz2
historical-787bffd2353166dc0f16239d983181377db408a9.zip
Initial Import.
Diffstat (limited to 'dev-java/snipsnap')
-rw-r--r--dev-java/snipsnap/Manifest6
-rw-r--r--dev-java/snipsnap/files/0.4.2a-run.sh55
-rw-r--r--dev-java/snipsnap/files/0.4.2a-snipsnap23
-rw-r--r--dev-java/snipsnap/files/digest-snipsnap-0.4.2a1
-rw-r--r--dev-java/snipsnap/snipsnap-0.4.2a.ebuild22
5 files changed, 104 insertions, 3 deletions
diff --git a/dev-java/snipsnap/Manifest b/dev-java/snipsnap/Manifest
index 7c0dbe001f18..5c35e1ce83c5 100644
--- a/dev-java/snipsnap/Manifest
+++ b/dev-java/snipsnap/Manifest
@@ -1,5 +1,5 @@
-MD5 5fc5a828dce7c28dd22385c92d34b042 snipsnap-0.4.2a.ebuild 540
-MD5 92d7ca720186c55bf7f8ebfae1d30a88 ChangeLog 249
-MD5 21bced9d53352c5ec4e537e13cccfb7b files/0.4.2a-snipsnap 471
+MD5 241944699c5b29e44e8977d0a462ea02 snipsnap-0.4.2a.ebuild 644
+MD5 98494be17456655e52694d45a460df03 ChangeLog 340
+MD5 4d8b0ea326d50c548a8c6f325d3dc992 files/0.4.2a-snipsnap 576
MD5 36af28823473d41a150d20fbceba3ba0 files/digest-snipsnap-0.4.2a 74
MD5 0a1abd3a75a98c94389512eb4bd9a1ea files/0.4.2a-run.sh 1844
diff --git a/dev-java/snipsnap/files/0.4.2a-run.sh b/dev-java/snipsnap/files/0.4.2a-run.sh
new file mode 100644
index 000000000000..24340f9e3fec
--- /dev/null
+++ b/dev-java/snipsnap/files/0.4.2a-run.sh
@@ -0,0 +1,55 @@
+#! /bin/sh
+
+base=/opt/snipsnap
+jar=$base/lib
+
+if [ -f $HOME/.gentoo/java-env ] ; then
+ source $HOME/.gentoo/java-env
+else
+ JAVA_HOME=`java-config --jdk-home`
+ if [ -z $JAVA_HOME ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "Please set JAVA_HOME environment variable!"
+ echo "A Java SDK of at least version 1.3 is required!"
+ exit
+fi
+
+# check whether the java compiler is available
+if [ ! -f $JAVA_HOME/lib/tools.jar -a ! -f /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar ]; then
+ echo "$JAVA_HOME/lib/tools.jar or MacOS X pendant not found, cannot compile jsp files"
+ echo "Make sure tools.jar or similar from the Java SDK is in the classpath!"
+ exit
+else
+ if [ -f /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar ]; then
+ TOOLS=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
+ else
+ TOOLS=$JAVA_HOME/lib/tools.jar
+ fi
+fi
+
+if [ ! -f $jar/snipsnap.jar ]; then
+ echo "$jar/snipsnap.jar missing, please compile application first"
+ exit
+fi
+
+# put classpath together (this is a script-local variable)
+CLASSPATH=$jar/org.mortbay.jetty.jar:$jar/javax.servlet.jar:$jar/org.apache.crimson.jar:$jar/org.apache.jasper.jar:$jar/jdbcpool.jar:$jar/mckoidb.jar:$TOOLS
+
+if [ "$1" = "admin" ]; then
+ $JAVA_HOME/bin/java -cp $CLASSPATH:$jar/snipsnap.jar org.snipsnap.server.AppServer -admin "$2" "$3"
+ exit
+fi
+
+if [ "$1" = "-debug" ]; then
+ DBG="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000"
+fi
+
+# execute application server
+[ -f $base/server.log ] && mv $base/server.log $base/server.log.old
+cd $base
+$JAVA_HOME/bin/java -server $DBG -cp $CLASSPATH:$jar/snipsnap.jar -Duser.dir=$base org.snipsnap.server.AppServer $cmdline > $base/server.log 2>&1 &
+echo "$!" > /var/run/snipsnap.pid
diff --git a/dev-java/snipsnap/files/0.4.2a-snipsnap b/dev-java/snipsnap/files/0.4.2a-snipsnap
new file mode 100644
index 000000000000..c0e8bdb9ebb8
--- /dev/null
+++ b/dev-java/snipsnap/files/0.4.2a-snipsnap
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/snipsnap/files/0.4.2a-snipsnap,v 1.1 2003/04/27 19:08:18 tberman Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting snipsnap"
+ start-stop-daemon -o --quiet --start --startas /opt/snipsnap/run.sh \
+ --pidfile /var/run/snipsnap.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping snipsnap"
+ start-stop-daemon -o --quiet --stop --pidfile /var/run/snipsnap.pid
+ rm /var/run/snipsnap.pid
+ eend $?
+}
+
diff --git a/dev-java/snipsnap/files/digest-snipsnap-0.4.2a b/dev-java/snipsnap/files/digest-snipsnap-0.4.2a
new file mode 100644
index 000000000000..b40d321bf135
--- /dev/null
+++ b/dev-java/snipsnap/files/digest-snipsnap-0.4.2a
@@ -0,0 +1 @@
+MD5 9483948e906b108e74cc321ba815e94a snipsnap-0.4.2a-20030326.tgz 8585100
diff --git a/dev-java/snipsnap/snipsnap-0.4.2a.ebuild b/dev-java/snipsnap/snipsnap-0.4.2a.ebuild
new file mode 100644
index 000000000000..484447f6b812
--- /dev/null
+++ b/dev-java/snipsnap/snipsnap-0.4.2a.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/snipsnap/snipsnap-0.4.2a.ebuild,v 1.1 2003/04/27 19:08:18 tberman Exp $
+
+DESCRIPTION="A blog/wiki personal content management system"
+HOMEPAGE="http://snipsnap.org"
+SRC_URI="mirror://sourceforge/${PN}/${P}-20030326.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND=">=virtual/jre-1.3"
+
+src_install() {
+ dodir /opt/${PN}
+ cp -pR * ${D}/opt/${PN}
+
+ exeinto /opt/${PN}
+ newexe ${FILESDIR}/${PV}-run.sh run.sh
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/${PV}-snipsnap snipsnap
+}