ports/52774: New port: mod_jk2 port (a clean build)

Palle Girgensohn girgen at pingpong.net
Thu May 29 02:40:14 UTC 2003


>Number:         52774
>Category:       ports
>Synopsis:       New port: mod_jk2 port (a clean build)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 28 19:40:07 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Palle Girgensohn <girgen at pingpong.net>
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
PING PONG
>Environment:
System: FreeBSD palle.girgensohn.se 4.7-RC FreeBSD 4.7-RC #0: Sun Sep 29 17:21:22 CEST 2002     root at palle.girgensohn.se:/usr/local/obj/usr/src/sys/STORDATAN  i386


	
>Description:
Here is yet another port of mod_jk2. This is better, though, since it
does not depend on Java to build. mod_jk2 is a C module for
apache. The jakarta-tomcat project has historically been rather clumsy
at distributing their otherwise fine software, and this is such an
example; requiring a JDK to build C code linked to apache... No,
please use this port instead, it builds cleanly using only apxs... :)

Also, as mentioned as a comment in the Makefile, the
jakarta-connectors are distributed at at least two different locations
at the jakarta distribution site; at one site, the mod_jk is fresh, at
the other, mod_jk2. This is of course very confusing, but the tarball
jakarta-tomcat-connectors-4.1.24-src.tar.gz actually holds
mod_jk2-2.0.4 (latest version), and I prefer to use that version
number.

Also, as a separate PR, there is build for apache2 (and also, ports
for mod_jk and mod_jk-apache2 are sent in, btw)... :)

IMHO, this PR supercedes ports/51995.

	
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mod_jk2
#	mod_jk2/files
#	mod_jk2/files/patch-configure-in
#	mod_jk2/files/mod_jk2.conf.sample
#	mod_jk2/files/workers2.properties.sample
#	mod_jk2/pkg-message
#	mod_jk2/pkg-plist
#	mod_jk2/distinfo
#	mod_jk2/Makefile
#	mod_jk2/pkg-descr
#
echo c - mod_jk2
mkdir -p mod_jk2 > /dev/null 2>&1
echo c - mod_jk2/files
mkdir -p mod_jk2/files > /dev/null 2>&1
echo x - mod_jk2/files/patch-configure-in
sed 's/^X//' >mod_jk2/files/patch-configure-in << 'END-of-mod_jk2/files/patch-configure-in'
XThe apache mod_jk modules *communicate* with Java using an internet
Xprotocol, AJP13, but they are written in C.  I can't come up with any
Xreason to look for a JDK here, it's plain stupid! Since apache and
Xtomcat can be run on separate machines, there is no dependency
Xwhatsoever... /Palle
X
X--- configure.in~	Wed Mar 19 10:21:04 2003
X+++ configure.in	Thu May 29 01:50:48 2003
X@@ -184,10 +184,10 @@
X 
X dnl Java settings
X 
X-JK_JDK()
X-JK_JDK_OS()
X-JK_JNI()
X-JK_PCRE()
X+dnl JK_JDK()
X+dnl JK_JDK_OS()
X+dnl JK_JNI()
X+dnl JK_PCRE()
X 
X AC_SUBST(JAVA_HOME)
X AC_SUBST(JAVA_PLATFORM)
END-of-mod_jk2/files/patch-configure-in
echo x - mod_jk2/files/mod_jk2.conf.sample
sed 's/^X//' >mod_jk2/files/mod_jk2.conf.sample << 'END-of-mod_jk2/files/mod_jk2.conf.sample'
X# Replace jsp-hostname with the hostname of your JSP server, as
X# specified in workers.properties.
X#
X<IfModule mod_jk.c>
X	JkWorkersFile %%APACHE_CONF%%/workers.properties
X	JkLogFile  logs/jk.log
X	JkLogLevel warn
X
X	# Sample JkMounts.  Replace these with the paths you would
X	# like to mount from your JSP server.
X	JkMount /*.jsp jsp-hostname
X	JkMount /servlet/* jsp-hostname
X	JkMount /examples/* jsp-hostname
X</IfModule>
END-of-mod_jk2/files/mod_jk2.conf.sample
echo x - mod_jk2/files/workers2.properties.sample
sed 's/^X//' >mod_jk2/files/workers2.properties.sample << 'END-of-mod_jk2/files/workers2.properties.sample'
X# Incredibly simple workers.properties file, intended for connecting
X# to one host, via AJP13.  See the tomcat documentation for
X# information on more exotic configuration options.
X#
X# Change jsp-hostname to the hostname of your JSP server.
X#
Xworker.list=jsp-hostname
X
Xworker.jsp-hostname.port=8009
Xworker.jsp-hostname.host=jsp-hostname
Xworker.jsp-hostname.type=ajp13
Xworker.jsp-hostname.lbfactor=1
END-of-mod_jk2/files/workers2.properties.sample
echo x - mod_jk2/pkg-message
sed 's/^X//' >mod_jk2/pkg-message << 'END-of-mod_jk2/pkg-message'
X*****************************************************************************
XMake sure mod_jk.so is enabled in /usr/local/etc/apache/httpd.conf and
Xmod_jk is configured.  Have a look at
X/usr/local/etc/apache/mod_jk.conf.sample for an example.
X*****************************************************************************
END-of-mod_jk2/pkg-message
echo x - mod_jk2/pkg-plist
sed 's/^X//' >mod_jk2/pkg-plist << 'END-of-mod_jk2/pkg-plist'
Xetc/apache%%APACHE2%%/mod_jk2.conf.sample
Xetc/apache%%APACHE2%%/workers2.properties.sample
Xlibexec/apache%%APACHE2%%/mod_jk2.so
X at exec %D/sbin/apxs -e -A -n jk2 %f
X at unexec %D/sbin/apxs -e -A -n jk2 %f
END-of-mod_jk2/pkg-plist
echo x - mod_jk2/distinfo
sed 's/^X//' >mod_jk2/distinfo << 'END-of-mod_jk2/distinfo'
XMD5 (jakarta-tomcat-connectors-4.1.24-src.tar.gz) = 0daa701e51d04570006abce1ac580aed
END-of-mod_jk2/distinfo
echo x - mod_jk2/Makefile
sed 's/^X//' >mod_jk2/Makefile << 'END-of-mod_jk2/Makefile'
X# New ports collection makefile for:	mod_jk2
X# Date created:				Thu May 29 01:24:15 CEST 2003
X# Whom:					Palle Girgensohn <girgen at pingpong.net>
X#
X# $FreeBSD$
X
XPORTNAME=	mod_jk2
XPORTVERSION=	2.0.4
XCATEGORIES=	www
XMASTER_SITES=	${MASTER_SITE_APACHE_JAKARTA}
XMASTER_SITE_SUBDIR=	jakarta-tomcat-4.0/release/v${DISTVERSION}/src
XDISTVERSION=	4.1.24
XDISTNAME=	jakarta-tomcat-connectors-${DISTVERSION}-src
X# The version numbers are a real mess, but hey, it's not my fault. The
X# distributions of tomcat are *really* messy.  The mod_jk2 is
X# distributed with tomcat-xxx, but does not share its version
X# numbering.  There is also a separate dist, but it seems to have been
X# left to die without further comments...
X
XMAINTAINER=	girgen at pingpong.net
XCOMMENT=	Apache JK2 module for connecting to Tomcat
X
XBUILD_DEPENDS=	${APXS}:${APACHE_PORT}
XRUN_DEPENDS=	${APXS}:${APACHE_PORT}
X
XAPXS=		${PREFIX}/sbin/apxs
XAPACHE_PORT?=	${PORTSDIR}/www/apache13
XAPACHE_CONF=	${LOCALBASE}/etc/apache${APACHE2}
XWRKSRC=		${WRKDIR}/jakarta-tomcat-connectors-${DISTVERSION}-src/jk/native2
X
XUSE_GMAKE=	YES
XUSE_LIBTOOL=	YES
XUSE_AUTOCONF_VER=253
XUSE_AUTOMAKE_VER=15
XAUTOMAKE_ARGS=	--add-missing
XGNU_CONFIGURE=	YES
XCONFIGURE_ARGS+=	--with-apxs${APACHE2}=${APXS}
XALL_TARGET=	jk2-build-apxs
XAPACHE2?=
XPLIST_SUB=	APACHE2=${APACHE2}
X
Xpost-patch:
X	cd ${WRKSRC}; ${ACLOCAL}; ${LOCALBASE}/bin/libtoolize
X
Xdo-install:
X	cd ${WRKSRC}/server/${APACHE_PORT:C/.*(apache[0-9]*).*/\1/} ;\
X		${GMAKE} -f Makefile.apxs install ;\
X		${APXS} -e -A -n jk2 mod_jk2.so
X	${SED} -e "s#%%APACHE_CONF%%#${APACHE_CONF}#g" ${FILESDIR}/mod_jk2.conf.sample > ${WRKDIR}/mod_jk2.conf.sample
X	${INSTALL_DATA} ${WRKDIR}/mod_jk2.conf.sample ${APACHE_CONF}
X	${INSTALL_DATA} ${FILESDIR}/workers2.properties.sample ${APACHE_CONF}
X
Xpost-install:
X	${CAT} ${PKGMESSAGE} | ${SED} "s|/usr/local|${PREFIX}|g"
X
X.include <bsd.port.mk>
END-of-mod_jk2/Makefile
echo x - mod_jk2/pkg-descr
sed 's/^X//' >mod_jk2/pkg-descr << 'END-of-mod_jk2/pkg-descr'
Xmod_jk is a replacement to the elderly mod_jserv. It is a completely
Xnew Tomcat-Apache plugin that handles the communication between
XTomcat and Apache.
X
XWWW: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html
END-of-mod_jk2/pkg-descr
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list