mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
New port: resin3.
PR: 54853 Submitted by: Jean-Baptiste Quenot <jb.quenot@caraldi.com> See: http://caraldi.com/jbq/resin/
This commit is contained in:
parent
d66b1112ff
commit
2cbb10ab13
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=89803
@ -437,6 +437,7 @@
|
||||
SUBDIR += quanta
|
||||
SUBDIR += quixote
|
||||
SUBDIR += reportmagic
|
||||
SUBDIR += resin3
|
||||
SUBDIR += retawq
|
||||
SUBDIR += roundup
|
||||
SUBDIR += roxen
|
||||
|
80
www/resin3/Makefile
Normal file
80
www/resin3/Makefile
Normal file
@ -0,0 +1,80 @@
|
||||
# New ports collection makefile for: resin3
|
||||
# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
|
||||
# Date Created: 2003-09-29 14:17:14
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= resin
|
||||
PORTVERSION= 3.0.3
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= http://www.caucho.com/download/
|
||||
|
||||
MAINTAINER= jb.quenot@caraldi.com
|
||||
COMMENT= Resin, a Java-based Application Server, 3.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 <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-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 <bsd.port.post.mk>
|
||||
|
||||
# ex:ts=18
|
1
www/resin3/distinfo
Normal file
1
www/resin3/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (resin-3.0.3.tar.gz) = 3ac2280481f81a3ffd4b395498e32dc6
|
11
www/resin3/files/patch-apache2
Normal file
11
www/resin3/files/patch-apache2
Normal file
@ -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)
|
11
www/resin3/files/patch-apache2-install
Normal file
11
www/resin3/files/patch-apache2-install
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/c/plugin/apache2/install.sh.orig Mon Sep 29 11:12:07 2003
|
||||
+++ src/c/plugin/apache2/install.sh Mon Sep 29 11:12:22 2003
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
LoadModule caucho_module $LIBEXECDIR/mod_caucho.so
|
||||
|
||||
-ResinConfigHost localhost 6802
|
||||
+ResinConfigServer localhost 6802
|
||||
EOF
|
||||
|
||||
fi
|
41
www/resin3/files/patch-httpd.sh
Normal file
41
www/resin3/files/patch-httpd.sh
Normal file
@ -0,0 +1,41 @@
|
||||
--- bin/httpd.sh.orig Tue Sep 23 00:54:37 2003
|
||||
+++ bin/httpd.sh Mon Sep 29 10:33:13 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
|
||||
@@ -68,15 +65,13 @@
|
||||
#
|
||||
# ulimit -s 2048
|
||||
#
|
||||
-# 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 \
|
||||
+-pid /var/run/resin.pid \
|
||||
+-conf %%PREFIX%%/etc/resin.xml \
|
||||
+-chdir -name "$name" \
|
||||
+-class "$class" \
|
||||
+$args $*" \
|
||||
+> /dev/null \
|
||||
+&& echo -n '%%PKGNAMEPREFIX%%%%PORTNAME%% '
|
11
www/resin3/files/patch-resin.conf
Normal file
11
www/resin3/files/patch-resin.conf
Normal file
@ -0,0 +1,11 @@
|
||||
--- conf/resin.conf.orig Mon Sep 29 10:29:29 2003
|
||||
+++ conf/resin.conf Mon Sep 29 10:29:48 2003
|
||||
@@ -37,7 +37,7 @@
|
||||
</class-loader>
|
||||
|
||||
<!-- The http port -->
|
||||
- <http id='' host='*' port='8080'/>
|
||||
+ <http id='' host='*' port='%%PORT%%'/>
|
||||
|
||||
<!--
|
||||
- SSL port configuration:
|
43
www/resin3/pkg-deinstall
Normal file
43
www/resin3/pkg-deinstall
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script does the following.
|
||||
#
|
||||
# * Checks if the PID file exists. If it does, it kills the
|
||||
# process and removes the PID file.
|
||||
#
|
||||
# * Checks if the 'www' user exists. If it does, then it displays
|
||||
# a message.
|
||||
#
|
||||
|
||||
# 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 " [ DONE ]"
|
||||
else
|
||||
echo " [ FAILED ]"
|
||||
fi
|
||||
echo -n ">> Removing PID file (${PID_FILE})..."
|
||||
rm ${PID_FILE} > /dev/null 2> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo " [ DONE ]"
|
||||
else
|
||||
echo " [ FAILED ]"
|
||||
fi
|
||||
fi
|
||||
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'"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
9
www/resin3/pkg-descr
Normal file
9
www/resin3/pkg-descr
Normal file
@ -0,0 +1,9 @@
|
||||
Resin is a fast servlet and JSP engine supporting load balancing for increased
|
||||
reliability. Resin encourages separation of content from style with its XSL
|
||||
support. Servlets can generate simple XML and use an XSL filter to format
|
||||
results for each client's capability, from palm pilots to Mozilla. Resin
|
||||
includes a full-featured HTTP/1.1 web server, provides a fast servlet runner
|
||||
for Apache, and supports the latest Servlet 2.3 and JSP 1.2 specifications from
|
||||
Sun.
|
||||
|
||||
WWW: http://www.caucho.com/
|
100
www/resin3/pkg-install
Normal file
100
www/resin3/pkg-install
Normal file
@ -0,0 +1,100 @@
|
||||
#!/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
|
6
www/resin3/pkg-message
Normal file
6
www/resin3/pkg-message
Normal file
@ -0,0 +1,6 @@
|
||||
********************************************************************************
|
||||
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.
|
||||
*******************************************************************************
|
100
www/resin3/pkg-plist
Normal file
100
www/resin3/pkg-plist
Normal file
@ -0,0 +1,100 @@
|
||||
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
|
||||
etc/app-default.xml
|
||||
etc/rc.d/resin.sh
|
||||
sbin/resinctl
|
||||
%%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
|
Loading…
Reference in New Issue
Block a user