diff options
author | Sheldon Hearn <sheldonh@FreeBSD.org> | 2003-06-12 14:06:21 +0000 |
---|---|---|
committer | Sheldon Hearn <sheldonh@FreeBSD.org> | 2003-06-12 14:06:21 +0000 |
commit | dcfd42987ea44dbea88178675510971cff31700e (patch) | |
tree | 8a123f4e54d34b531079186dffe61c68b6ed2a75 /www/mod_webapp | |
parent | 522122252e9b31ce41adfa1fa0a826a9efe65215 (diff) | |
download | ports-dcfd42987ea44dbea88178675510971cff31700e.tar.gz ports-dcfd42987ea44dbea88178675510971cff31700e.zip |
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>
Notes
Notes:
svn path=/head/; revision=82864
Diffstat (limited to 'www/mod_webapp')
-rw-r--r-- | www/mod_webapp/Makefile | 75 | ||||
-rw-r--r-- | www/mod_webapp/distinfo | 1 | ||||
-rw-r--r-- | www/mod_webapp/files/patch-configure.in | 31 | ||||
-rw-r--r-- | www/mod_webapp/pkg-deinstall | 57 | ||||
-rw-r--r-- | www/mod_webapp/pkg-descr | 5 | ||||
-rw-r--r-- | www/mod_webapp/pkg-install | 65 | ||||
-rw-r--r-- | www/mod_webapp/pkg-plist | 3 |
7 files changed, 237 insertions, 0 deletions
diff --git a/www/mod_webapp/Makefile b/www/mod_webapp/Makefile new file mode 100644 index 000000000000..c159a518252e --- /dev/null +++ b/www/mod_webapp/Makefile @@ -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> diff --git a/www/mod_webapp/distinfo b/www/mod_webapp/distinfo new file mode 100644 index 000000000000..08c290924c8e --- /dev/null +++ b/www/mod_webapp/distinfo @@ -0,0 +1 @@ +MD5 (mod_webapp/jakarta-tomcat-connectors-4.1.24-src.tar.gz) = 0daa701e51d04570006abce1ac580aed diff --git a/www/mod_webapp/files/patch-configure.in b/www/mod_webapp/files/patch-configure.in new file mode 100644 index 000000000000..09067272425c --- /dev/null +++ b/www/mod_webapp/files/patch-configure.in @@ -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 diff --git a/www/mod_webapp/pkg-deinstall b/www/mod_webapp/pkg-deinstall new file mode 100644 index 000000000000..59acc0d43b83 --- /dev/null +++ b/www/mod_webapp/pkg-deinstall @@ -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 diff --git a/www/mod_webapp/pkg-descr b/www/mod_webapp/pkg-descr new file mode 100644 index 000000000000..f91dde00d91e --- /dev/null +++ b/www/mod_webapp/pkg-descr @@ -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/ diff --git a/www/mod_webapp/pkg-install b/www/mod_webapp/pkg-install new file mode 100644 index 000000000000..366a08d796b6 --- /dev/null +++ b/www/mod_webapp/pkg-install @@ -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 diff --git a/www/mod_webapp/pkg-plist b/www/mod_webapp/pkg-plist new file mode 100644 index 000000000000..fdc1d699fc82 --- /dev/null +++ b/www/mod_webapp/pkg-plist @@ -0,0 +1,3 @@ +%%APACHE_MODULES%%/mod_webapp.so +%%PORTDOCS%%share/doc/mod_webapp/INSTALL.txt +%%PORTDOCS%%@dirrm share/doc/mod_webapp |