summaryrefslogtreecommitdiff
path: root/www/apache
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2002-07-30 18:40:14 +0000
committerwiz <wiz@pkgsrc.org>2002-07-30 18:40:14 +0000
commitfb88b63b7374e4c1a8c4fded8d03c621b09ad509 (patch)
treeeea07a151dca6ced325b2f675dc775e593a1f81c /www/apache
parent5a829c52a9241716db33df803bc1537d650b81ae (diff)
downloadpkgsrc-fb88b63b7374e4c1a8c4fded8d03c621b09ad509.tar.gz
Update apache packages with some common changes:
Give Apache a user and group by default, not only with suexec. The variables for this have changed from APACHE_SUEXEC_USER and APACHE_SUEXEC_GROUP to APACHE_USER and APACHE_GROUP. Mention 'Apache' in COMMENT. Use variables for the version number instead of copying it around. Bump PKGREVISION. For apache{,6}: Change paths to /var/httpd instead of /var/spool/httpd. Honour STRIPFLAG. Add --without-confadjust as configure argument. Enable the 'define' module. For apache: Enable proxy module on NOPIC platforms. Some of these changes are based on pkg/17469 by Greg A. Woods, some on comments by Johnny Lam. Reviewed by Johnny Lam.
Diffstat (limited to 'www/apache')
-rw-r--r--www/apache/Makefile54
-rw-r--r--www/apache/PLIST.shared4
-rw-r--r--www/apache/files/config.layout6
3 files changed, 40 insertions, 24 deletions
diff --git a/www/apache/Makefile b/www/apache/Makefile
index 2f8f003bba6..6f6929b7e6d 100644
--- a/www/apache/Makefile
+++ b/www/apache/Makefile
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile,v 1.101 2002/06/24 16:26:18 taca Exp $
+# $NetBSD: Makefile,v 1.102 2002/07/30 18:40:14 wiz Exp $
#
# This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of
# code hooks that allow mod_ssl to be compiled separately later, if desired).
-DISTNAME= apache_1.3.26
-PKGNAME= apache-1.3.26
-PKGREVISION= 2
+DISTNAME= apache_${APACHE_VERSION}
+PKGNAME= apache-${APACHE_VERSION}
+APACHE_VERSION= 1.3.26
+PKGREVISION= 3
CATEGORIES= www
MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
http://www.apache.de/dist/httpd/
@@ -19,7 +20,8 @@ NETBSD_LOGO= sitedrivenby.gif
SITES_${NETBSD_LOGO}= http://www.netbsd.org/images/logos/
DISTFILES+= ${NETBSD_LOGO}
-MODSSL_DISTNAME= mod_ssl-2.8.10-1.3.26
+MODSSL_VERSION= 2.8.10
+MODSSL_DISTNAME= mod_ssl-${MODSSL_VERSION}-${APACHE_VERSION}
MODSSL_DIST= ${MODSSL_DISTNAME}${EXTRACT_SUFX}
MODSSL_SRC= ${WRKDIR}/${MODSSL_DISTNAME}
SITES_${MODSSL_DIST}= http://www.modssl.org/source/ \
@@ -29,9 +31,9 @@ DISTFILES+= ${MODSSL_DIST}
MAINTAINER= jlam@netbsd.org
HOMEPAGE= http://httpd.apache.org/
-COMMENT= HTTP (Web) server
+COMMENT= Apache HTTP (Web) server
-CONFLICTS= apache-*modssl-[0-9]* apache6-[0-9]*
+CONFLICTS= apache-*ssl-[0-9]* apache6-[0-9]*
EXTRACT_ONLY= ${DISTFILES:N*.gif}
USE_BUILDLINK_ONLY= YES
@@ -42,6 +44,7 @@ CONFIGURE_ARGS+= --enable-module=most \
--disable-module=auth_dbm
CONFIGURE_ARGS+= --enable-rule=EAPI \
--disable-module=ssl
+CONFIGURE_ARGS+= --without-confadjust
CONFIGURE_ARGS+= --with-perl=${PERL5}
CONFIGURE_ARGS+= --with-port=80
CONFIGURE_ENV+= OPTIM="${APACHE_CUSTOM_CFLAGS}"
@@ -50,39 +53,48 @@ CONFIGURE_ENV+= BINOWN=${BINOWN} BINGRP=${BINGRP}
.include "../../mk/bsd.prefs.mk"
+.if empty(STRIPFLAG)
+CONFIGURE_ARGS+= --without-execstrip
+.endif
+
PKG_SYSCONFSUBDIR?= httpd
+APACHE_USER?= www
+APACHE_GROUP?= www
+BUILD_DEFS+= APACHE_USER APACHE_GROUP
+
+CONFIGURE_ARGS+= --server-uid=${APACHE_USER}
+CONFIGURE_ARGS+= --server-gid=${APACHE_GROUP}
+
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
-APACHE_SUEXEC_USER?= www
APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
APACHE_SUEXEC_CONFIGURE_ARGS+= \
- --suexec-caller=${APACHE_SUEXEC_USER} \
+ --suexec-caller=${APACHE_USER} \
--suexec-safepath='${APACHE_SUEXEC_PATH}' \
--suexec-docroot=${APACHE_SUEXEC_DOCROOT}
CONFIGURE_ARGS+= --enable-suexec \
${APACHE_SUEXEC_CONFIGURE_ARGS:M--suexec-*}
PLIST_SRC= ${PKGDIR}/PLIST.suexec
-PKG_USERS= ${APACHE_SUEXEC_USER}:nogroup::Apache\\ suEXEC\\ user
BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS
.endif
# Note that there is NO static compile module hook here. This is intentional.
# Under Apache 1.3, modules can be compiled to link dynamically to the server
# using the "apxs" program. See apxs(8).
-
+#
.if !defined(NOPIC)
CONFIGURE_ARGS+= --enable-module=so # requires dlopen()
-CONFIGURE_ARGS+= --enable-shared=proxy
-CONFIGURE_ARGS+= --enable-shared=define # from mod_ssl pkg.addon
+_ENABLE_MOD= --enable-shared
PLIST_SRC+= ${PKGDIR}/PLIST.shared
.else
-CONFIGURE_ARGS+= --disable-module=proxy
-CONFIGURE_ARGS+= --disable-shared=define
+_ENABLE_MOD= --enable-module
.endif
-
PLIST_SRC+= ${PKGDIR}/PLIST
+CONFIGURE_ARGS+= ${_ENABLE_MOD}=proxy
+CONFIGURE_ARGS+= ${_ENABLE_MOD}=define # from mod_ssl pkg.addon
+
APACHE_CUSTOM_CFLAGS?= # empty
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
@@ -120,9 +132,13 @@ RCD_SCRIPTS= apache
MAKE_DIRS= ${PREFIX}/share/httpd
MAKE_DIRS+= ${PREFIX}/share/httpd/htdocs
-OWN_DIRS= /var/log/httpd
-OWN_DIRS+= /var/spool/httpd
-OWN_DIRS_PERMS+= /var/spool/httpd/proxy nobody nobody 0755
+OWN_DIRS+= ${PREFIX}/lib/httpd
+OWN_DIRS+= /var/httpd
+OWN_DIRS+= /var/log/httpd
+OWN_DIRS_PERMS+= /var/httpd/proxy ${APACHE_USER} ${APACHE_GROUP} 0755
+
+PKG_GROUPS= ${APACHE_GROUP}
+PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}::Apache\\ user
post-extract:
${CP} ${FILESDIR}/ap_include_extern.h ${WRKSRC}/src/include
diff --git a/www/apache/PLIST.shared b/www/apache/PLIST.shared
index a754f90f790..afcaaa7fe70 100644
--- a/www/apache/PLIST.shared
+++ b/www/apache/PLIST.shared
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST.shared,v 1.2 2002/02/01 16:04:39 jlam Exp $
+@comment $NetBSD: PLIST.shared,v 1.3 2002/07/30 18:40:14 wiz Exp $
lib/httpd/httpd.exp
lib/httpd/mod_define.so
lib/httpd/mod_proxy.so
-@dirrm lib/httpd
+@unexec ${RMDIR} %D/lib/httpd 2>/dev/null || ${TRUE}
diff --git a/www/apache/files/config.layout b/www/apache/files/config.layout
index 0208f9c3a00..78cd648c07a 100644
--- a/www/apache/files/config.layout
+++ b/www/apache/files/config.layout
@@ -1,4 +1,4 @@
-# $NetBSD: config.layout,v 1.4 2001/11/26 07:34:06 jlam Exp $
+# $NetBSD: config.layout,v 1.5 2002/07/30 18:40:14 wiz Exp $
<Layout pkgsrc>
prefix: @PREFIX@
@@ -14,8 +14,8 @@ htdocsdir: ${prefix}/share/httpd/htdocs
manualdir: ${prefix}/share/httpd/htdocs/manual
cgidir: ${exec_prefix}/libexec/cgi-bin
includedir: ${prefix}/include/httpd
-localstatedir: /var/run
+localstatedir: /var/httpd
runtimedir: /var/run
logfiledir: /var/log/httpd
-proxycachedir: /var/spool/httpd/proxy
+proxycachedir: /var/httpd/proxy
</Layout>