diff --git a/www/Makefile b/www/Makefile index 9fd07803c474..d4736684bcfd 100644 --- a/www/Makefile +++ b/www/Makefile @@ -436,6 +436,7 @@ SUBDIR += quanta SUBDIR += quixote SUBDIR += reportmagic + SUBDIR += resin2 SUBDIR += resin3 SUBDIR += retawq SUBDIR += roundup diff --git a/www/resin2/Makefile b/www/resin2/Makefile new file mode 100644 index 000000000000..3f3b9c3c9eeb --- /dev/null +++ b/www/resin2/Makefile @@ -0,0 +1,85 @@ +# New ports collection makefile for: resin2 +# Whom: Jean-Baptiste Quenot +# Date Created: 2002-07-15 15:00:43 +# +# $FreeBSD$ +# + +PORTNAME= resin +PORTVERSION= 2.1.11 +CATEGORIES= www java +MASTER_SITES= http://www.caucho.com/download/ + +MAINTAINER= jb.quenot@caraldi.com +COMMENT= Resin, a Java-based Application Server, 2.x branch + +USE_JAVA= 1.2+ +HAS_CONFIGURE= yes +USE_PERL5= yes + +# Customizable settings +RUNASUSER?= www +RUNASUID?= 80 +GROUP?= ${RUNASUSER} +GID?= ${RUNASUID} +PORT?= 8080 +APP_HOME?= ${PREFIX}/${PKGNAMEPREFIX}${PORTNAME} +WITH_APACHE?= NO +WITH_APACHE2?= NO + +# Other settings +APXS?= ${LOCALBASE}/sbin/apxs +MOD_DIR?= `${APXS} -q LIBEXECDIR` + +# Pass JAVA_HOME as determined by bsd.java.mk +CONFIGURE_ARGS+= --with-java-home=${JAVA_HOME} + +# Install the Apache plugin if needed +.if defined(WITH_APACHE) && ($(WITH_APACHE) == yes || $(WITH_APACHE) == YES) +# +# Apache 1.3 +# +BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache13 +CONFIGURE_ARGS+= --with-apxs=${APXS} +PLIST_SUB+= MOD_DIR=libexec/apache +.elif defined(WITH_APACHE2) && ($(WITH_APACHE2) == yes || $(WITH_APACHE2) == YES) +# +# Apache 2 +# +BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2 +CONFIGURE_ARGS+= --with-apxs=${APXS} +PLIST_SUB+= MOD_DIR=libexec/apache2 +.else +PLIST_SUB+= MOD_DIR="@comment " +.endif + +.include + +# Resin does not handle installation, so proceed now +pre-install: + $(SED) -i -e "s|%%PREFIX%%|$(PREFIX)|g" $(WRKSRC)/src/c/plugin/apache/install.sh + $(SED) -i -e "s|%%PREFIX%%|$(PREFIX)|g" $(WRKSRC)/src/c/plugin/apache2/install.sh + +# Do not change the PID file location unless you also change it in pkg-deinstall script +PID_FILE= /var/run/resin.pid + +post-install: + ${TOUCH} ${PID_FILE} + ${CHOWN} ${RUNASUID}:${GID} ${PID_FILE} + ${MKDIR} ${APP_HOME} + @PREFIX=${PREFIX} \ + PKGNAMEPREFIX=${PKGNAMEPREFIX} \ + PORTNAME=${PORTNAME} \ + WRKSRC=${WRKSRC} \ + RUNASUSER=${RUNASUSER} \ + RUNASUID=${RUNASUID} \ + GROUP=${GROUP} \ + GID=${GID} \ + PORT=${PORT} \ + APP_HOME=${APP_HOME} \ + JAVA_HOME=${JAVA_HOME} \ + ${SH} pkg-install ${PKGNAME} POST-INSTALL + +.include + +# ex:ts=18 diff --git a/www/resin2/distinfo b/www/resin2/distinfo new file mode 100644 index 000000000000..331c69b26591 --- /dev/null +++ b/www/resin2/distinfo @@ -0,0 +1 @@ +MD5 (resin-2.1.11.tar.gz) = 97cd4be46138bf86ce582e437d747d1e diff --git a/www/resin2/files/patch-Makefile.in b/www/resin2/files/patch-Makefile.in new file mode 100644 index 000000000000..5754ce64ac6d --- /dev/null +++ b/www/resin2/files/patch-Makefile.in @@ -0,0 +1,11 @@ +--- src/c/plugin/resin/Makefile.in.orig Fri Feb 14 21:48:23 2003 ++++ src/c/plugin/resin/Makefile.in Wed Mar 5 19:11:12 2003 +@@ -20,7 +20,7 @@ + all : resin libresin.$(SO) + + resin : resin.o $(OBJ) +- $(CC) $(LDFLAGS) -o $@ resin.o $(OBJ) $(PROXY_LIBS) -ldl ++ $(CC) $(LDFLAGS) -o $@ resin.o $(OBJ) $(PROXY_LIBS) + + resin_so : libresin.$(SO) + diff --git a/www/resin2/files/patch-apache2 b/www/resin2/files/patch-apache2 new file mode 100644 index 000000000000..2130da28e974 --- /dev/null +++ b/www/resin2/files/patch-apache2 @@ -0,0 +1,11 @@ +--- src/c/plugin/apache2/mod_caucho.c.orig Tue Apr 15 23:28:46 2003 ++++ src/c/plugin/apache2/mod_caucho.c Fri Jun 6 01:37:29 2003 +@@ -52,7 +52,7 @@ + #include "cse.h" + #include "version.h" + +-#ifndef APR_HAS_THREADS ++#if !APR_HAS_THREADS + #define apr_thread_mutex_t int + #define apr_thread_mutex_create(a,b,c) + #define apr_thread_mutex_lock(a) diff --git a/www/resin2/files/patch-httpd.sh b/www/resin2/files/patch-httpd.sh new file mode 100644 index 000000000000..0eb3b58dd55b --- /dev/null +++ b/www/resin2/files/patch-httpd.sh @@ -0,0 +1,34 @@ +--- bin/httpd.sh.orig Tue Apr 15 23:28:50 2003 ++++ bin/httpd.sh Thu Jul 24 14:35:36 2003 +@@ -37,11 +37,8 @@ + # + # You can predefine JAVA_HOME and RESIN_HOME + # +-# JAVA_HOME=/usr/java +-# export JAVA_HOME +-# +-# RESIN_HOME=/usr/local/resin +-# export RESIN_HOME ++export JAVA_HOME=%%JAVA_HOME%% ++export RESIN_HOME=%%PREFIX%%/%%PKGNAMEPREFIX%%%%PORTNAME%% + # + # Extra arguments to Java. If you're passing arguments to the JVM, you'll + # need to use -Jxxx. For example, args="-J-ms48m". You can modify +@@ -61,16 +58,4 @@ + # + perl=perl + +-# +-# trace script and simlinks to find thw wrapper +-# +-script=`/bin/ls -l $0 | awk '{ print $NF; }'` +- +-while test -h "$script" +-do +- script=`/bin/ls -l $script | awk '{ print $NF; }'` +-done +- +-bin=`dirname $script` +- +-exec $perl $bin/wrapper.pl -chdir -name "$name" -class "$class" $args $* ++su -f -m www -c "exec $perl %%PREFIX%%/sbin/resinctl -conf %%PREFIX%%/etc/resin.xml -chdir -name "$name" -class "$class" $args $*" > /dev/null && echo -n '%%PKGNAMEPREFIX%%%%PORTNAME%% ' diff --git a/www/resin2/files/patch-install-apache b/www/resin2/files/patch-install-apache new file mode 100644 index 000000000000..42482c94dc9a --- /dev/null +++ b/www/resin2/files/patch-install-apache @@ -0,0 +1,10 @@ +--- src/c/plugin/apache/install.sh.orig Fri Jul 25 15:34:33 2003 ++++ src/c/plugin/apache/install.sh Fri Jul 25 15:35:53 2003 +@@ -51,6 +51,6 @@ + + LoadModule caucho_module $LIBEXECDIR/mod_caucho.so + +-CauchoConfigFile $RESIN_HOME/conf/resin.conf ++CauchoConfigFile %%PREFIX%%/etc/resin.xml + EOF + fi diff --git a/www/resin2/files/patch-install-apache2 b/www/resin2/files/patch-install-apache2 new file mode 100644 index 000000000000..98d826a6c83f --- /dev/null +++ b/www/resin2/files/patch-install-apache2 @@ -0,0 +1,11 @@ +--- src/c/plugin/apache2/install.sh.orig Fri Jul 25 15:34:39 2003 ++++ src/c/plugin/apache2/install.sh Fri Jul 25 15:35:53 2003 +@@ -51,7 +51,7 @@ + + LoadModule caucho_module $LIBEXECDIR/mod_caucho.so + +-CauchoConfigFile $RESIN_HOME/conf/resin.conf ++CauchoConfigFile %%PREFIX%%/etc/resin.xml + EOF + + fi diff --git a/www/resin2/files/patch-resin.conf b/www/resin2/files/patch-resin.conf new file mode 100644 index 000000000000..a90a144e6c7c --- /dev/null +++ b/www/resin2/files/patch-resin.conf @@ -0,0 +1,11 @@ +--- conf/resin.conf.orig Thu Mar 6 10:19:07 2003 ++++ conf/resin.conf Wed Mar 5 21:05:50 2003 +@@ -67,7 +67,7 @@ + doc + + +- ++ + +