summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2003-11-20 21:44:14 +0000
committerGreg Lewis <glewis@FreeBSD.org>2003-11-20 21:44:14 +0000
commit81c8db1a2b05e0e5d6791d77ff0e628f131f0ce7 (patch)
tree87b57f9f6f5b1f60533a0b8961c5ed7a278b5f1d /www
parent- Update to today (20031120) CVS and fix building (diff)
. Avoid conflict between resin2 and resin3
. Fix resin{2,3}ctl first line (perl path) . Pid file is no more created in the Makefile . New resin.sh startup script, manages pid file . pkg-[de]install and pkg-message are now generated . Do not write anything after including bsd.port.post.mk . Packages are now supported (reported by Arcadius Ahouansou) . Integration with apxs for [de]activating mod_caucho PR: 57566 Submitted by: Jean-Baptiste Quenot <jbq@caraldi.com> (maintainer)
Notes
Notes: svn path=/head/; revision=94546
Diffstat (limited to 'www')
-rw-r--r--www/resin3/Makefile100
-rw-r--r--www/resin3/files/install.sh51
-rw-r--r--www/resin3/files/patch-apache-Makefile.in12
-rw-r--r--www/resin3/files/patch-apache2-Makefile.in12
-rw-r--r--www/resin3/files/patch-wrapper8
-rw-r--r--www/resin3/files/pkg-deinstall (renamed from www/resin3/pkg-deinstall)25
-rw-r--r--www/resin3/files/pkg-install50
-rw-r--r--www/resin3/files/pkg-message.in4
-rw-r--r--www/resin3/files/resin.sh.in53
-rw-r--r--www/resin3/pkg-install100
-rw-r--r--www/resin3/pkg-message6
-rw-r--r--www/resin3/pkg-plist193
12 files changed, 380 insertions, 234 deletions
diff --git a/www/resin3/Makefile b/www/resin3/Makefile
index 0460d76011b3..74b028245d07 100644
--- a/www/resin3/Makefile
+++ b/www/resin3/Makefile
@@ -2,11 +2,14 @@
# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
# Date Created: 2003-09-29 14:17:14
#
+# ex:ts=20:sw=20
+#
# $FreeBSD$
#
PORTNAME= resin
PORTVERSION= 3.0.3
+PORTREVISION= 1
CATEGORIES= www java
MASTER_SITES= http://www.caucho.com/download/
@@ -23,58 +26,111 @@ RUNASUID?= 80
GROUP?= ${RUNASUSER}
GID?= ${RUNASUID}
PORT?= 8080
-APP_HOME?= ${PREFIX}/${PKGNAMEPREFIX}${PORTNAME}
+# Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION
+# If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11
+APP_NAME_SUFFIX= ${PORTVERSION:C/\..*$//}
+APP_NAME?= ${PORTNAME}${APP_NAME_SUFFIX}
+APP_HOME?= ${PREFIX}/${APP_NAME}
WITH_APACHE?= NO
WITH_APACHE2?= NO
+PID_FILE?= /var/run/${APP_NAME}.pid
# Other settings
APXS?= ${LOCALBASE}/sbin/apxs
MOD_DIR?= `${APXS} -q LIBEXECDIR`
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+PKGMESSAGE= ${WRKDIR}/pkg-message
+# We need WRKSRC and WRKDIR right now so define them "manually"
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work
+REINPLACE_FILES= ${WRKSRC}/src/c/plugin/apache/Makefile.in \
+ ${WRKSRC}/src/c/plugin/apache2/Makefile.in
+REPLACE_FILES= ${FILESDIR}/pkg-install \
+ ${FILESDIR}/pkg-deinstall \
+ ${FILESDIR}/install.sh \
+ ${FILESDIR}/pkg-message.in \
+ ${WRKSRC}/conf/resin.conf \
+ ${WRKSRC}/bin/wrapper.pl.in \
+ ${FILESDIR}/resin.sh.in
# 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)
+.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)
+# Allow apxs invocations
+PLIST_SUB+= 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
+# Allow apxs invocations
+PLIST_SUB+= APACHE=""
.else
PLIST_SUB+= MOD_DIR="@comment "
+# Prevent apxs invocations
+PLIST_SUB+= APACHE="@comment "
.endif
+PLIST_SUB+= APP_NAME=${APP_NAME}
+PLIST_SUB+= APXS=${APXS}
+
+SUBSTITUTIONS= -e "s|%%APP_HOME%%|${APP_HOME}|g" \
+ -e "s|%%APP_NAME%%|${APP_NAME}|g" \
+ -e "s|%%APXS%%|${APXS}|g" \
+ -e "s|%%FILESDIR%%|${FILESDIR}|g" \
+ -e "s|%%GROUP%%|${GROUP}|g" \
+ -e "s|%%GID%%|${GID}|g" \
+ -e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \
+ -e "s|%%PERL%%|${PERL}|g" \
+ -e "s|%%PID_FILE%%|${PID_FILE}|g" \
+ -e "s|%%PORT%%|${PORT}|g" \
+ -e "s|%%PORTNAME%%|${PORTNAME}|g" \
+ -e "s|%%PREFIX%%|${PREFIX}|g" \
+ -e "s|%%RUNASUID%%|${RUNASUID}|g" \
+ -e "s|%%RUNASUSER%%|${RUNASUSER}|g" \
+ -e "s|%%WRKDIR%%|${WRKDIR}|g" \
+ -e "s|%%WRKSRC%%|${WRKSRC}|g"
+
.include <bsd.port.pre.mk>
-# Do not change the PID file location unless you also change it in pkg-deinstall script
-PID_FILE= /var/run/resin.pid
+post-patch:
+.for FILE in ${REINPLACE_FILES}
+ @${SED} -i bak ${SUBSTITUTIONS} ${FILE}
+.endfor
+.for FILE in ${REPLACE_FILES}
+ @${SED} ${SUBSTITUTIONS} ${FILE} > ${WRKDIR}/`basename ${FILE}`
+.endfor
+ @fmt -w 80 < ${WRKDIR}/pkg-message.in > ${PKGMESSAGE}
+.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) || \
+defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES))
+ @${ECHO_CMD} >> ${PKGMESSAGE}
+ @${ECHO_CMD} The Resin Apache module mod_caucho has been activated \
+ in the Apache configuration file, where you should also \
+ add a line to specify the location of the Resin configuration \
+ server, for example: | fmt -w 80 >> ${PKGMESSAGE}
+ @${ECHO_CMD} ResinConfigServer localhost 6802 >> ${PKGMESSAGE}
+.endif
+ @${MV} ${WRKDIR}/wrapper.pl.in ${WRKSRC}/bin/wrapper.pl.in
+# Resin does not handle installation, so proceed now
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
+ @${SH} ${WRKDIR}/install.sh
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${ECHO_CMD}
+ @${ECHO_CMD} "********************************************************************************"
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD} "********************************************************************************"
+ @${ECHO_CMD}
.include <bsd.port.post.mk>
-
-# ex:ts=18
diff --git a/www/resin3/files/install.sh b/www/resin3/files/install.sh
new file mode 100644
index 000000000000..24794c4e9be9
--- /dev/null
+++ b/www/resin3/files/install.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+
+set -e
+
+warning() {
+ echo "Kept %%PREFIX%%/etc/%%APP_NAME%%.xml intact from previous installation, please diff"
+ echo "against %%APP_NAME%%.xml-dist"
+}
+
+# Install config file only if none is already there
+if test -e %%PREFIX%%/etc/%%APP_NAME%%.xml && \
+ ! cmp -s %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml ; then
+ echo
+ echo "********************************************************************************"
+ warning | fmt -w 80
+ echo "********************************************************************************"
+ echo
+else
+ install %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml
+ echo Installed %%PREFIX%%/etc/%%APP_NAME%%.xml
+fi
+
+# Install new config file with '-dist' appended
+install %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml-dist
+echo Installed %%PREFIX%%/etc/%%APP_NAME%%.xml-dist
+
+install %%WRKSRC%%/conf/app-default.xml %%PREFIX%%/etc/
+echo Installed %%PREFIX%%/etc/app-default.xml
+
+install %%WRKDIR%%/resin.sh.in %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
+chmod 755 %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
+echo Installed %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
+
+install %%WRKSRC%%/bin/wrapper.pl %%PREFIX%%/sbin/%%APP_NAME%%ctl
+echo Installed %%PREFIX%%/sbin/%%APP_NAME%%ctl
+
+test -d %%APP_HOME%% || mkdir %%APP_HOME%%
+echo Created installation directory %%APP_HOME%%
+
+list()
+{
+ for dir in doc lib libexec xsl ; do
+ ( cd %%WRKSRC%% ; find $dir )
+ done
+}
+
+# Remove all empty dirs
+( cd %%WRKSRC%% ; find doc -type d -empty -delete )
+
+echo Installing in %%APP_HOME%%
+list | xargs tar -C %%WRKSRC%% -cf- | tar -C %%APP_HOME%% -xpf-
diff --git a/www/resin3/files/patch-apache-Makefile.in b/www/resin3/files/patch-apache-Makefile.in
new file mode 100644
index 000000000000..4b10a88f34b5
--- /dev/null
+++ b/www/resin3/files/patch-apache-Makefile.in
@@ -0,0 +1,12 @@
+--- src/c/plugin/apache/Makefile.in.orig Thu Nov 13 09:27:52 2003
++++ src/c/plugin/apache/Makefile.in Thu Nov 13 09:28:36 2003
+@@ -28,8 +28,7 @@
+ $(CC) -c $(INCLUDES) $(CFLAGS) $<
+
+ install :
+- sh install.sh -conf $(apache_conf) -libexec $(apache_libexec) \
+- -resin_home $(resin_home)
++ %%APXS%% -i -a -n caucho mod_caucho.so
+
+ clean :
+ - rm *.o *.lo *.la *.so
diff --git a/www/resin3/files/patch-apache2-Makefile.in b/www/resin3/files/patch-apache2-Makefile.in
new file mode 100644
index 000000000000..21abaf49de07
--- /dev/null
+++ b/www/resin3/files/patch-apache2-Makefile.in
@@ -0,0 +1,12 @@
+--- src/c/plugin/apache2/Makefile.in.orig Tue Sep 23 00:54:34 2003
++++ src/c/plugin/apache2/Makefile.in Mon Nov 17 11:33:19 2003
+@@ -30,8 +30,7 @@
+ $(CC) -c $(INCLUDES) $(CFLAGS) $<
+
+ install :
+- sh install.sh -conf $(apache_conf) -apache_dir $(apache_dir) \
+- -libexec $(apache_libexec) -resin_home $(resin_home)
++ %%APXS%% -i -a -n caucho mod_caucho.so
+
+ clean :
+ - rm *.o *.lo *.so
diff --git a/www/resin3/files/patch-wrapper b/www/resin3/files/patch-wrapper
new file mode 100644
index 000000000000..7d3f9aadfb18
--- /dev/null
+++ b/www/resin3/files/patch-wrapper
@@ -0,0 +1,8 @@
+--- bin/wrapper.pl.in.orig Sat Oct 4 09:45:23 2003
++++ bin/wrapper.pl.in Sat Oct 4 09:45:43 2003
+@@ -1,4 +1,4 @@
+-#! @PERL@
++#! %%PERL%%
+ #
+ # Copyright(c) 1998-2002 Caucho Technology
+ #
diff --git a/www/resin3/pkg-deinstall b/www/resin3/files/pkg-deinstall
index f5ec53c59f44..b56243508443 100644
--- a/www/resin3/pkg-deinstall
+++ b/www/resin3/files/pkg-deinstall
@@ -8,24 +8,33 @@
# * Checks if the 'www' user exists. If it does, then it displays
# a message.
#
+# $FreeBSD: /tmp/pcvs/ports/www/resin3/files/Attic/pkg-deinstall,v 1.1 2003-11-20 21:44:14 glewis Exp $
+#
+# Borrowed from the jakarta-tomcat port
+#
+
+set -e
+
+PID_FILE=%%PID_FILE%%
+RUNASUSER=%%RUNASUSER%%
# Make sure we're in the right stage of the process
if [ "$2" = "DEINSTALL" ]; then
# Kill the process if it is still running
- PID_FILE=/var/run/resin.pid
if [ -s ${PID_FILE} ]; then
PID=`cat ${PID_FILE}`
- echo -n ">> Killing Resin process (${PID})..."
- /bin/kill ${PID} > /dev/null 2> /dev/null
- if [ $? -eq 0 ]; then
+ echo -n ">> Killing %%APP_NAME%% process (${PID})..."
+
+ if /bin/kill ${PID} > /dev/null 2> /dev/null ; then
echo " [ DONE ]"
else
echo " [ FAILED ]"
fi
+
echo -n ">> Removing PID file (${PID_FILE})..."
- rm ${PID_FILE} > /dev/null 2> /dev/null
- if [ $? -eq 0 ]; then
+
+ if rm ${PID_FILE} > /dev/null 2> /dev/null ; then
echo " [ DONE ]"
else
echo " [ FAILED ]"
@@ -35,8 +44,8 @@ fi
if [ "$2" = "POST-DEINSTALL" ]; then
# If the user exists, then display a message
- if pw usershow "www" 2>/dev/null 1>&2; then
- echo "To delete the www user permanently, use 'pw userdel www'"
+ if pw usershow "$RUNASUSER" 2>/dev/null 1>&2; then
+ echo "To delete the $RUNASUSER user permanently, use 'pw userdel $RUNASUSER'"
fi
fi
diff --git a/www/resin3/files/pkg-install b/www/resin3/files/pkg-install
new file mode 100644
index 000000000000..09c24fd66750
--- /dev/null
+++ b/www/resin3/files/pkg-install
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Checks if the requested user and group exist. If they don't, then
+# an attempt is made to create both.
+#
+# $FreeBSD: /tmp/pcvs/ports/www/resin3/files/Attic/pkg-install,v 1.1 2003-11-20 21:44:14 glewis Exp $
+#
+# Borrowed from the jakarta-tomcat port
+#
+
+set -e
+
+RUNASUSER=%%RUNASUSER%%
+RUNASUID=%%RUNASUID%%
+GROUP=%%GROUP%%
+GID=%%GID%%
+
+if [ "$2" = "POST-INSTALL" ]; then
+ # We're called after the 'make install' process
+ # See if the group already exists
+ if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+
+ # If not, try to create it
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ # See if the user already exists
+ if ! pw usershow "${RUNASUSER}" 2>/dev/null 1>&2; then
+
+ # If not, try to create it
+ if pw useradd ${RUNASUSER} -u ${RUNASUID} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "World Wide Web Owner"; \
+ then
+ echo "Added user \"${RUNASUSER}\"."
+ else
+ echo "Adding user \"${RUNASUSER}\" failed..."
+ exit 1
+ fi
+ fi
+
+ chown -R %%RUNASUSER%%:%%GROUP%% $PKG_PREFIX/%%APP_NAME%%
+fi
+
+exit 0
diff --git a/www/resin3/files/pkg-message.in b/www/resin3/files/pkg-message.in
new file mode 100644
index 000000000000..820698b9dda9
--- /dev/null
+++ b/www/resin3/files/pkg-message.in
@@ -0,0 +1,4 @@
+Resin is now installed in %%APP_HOME%%. You may want to start it using the
+startup script installed as %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh, and then point
+your web browser to the default home page at http://localhost:%%PORT%%/ to read
+the doc. Resin can be configured using %%PREFIX%%/etc/%%APP_NAME%%.xml.
diff --git a/www/resin3/files/resin.sh.in b/www/resin3/files/resin.sh.in
new file mode 100644
index 000000000000..425dd0f8a8f7
--- /dev/null
+++ b/www/resin3/files/resin.sh.in
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Resin startup script.
+#
+# Borrowed from jakarta-tomcat41
+#
+# $FreeBSD$
+#
+
+# Determine PREFIX
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+# Set some variables
+MYSELF=`basename $0`
+ARGS="-conf $PREFIX/etc/%%APP_NAME%%.xml \
+-chdir \
+-name %%APP_NAME%% \
+-class com.caucho.server.resin.Resin \
+-pid %%PID_FILE%%"
+PATH=/usr/sbin:/usr/bin:/bin
+
+export JAVA_HOME=%%JAVA_HOME%%
+export RESIN_HOME=$PREFIX/%%APP_NAME%%
+
+set -e
+
+case "$1" in
+ start)
+ echo -n ' '
+ truncate -s 0 %%PID_FILE%%
+ chown %%RUNASUSER%%:%%GROUP%% %%PID_FILE%%
+ chmod 600 %%PID_FILE%%
+ su -f -m %%RUNASUSER%% -c "exec $PREFIX/sbin/%%APP_NAME%%ctl $ARGS start" \
+ >/dev/null && echo -n '%%APP_NAME%%'
+ ;;
+
+ stop)
+ echo -n ' '
+ chown %%RUNASUSER%%:%%GROUP%% %%PID_FILE%%
+ chmod 600 %%PID_FILE%%
+ su -f -m %%RUNASUSER%% -c "exec $PREFIX/sbin/%%APP_NAME%%ctl $ARGS stop" \
+ >/dev/null 2>&1 ; echo -n '%%APP_NAME%%'
+ ;;
+ *)
+ echo ""
+ echo "Usage: ${MYSELF} { start | stop }"
+ echo ""
+ exit 64
+ ;;
+esac
diff --git a/www/resin3/pkg-install b/www/resin3/pkg-install
deleted file mode 100644
index c4757bf6c24e..000000000000
--- a/www/resin3/pkg-install
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh -e
-#
-# Checks if the 'www' user and group exist. If they don't, then
-# an attempt is made to create both.
-#
-# Borrowed to the jakarta-tomcat port
-
-# Make sure we're called during the 'make install' process
-if [ "$2" != "POST-INSTALL" ]; then
- exit 0
-fi
-
-# See if the group already exists
-if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
-
- # If not, try to create it
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
-fi
-
-# See if the user already exists
-if ! pw usershow "${RUNASUSER}" 2>/dev/null 1>&2; then
-
- # If not, try to create it
- if pw useradd ${RUNASUSER} -u ${RUNASUID} -g ${GROUP} -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner"; \
- then
- echo "Added user \"${RUNASUSER}\"."
- else
- echo "Adding user \"${RUNASUSER}\" failed..."
- exit 1
- fi
-fi
-
-
-################################################################################
-
-sed -i -e "s|%%PORT%%|$PORT|g" $WRKSRC/conf/resin.conf
-
-# Install config file only if none is already there
-if test -e $PREFIX/etc/resin.xml && ! diff $WRKSRC/conf/resin.conf $PREFIX/etc/resin.xml >/dev/null; then
- cat <<EOF
-
-********************************************************************************
-Kept $PREFIX/etc/resin.xml intact from previous installation, please diff
-against resin.xml-dist
-********************************************************************************
-
-EOF
-else
- install $WRKSRC/conf/resin.conf $PREFIX/etc/resin.xml
- echo Installed $PREFIX/etc/resin.xml
-fi
-
-# Install new config file with '-dist' appended
-install $WRKSRC/conf/resin.conf $PREFIX/etc/resin.xml-dist
-echo Installed $PREFIX/etc/resin.xml-dist
-
-install $WRKSRC/conf/app-default.xml $PREFIX/etc/
-echo Installed $PREFIX/etc/app-default.xml
-
-sed -i -e "s|%%PREFIX%%|$PREFIX|g" $WRKSRC/bin/httpd.sh
-sed -i -e "s|%%PKGNAMEPREFIX%%|$PKGNAMEPREFIX|g" $WRKSRC/bin/httpd.sh
-sed -i -e "s|%%PORTNAME%%|$PORTNAME|g" $WRKSRC/bin/httpd.sh
-sed -i -e "s|%%JAVA_HOME%%|$JAVA_HOME|g" $WRKSRC/bin/httpd.sh
-install $WRKSRC/bin/httpd.sh $PREFIX/etc/rc.d/resin.sh
-echo Installed $PREFIX/etc/rc.d/resin.sh
-
-install $WRKSRC/bin/wrapper.pl $PREFIX/sbin/resinctl
-echo Installed $PREFIX/sbin/resinctl
-
-list()
-{
- for dir in doc lib libexec webapps xsl ; do
- ( cd $WRKSRC ; find $dir )
- done
-}
-
-echo Installing in $PREFIX/resin
-list | xargs tar -C $WRKSRC -cf- | tar -C $APP_HOME -xpf-
-
-chown -R www:www $PREFIX/resin
-
-display_message()
-{
- PORT_EXPR="s#%%PORT%%#:$PORT#g"
- PREFIX_EXPR="s#%%PREFIX%%#$PREFIX#g"
- sed -e $PORT_EXPR -e $PREFIX_EXPR
-}
-
-echo
-display_message < pkg-message
-echo
-
-exit 0
diff --git a/www/resin3/pkg-message b/www/resin3/pkg-message
deleted file mode 100644
index b189b6beea6b..000000000000
--- a/www/resin3/pkg-message
+++ /dev/null
@@ -1,6 +0,0 @@
-********************************************************************************
-Resin is now installed. You may want to start it using the startup script
-installed as %%PREFIX%%/etc/rc.d/resin.sh, and then point your web browser to
-the default home page at http://localhost%%PORT%%/ to read the doc. Resin can
-be configured using %%PREFIX%%/etc/resin.xml.
-*******************************************************************************
diff --git a/www/resin3/pkg-plist b/www/resin3/pkg-plist
index 2b63fa802b6d..534d201f5e4b 100644
--- a/www/resin3/pkg-plist
+++ b/www/resin3/pkg-plist
@@ -1,100 +1,97 @@
-resin/doc/beta.xtp
-resin/doc/changes-1.xtp
-resin/doc/changes.xtp
-resin/doc/errata.xtp
-resin/doc/features.xtp
-resin/doc/future.xtp
-resin/doc/href-map.xml
-resin/doc/index.xtp
-resin/doc/toc.xml
-resin/doc/images/caucho-blue.gif
-resin/doc/images/apache_srun.gif
-resin/doc/images/appserver.gif
-resin/doc/images/background.gif
-resin/doc/images/backup.gif
-resin/doc/images/ball8.gif
-resin/doc/images/bean.gif
-resin/doc/images/bean1.gif
-resin/doc/images/caucho.gif
-resin/doc/images/compiler.gif
-resin/doc/images/file.gif
-resin/doc/images/folder.gif
-resin/doc/images/hbleed.gif
-resin/doc/images/httpd.gif
-resin/doc/images/iis_srun.gif
-resin/doc/images/jndi_tree.gif
-resin/doc/images/jsp.gif
-resin/doc/images/logo.gif
-resin/doc/images/pixel.gif
-resin/doc/images/resin_powered.gif
-resin/doc/images/same_srun.gif
-resin/doc/images/script.gif
-resin/doc/images/srunc.gif
-resin/doc/images/sticky-sessions.gif
-resin/doc/images/style.gif
-resin/doc/images/webserver.gif
-resin/doc/images/website_srun.gif
-resin/doc/images/caucho.jpg
-resin/doc/images/.xvpics/background.gif
-resin/doc/images/.xvpics/left_background.gif
-resin/doc/images/caucho-white.jpg
-resin/doc/images/left_background.gif
-resin/lib/resin.jar
-resin/lib/jsdk24.jar
-resin/lib/jta_101.jar
-resin/lib/isorelax.jar
-resin/lib/jmx.jar
-resin/lib/jca-15.jar
-resin/lib/jstl-11.jar
-resin/lib/webutil.jar
-resin/webapps/resin-doc.war
-resin/xsl/caucho/comment.xsl
-resin/xsl/caucho/contents.xsl
-resin/xsl/caucho/control.xsl
-resin/xsl/caucho/debug.xsl
-resin/xsl/caucho/defaultcopy.xsl
-resin/xsl/caucho/format.xsl
-resin/xsl/caucho/newstyle.xsl
-resin/xsl/caucho/weblog.xsl
-resin/xsl/caucho/fun.xsl
-resin/xsl/caucho/href.xsl
-resin/xsl/caucho/include.xsl
-resin/xsl/caucho/nodeinfo.xsl
-resin/xsl/caucho/toc.xsl
-resin/xsl/caucho/viewfile.xsl
-resin/xsl/caucho_default.xsl
-resin/xsl/caucho_header.xsl
-resin/xsl/caucho_subpage.xsl
-resin/xsl/default.xsl
-resin/xsl/doc_header.xsl
-resin/xsl/header.xsl
-resin/xsl/js_header.xsl
-resin/xsl/new_doc_header.xsl
-resin/xsl/search.xsl
-resin/xsl/subpage.xsl
-resin/xsl/js/caucho/defaultcopy.xsl
-resin/xsl/js/caucho/format.xsl
-resin/xsl/js/caucho/weblog.xsl
-resin/libexec/libresin.so
-resin/libexec/libresinssl.so
+%%APP_NAME%%/doc/beta.xtp
+%%APP_NAME%%/doc/changes-1.xtp
+%%APP_NAME%%/doc/changes.xtp
+%%APP_NAME%%/doc/errata.xtp
+%%APP_NAME%%/doc/features.xtp
+%%APP_NAME%%/doc/future.xtp
+%%APP_NAME%%/doc/index.xtp
+%%APP_NAME%%/doc/href-map.xml
+%%APP_NAME%%/doc/toc.xml
+%%APP_NAME%%/doc/images/caucho-blue.gif
+%%APP_NAME%%/doc/images/apache_srun.gif
+%%APP_NAME%%/doc/images/appserver.gif
+%%APP_NAME%%/doc/images/background.gif
+%%APP_NAME%%/doc/images/backup.gif
+%%APP_NAME%%/doc/images/ball8.gif
+%%APP_NAME%%/doc/images/bean.gif
+%%APP_NAME%%/doc/images/bean1.gif
+%%APP_NAME%%/doc/images/caucho.gif
+%%APP_NAME%%/doc/images/compiler.gif
+%%APP_NAME%%/doc/images/file.gif
+%%APP_NAME%%/doc/images/folder.gif
+%%APP_NAME%%/doc/images/hbleed.gif
+%%APP_NAME%%/doc/images/httpd.gif
+%%APP_NAME%%/doc/images/iis_srun.gif
+%%APP_NAME%%/doc/images/jndi_tree.gif
+%%APP_NAME%%/doc/images/jsp.gif
+%%APP_NAME%%/doc/images/logo.gif
+%%APP_NAME%%/doc/images/pixel.gif
+%%APP_NAME%%/doc/images/resin_powered.gif
+%%APP_NAME%%/doc/images/same_srun.gif
+%%APP_NAME%%/doc/images/script.gif
+%%APP_NAME%%/doc/images/srunc.gif
+%%APP_NAME%%/doc/images/sticky-sessions.gif
+%%APP_NAME%%/doc/images/style.gif
+%%APP_NAME%%/doc/images/webserver.gif
+%%APP_NAME%%/doc/images/website_srun.gif
+%%APP_NAME%%/doc/images/caucho.jpg
+%%APP_NAME%%/doc/images/.xvpics/background.gif
+%%APP_NAME%%/doc/images/.xvpics/left_background.gif
+%%APP_NAME%%/doc/images/caucho-white.jpg
+%%APP_NAME%%/doc/images/left_background.gif
+%%APP_NAME%%/lib/resin.jar
+%%APP_NAME%%/lib/jsdk24.jar
+%%APP_NAME%%/lib/jta_101.jar
+%%APP_NAME%%/lib/isorelax.jar
+%%APP_NAME%%/lib/jmx.jar
+%%APP_NAME%%/lib/jca-15.jar
+%%APP_NAME%%/lib/jstl-11.jar
+%%APP_NAME%%/lib/webutil.jar
+%%APP_NAME%%/xsl/caucho/comment.xsl
+%%APP_NAME%%/xsl/caucho/contents.xsl
+%%APP_NAME%%/xsl/caucho/control.xsl
+%%APP_NAME%%/xsl/caucho/debug.xsl
+%%APP_NAME%%/xsl/caucho/defaultcopy.xsl
+%%APP_NAME%%/xsl/caucho/format.xsl
+%%APP_NAME%%/xsl/caucho/newstyle.xsl
+%%APP_NAME%%/xsl/caucho/weblog.xsl
+%%APP_NAME%%/xsl/caucho/fun.xsl
+%%APP_NAME%%/xsl/caucho/href.xsl
+%%APP_NAME%%/xsl/caucho/include.xsl
+%%APP_NAME%%/xsl/caucho/nodeinfo.xsl
+%%APP_NAME%%/xsl/caucho/toc.xsl
+%%APP_NAME%%/xsl/caucho/viewfile.xsl
+%%APP_NAME%%/xsl/caucho_default.xsl
+%%APP_NAME%%/xsl/caucho_header.xsl
+%%APP_NAME%%/xsl/caucho_subpage.xsl
+%%APP_NAME%%/xsl/default.xsl
+%%APP_NAME%%/xsl/doc_header.xsl
+%%APP_NAME%%/xsl/header.xsl
+%%APP_NAME%%/xsl/js_header.xsl
+%%APP_NAME%%/xsl/new_doc_header.xsl
+%%APP_NAME%%/xsl/search.xsl
+%%APP_NAME%%/xsl/subpage.xsl
+%%APP_NAME%%/xsl/js/caucho/defaultcopy.xsl
+%%APP_NAME%%/xsl/js/caucho/format.xsl
+%%APP_NAME%%/xsl/js/caucho/weblog.xsl
+%%APP_NAME%%/libexec/libresin.so
+%%APP_NAME%%/libexec/libresinssl.so
etc/app-default.xml
-etc/rc.d/resin.sh
-sbin/resinctl
+etc/rc.d/%%APP_NAME%%.sh
+sbin/%%APP_NAME%%ctl
%%MOD_DIR%%/mod_caucho.so
-@dirrm resin/doc/images/.xvpics
-@dirrm resin/doc/images
-@dirrm resin/doc/css
-@dirrm resin/doc/WEB-INF/classes
-@dirrm resin/doc/WEB-INF/lib
-@dirrm resin/doc/WEB-INF
-@dirrm resin/doc
-@dirrm resin/lib
-@dirrm resin/webapps
-@dirrm resin/xsl/caucho
-@dirrm resin/xsl/js/caucho
-@dirrm resin/xsl/js
-@dirrm resin/xsl
-@dirrm resin/libexec
-@dirrm resin
-@unexec if cmp -s %D/etc/resin.xml %D/etc/resin.xml-dist; then rm -f %D/etc/resin.xml; else echo If permanently deleting this package, %%PREFIX%%/etc/resin.xml must be removed manually; fi
-etc/resin.xml-dist
+%%APACHE%%@exec %%APXS%% -e -a -n caucho %f
+%%APACHE%%@unexec %%APXS%% -e -A -n caucho %f
+@dirrm %%APP_NAME%%/doc/images/.xvpics
+@dirrm %%APP_NAME%%/doc/images
+@dirrm %%APP_NAME%%/doc
+@dirrm %%APP_NAME%%/lib
+@dirrm %%APP_NAME%%/xsl/caucho
+@dirrm %%APP_NAME%%/xsl/js/caucho
+@dirrm %%APP_NAME%%/xsl/js
+@dirrm %%APP_NAME%%/xsl
+@dirrm %%APP_NAME%%/libexec
+@dirrm %%APP_NAME%%
+@unexec if cmp -s %D/etc/%%APP_NAME%%.xml %D/etc/%%APP_NAME%%.xml-dist; then rm -f %D/etc/%%APP_NAME%%.xml; else echo If permanently deleting this package, %D/etc/%%APP_NAME%%.xml must be removed manually; fi
+etc/%%APP_NAME%%.xml-dist
+@exec if test -f %B/%%APP_NAME%%.xml ; then echo Keeping %B/%%APP_NAME%%.xml intact from previous installation; else cp %F %B/%%APP_NAME%%.xml; fi