ports/96508: [fix] www/mod_jk: support for apache >2.0
Simun Mikecin
numisemis at yahoo.com
Sat Apr 29 11:20:21 UTC 2006
>Number: 96508
>Category: ports
>Synopsis: [fix] www/mod_jk: support for apache >2.0
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Apr 29 11:20:19 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Simun Mikecin
>Release: FreeBSD 6.1-RC amd64
>Organization:
>Environment:
System: FreeBSD data.home.hr 6.1-RC FreeBSD 6.1-RC #0: Sat Apr 29 10:57:45 CEST 2006 root at data.home.hr:/var/obj/usr/src.6/sys/DATA amd64
>Description:
Installing mod_jk port on apache 2.1 or 2.2 installs mod_jk.so module in the
right directory, but in the package database it gets recorded wrongly:
/usr/local/libexec/apache2/mod_jk.so
instead of:
/usr/local/libexec/apache21/mod_jk.so
or:
/usr/local/libexec/apache22/mod_jk.so
Also port installs *conf.sample files in /usr/local/etc/apache2/ instead of
/usr/local/etc/apache21/ or /usr/local/etc/apache22/.
With this patch www/mod_jk-apache2 helper port can be removed, since this
port now autodetects the version of apache installed on the system.
>How-To-Repeat:
Try installing this port on system with apache 2.1 or apache 2.2 installed.
>Fix:
diff -u mod_jk.old/Makefile mod_jk/Makefile
--- mod_jk.old/Makefile Thu Dec 22 23:05:38 2005
+++ mod_jk/Makefile Sat Apr 29 13:01:08 2006
@@ -7,7 +7,7 @@
PORTNAME= mod_jk
PORTVERSION= 1.2.15
-PORTREVISION= 0
+PORTREVISION= 1
PORTEPOCH?= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
@@ -17,19 +17,19 @@
MAINTAINER?= girgen at FreeBSD.org
COMMENT?= Apache JK module for connecting to Tomcat using AJP1X
-USE_APACHE= YES
+USE_APACHE= 1.3+
.include <bsd.port.pre.mk>
-.if exists(${LOCALBASE}/include/apache2/apr.h)
-WITH_APACHE2= YES
-.endif
-
-.if defined(WITH_APACHE2)
-APACHE_VER= 2.0
+.if ${APACHE_VERSION} >= 20
+.if ${APACHE_VERSION} >= 21
+APACHE2= ${APACHE_VERSION}
+PLIST_SUB= APACHE2=${APACHE_VERSION}
+.else
APACHE2= 2
PLIST_SUB= APACHE2=2
-PKGNAMESUFFIX= -apache2
+.endif
+APACHE_VER= 2.0
.else
APACHE_VER= 1.3
APACHE2=
@@ -52,6 +52,6 @@
${INSTALL_DATA} ${FILESDIR}/workers.properties.sample ${APACHE_CONF}
post-install:
- ${CAT} ${PKGMESSAGE} | ${SED} "s|/usr/local|${PREFIX}|g"
+ ${CAT} ${PKGMESSAGE} | ${SED} "s|/usr/local|${PREFIX}|g" | ${SED} "s|etc/apache|etc/apache${APACHE2}|g"
.include <bsd.port.post.mk>
Common subdirectories: mod_jk.old/files and mod_jk/files
diff -u mod_jk.old/pkg-plist mod_jk/pkg-plist
--- mod_jk.old/pkg-plist Tue Jul 26 23:46:33 2005
+++ mod_jk/pkg-plist Sat Apr 29 12:35:57 2006
@@ -1,5 +1,5 @@
etc/apache%%APACHE2%%/mod_jk.conf.sample
etc/apache%%APACHE2%%/workers.properties.sample
-libexec/apache%%APACHE2%%/mod_jk.so
+%%APACHEMODDIR%%/mod_jk.so
@exec %D/sbin/apxs -e -A -n jk %f || true
@unexec %D/sbin/apxs -e -A -n jk %f || true
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list