1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

Import mod_webapp, an Apache module that allows Tomcat applications to be

mounted into an Apache server.  Tomcat is a Java servlet and JSP engine.
Apache is the popular webserver.

This port is for Apache 1.3.x.

PR:		ports/53146
Submitted by:	Andre Sachs <asachs@uunet.co.za>
This commit is contained in:
Sheldon Hearn 2003-06-12 14:06:21 +00:00
parent 522122252e
commit dcfd42987e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82864
8 changed files with 238 additions and 0 deletions

View File

@ -234,6 +234,7 @@
SUBDIR += mod_tsunami
SUBDIR += mod_v2h
SUBDIR += mod_watch
SUBDIR += mod_webapp
# SUBDIR += mod_webapp-apache2
SUBDIR += mod_zap
SUBDIR += moinmoin

75
www/mod_webapp/Makefile Normal file
View File

@ -0,0 +1,75 @@
# Ports collection makefile for: mod_webapp for Apache 1.3.x
# Date created: Jun 12 2003
# Whom: Andre Sachs <asachs@uunet.co.za>
#
# $FreeBSD$
#
PORTNAME= mod_webapp
PORTVERSION= 4.1.24
CATEGORIES= www
MASTER_SITES= http://jakarta.apache.org/%SUBDIR%/
MASTER_SITE_SUBDIR= builds/jakarta-tomcat-4.0/release/v${TOMCAT_RELEASE}/src
DISTNAME= jakarta-tomcat-connectors-${CONNECTORS_RELEASE}-src
DIST_SUBDIR= mod_webapp
MAINTAINER= asachs@uunet.co.za
COMMENT= Apache module mounts Tomcat web applications
BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 \
${NONEXISTANT}:${PORTSDIR}/devel/apr:extract \
${AUTOCONF}:${PORTSDIR}/devel/autoconf \
${LIBTOOL}:${PORTSDIR}/devel/libtool
RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
USE_GMAKE= yes
INSTALLS_SHLIB= yes
# Release information for distribution files.
TOMCAT_RELEASE= ${PORTVERSION}
CONNECTORS_RELEASE= ${PORTVERSION}
.include <bsd.port.pre.mk>
# Apache locations.
APXS?= ${LOCALBASE}/sbin/apxs
APACHECTL?= ${LOCALBASE}/sbin/apachectl
APR_LIB?= ${LOCALBASE}/lib/
APR_INCLUDE?= ${LOCALBASE}/include/apr-0/
APACHE_MODULES?= libexec/apache/
APR_SRC?= ${PORTSDIR}/devel/apr/work/apr-?\.?\.?/
LIBTOOL?= ${LOCALBASE}/bin/libtool
AUTOCONF?= ${LOCALBASE}/bin/autoconf
# If the user's changed the modules directory, pack things correctly.
PLIST_SUB= APACHE_MODULES=${APACHE_MODULES}
# Build options.
APACHE_VERSION= 1.3.6
WRKSRC= ${WRKDIR}/${DISTNAME}/webapp
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --with-apxs=${APXS} \
--with-apr-lib=${APR_LIB} \
--with-apr-include=${APR_INCLUDE} \
--with-apr=${APR_SRC} \
--without-ant
pre-configure:
cd ${WRKSRC} && ${AUTOCONF}
pre-build:
${MKDIR} ${WRKSRC}/build
${MKDIR} ${WRKSRC}/build/objs
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/apache-1.3/mod_webapp.so \
${PREFIX}/libexec/apache
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/mod_webapp
${INSTALL_MAN} ${WRKSRC}/INSTALL.txt ${PREFIX}/share/doc/mod_webapp
.endif
.include <bsd.port.post.mk>

1
www/mod_webapp/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (mod_webapp/jakarta-tomcat-connectors-4.1.24-src.tar.gz) = 0daa701e51d04570006abce1ac580aed

View File

@ -0,0 +1,31 @@
--- configure.in.orig Tue Jun 10 12:18:27 2003
+++ configure.in Tue Jun 10 12:18:57 2003
@@ -207,17 +207,17 @@
dnl ----------------------------------------------------------------------
dnl Do a check on the C compiler to see if apxs reports the same one
dnl ----------------------------------------------------------------------
- WA_APXS_GET([tempval],[${APXS}],[CC])
- AC_MSG_CHECKING([for compiler coherency])
- if test "${tempval}" != "${CC}" ; then
- AC_MSG_RESULT([error])
- AC_MSG_RESULT([compiler discovered by apr: ${CC}])
- AC_MSG_RESULT([compiler used by apache apxs: ${tempval}])
- AC_MSG_ERROR([the apache apxs and apr compilers must be the same])
- exit 1
- fi
- AC_MSG_RESULT([ok (${CC})])
- unset tempval
+ dnl WA_APXS_GET([tempval],[${APXS}],[CC])
+ dnl AC_MSG_CHECKING([for compiler coherency])
+ dnl if test "${tempval}" != "${CC}" ; then
+ dnl AC_MSG_RESULT([error])
+ dnl AC_MSG_RESULT([compiler discovered by apr: ${CC}])
+ dnl AC_MSG_RESULT([compiler used by apache apxs: ${tempval}])
+ dnl AC_MSG_ERROR([the apache apxs and apr compilers must be the same])
+ dnl exit 1
+ dnl fi
+ dnl AC_MSG_RESULT([ok (${CC})])
+ dnl unset tempval
dnl ----------------------------------------------------------------------
dnl Apache 1.3 configuration complete

View File

@ -0,0 +1,57 @@
#!/bin/sh
#
# Try to de-activate mod_webapp in the installed httpd.conf and warn
# if this fails.
#
# $FreeBSD$
#
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
TMPDIR=${TMPDIR:=/tmp}
PKG_TMPDIR=${PKG_TMPDIR:=${TMPDIR}}
apxscmd=${PKG_PREFIX}/sbin/apxs
tmpdir=${PKG_TMPDIR}/deinstmod_webapp.$$
if [ ! -x ${apxscmd} ]; then
echo Can\'t find the apxs program: ${apxscmd}.
exit 1
fi
confdir=`${apxscmd} -q SYSCONFDIR`
if [ ! -d ${confdir} ]; then
echo Can\'t find Apache conf dir: ${confdir}
exit 1
fi
if [ -f ${confdir}/httpd.conf ]; then
conffile=httpd.conf
fi
if [ -f ${confdir}/httpd.conf.default ]; then
conffile="${conffile} httpd.conf.default"
fi
if [ -z "${conffile}" ]; then
echo Can\'t find either of ${confdir}/httpd.conf or
echo ${confdir}/httpd.conf.default.
exit 1
fi
if ! mkdir ${tmpdir}; then
echo Can\'t create temporary directory: ${tmpdir}
exit 1
fi
for i in ${conffile}; do
awk '{if (!/^LoadModule webapp_module/ && !/^AddModule mod_webapp.c/) \
print $0}' < ${confdir}/$i > ${tmpdir}/$i
echo Updating $i in config dir: ${confdir}
cat ${tmpdir}/$i > ${confdir}/$i
done
rm -rf ${tmpdir}
exit 0

5
www/mod_webapp/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
Mod_webapp is an Apache module that allows Tomcat applications to be
mounted into an Apache server. Tomcat is a Java servlet and JSP engine.
Apache is the popular webserver.
WWW: http://jakarta.apache.org/tomcat/

View File

@ -0,0 +1,65 @@
#!/bin/sh
#
# Try to activate mod_webapp in the installed httpd.conf and warn
# if this fails. This script could be replaced with a simple @exec
# line in the PLIST if the apache13 package installed an httpd.conf.
#
# $FreeBSD$
#
if [ "$2" != "POST-INSTALL" ]; then
exit 0
fi
TMPDIR=${TMPDIR:=/tmp}
PKG_TMPDIR=${PKG_TMPDIR:=${TMPDIR}}
apxscmd=${PKG_PREFIX}/sbin/apxs
webappmod=${PKG_PREFIX}/libexec/apache/mod_webapp.so
tmpdir=${PKG_TMPDIR}/instmod_webapp.$$
if [ ! -x ${apxscmd} ]; then
echo Can\'t find the apxs program: ${apxscmd}.
exit 1
fi
confdir=`${apxscmd} -q SYSCONFDIR`
if [ ! -d ${confdir} ]; then
echo Can\'t find Apache conf dir: ${confdir}
exit 1
fi
if [ ! -f ${confdir}/httpd.conf ]; then
if [ ! -f ${confdir}/httpd.conf.default ]; then
echo Can\'t find either of ${confdir}/httpd.conf nor
echo ${confdir}/httpd.conf.default.
exit 1
fi
if ! mkdir ${tmpdir}; then
echo Can\'t create temporary directory: ${tmpdir}
exit 1
fi
cp ${confdir}/httpd.conf.default ${tmpdir}/httpd.conf
if ${apxscmd} -e -S SYSCONFDIR=${tmpdir} -a -n webapp ${webappmod}; then
echo Updating httpd.conf.default in config dir: ${confdir}
cat ${tmpdir}/httpd.conf > ${confdir}/httpd.conf.default
rm -rf ${tmpdir}
exit 0
else
rm -rf ${tmpdir}
echo The apxs command failed to activate mod_webapp in the config
echo file: ${tmpdir}/httpd.conf.
exit 1
fi
elif ${apxscmd} -e -a -n webapp ${webappmod}; then
exit 0
else
echo The apxs command failed to activate mod_webapp in the config
echo file: ${confdir}/httpd.conf
exit 1
fi
exit 0

3
www/mod_webapp/pkg-plist Normal file
View File

@ -0,0 +1,3 @@
%%APACHE_MODULES%%/mod_webapp.so
%%PORTDOCS%%share/doc/mod_webapp/INSTALL.txt
%%PORTDOCS%%@dirrm share/doc/mod_webapp