diff options
| author | Aaron Dalton <aaron@FreeBSD.org> | 2006-06-02 23:40:27 +0000 |
|---|---|---|
| committer | Aaron Dalton <aaron@FreeBSD.org> | 2006-06-02 23:40:27 +0000 |
| commit | f2b7c59aa2a2aafc226eecc3cf7c1d66c34d1909 (patch) | |
| tree | 3029b696aa3ebbde8ae92097da04ffe4f4c0889e /devel/p5-Java/files | |
| parent | - change mirror (diff) | |
Add p5-Java 4.7, perl extension for accessing a JVM remotely or locally.
PR: ports/92566
Submitted by: Simun Mikecin <numisemis@yahoo.com>
Approved by: tobez (implicit)
Notes
Notes:
svn path=/head/; revision=164246
Diffstat (limited to 'devel/p5-Java/files')
| -rw-r--r-- | devel/p5-Java/files/javaserver.sh.in | 51 | ||||
| -rw-r--r-- | devel/p5-Java/files/patch-MANIFEST | 10 | ||||
| -rw-r--r-- | devel/p5-Java/files/patch-Makefile.PL | 10 |
3 files changed, 71 insertions, 0 deletions
diff --git a/devel/p5-Java/files/javaserver.sh.in b/devel/p5-Java/files/javaserver.sh.in new file mode 100644 index 000000000000..5157c42acf38 --- /dev/null +++ b/devel/p5-Java/files/javaserver.sh.in @@ -0,0 +1,51 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: javaserver +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable javaserver: +# javaserver_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable apache22 +# javaserver_classpath (str): Set to "" by default. +# Define your classpath here. +# javaserver_user (str): Set to "nobody" by default. +# Define owner of the javaserver process. + +. %%RC_SUBR%% + +name="javaserver" +rcvar=`set_rcvar` + +load_rc_config $name + +start_cmd="${name}_start" +stop_cmd="${name}_stop" +pidfile="/var/run/${name}.pid" +classpath="%%PREFIX%%"/share/p5-Java/JavaServer.jar + +[ -z "$javaserver_classpath" ] || classpath="${javaserver_classpath}":$classpath +[ -z "$javaserver_enable" ] && javaserver_enable="NO" +[ -z "$javaserver_user" ] && javaserver_user="nobody" + +javaserver_start() +{ + su -m ${javaserver_user} -c "nohup %%PREFIX%%/bin/java -cp ${classpath} com.zzo.javaserver.JavaServer >/dev/null & ; echo \$! " | tail -1 > ${pidfile} +} + +javaserver_stop() +{ + if [ -f ${pidfile} ]; then + rc_pid=`cat ${pidfile}` + kill -TERM $rc_pid + wait_for_pids $rc_pid + rm ${pidfile} + fi +} + +run_rc_command "$1" diff --git a/devel/p5-Java/files/patch-MANIFEST b/devel/p5-Java/files/patch-MANIFEST new file mode 100644 index 000000000000..72dceb82d9e8 --- /dev/null +++ b/devel/p5-Java/files/patch-MANIFEST @@ -0,0 +1,10 @@ +--- MANIFEST.orig Sat Jan 28 13:53:39 2006 ++++ MANIFEST Sat Jan 28 13:53:39 2006 +@@ -6,7 +6,6 @@ + Makefile.PL + README + TODO +-java_server_install.pl + test.pl + examples/array.pl + examples/byte.pl diff --git a/devel/p5-Java/files/patch-Makefile.PL b/devel/p5-Java/files/patch-Makefile.PL new file mode 100644 index 000000000000..7309f8c853f0 --- /dev/null +++ b/devel/p5-Java/files/patch-Makefile.PL @@ -0,0 +1,10 @@ +--- Makefile.PL.orig Mon Nov 17 23:08:07 2003 ++++ Makefile.PL Fri Jan 27 21:25:46 2006 +@@ -5,7 +5,4 @@ + 'NAME' => 'Java', + 'VERSION_FROM' => 'Java.pm', # finds $VERSION + 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 +- 'PPM_INSTALL_EXEC' => 'perl', +- 'PPM_INSTALL_SCRIPT'=> 'java_server_install.pl', +- 'EXE_FILES' => ['java_server_install.pl'], + ); |
