summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-22 20:25:26 +0000
committerjlam <jlam@pkgsrc.org>2004-11-22 20:25:26 +0000
commit3b00feb3efda7b23afb58ddd92d8c4f360375b22 (patch)
treebea71619f8937c34cae6d8155f7b0384b2880b62 /www
parent46a77a4790ed8889d45c6991f9f9d20d2cb4cf0f (diff)
downloadpkgsrc-3b00feb3efda7b23afb58ddd92d8c4f360375b22.tar.gz
Convert to use bsd.options.mk: APACHE_SUEXEC is now the "suexec" option.
Diffstat (limited to 'www')
-rw-r--r--www/apache2/Makefile26
-rw-r--r--www/apache2/options.mk33
2 files changed, 38 insertions, 21 deletions
diff --git a/www/apache2/Makefile b/www/apache2/Makefile
index 8d8b8d5c4c8..fcbd8bebfe0 100644
--- a/www/apache2/Makefile
+++ b/www/apache2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2004/11/22 19:56:23 jlam Exp $
+# $NetBSD: Makefile,v 1.54 2004/11/22 20:25:26 jlam Exp $
PKGNAME= apache-${APACHE_VERSION}
PKGREVISION= 2
@@ -51,26 +51,8 @@ APACHE_MODULES?= ${DFLT_APACHE_MODULES}
CONFIGURE_ARGS+= --enable-modules="${APACHE_MODULES}"
BUILD_DEFS+= APACHE_MODULES
-APACHE_USER?= www
-APACHE_GROUP?= www
-
-.if defined(APACHE_SUEXEC) && !empty(APACHE_SUEXEC:M[yY][eE][sS])
-APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
-APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
-APACHE_SUEXEC_CONFIGURE_ARGS+= \
- --with-suexec-bin=${PREFIX}/sbin/suexec \
- --with-suexec-caller=${APACHE_USER} \
- --with-suexec-safepath='${APACHE_SUEXEC_PATH}' \
- --with-suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
- --with-suexec-logfile=${VARBASE}/log/httpd/suexec.log
-APACHE_MODULES+= suexec
-CONFIGURE_ARGS+= ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*}
-BUILD_DEFS+= APACHE_SUEXEC APACHE_SUEXEC_CONFIGURE_ARGS
-PLIST_SUBST+= SUEXEC_COMMENT=
-.else
-PLIST_SUBST+= SUEXEC_COMMENT="@comment "
-.endif
-
+APACHE_USER?= www
+APACHE_GROUP?= www
PKG_GROUPS= ${APACHE_GROUP}
PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}::Apache\\ user
@@ -112,6 +94,8 @@ SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g" \
-e "s|^\(Group[ ]\).*|\1${APACHE_GROUP}|g"
SUBST_MESSAGE.confs= "Fixing configuration files."
+.include "options.mk"
+
# Add dependencies for the modules that will be built. For each module
# ap_mod listed in ${APACHE_MODULES}, _AP_DEPENDS.ap_mod is a whitespace
# separated list of dependencies or buildlink3.mk files needed to build
diff --git a/www/apache2/options.mk b/www/apache2/options.mk
new file mode 100644
index 00000000000..01338b58a56
--- /dev/null
+++ b/www/apache2/options.mk
@@ -0,0 +1,33 @@
+# $NetBSD: options.mk,v 1.1 2004/11/22 20:25:26 jlam Exp $
+#
+# XXX Support for the following variables will be removed after the
+# XXX pkgsrc-2004Q4 branch is released:
+# XXX
+# XXX APACHE_SUEXEC
+
+.if defined(APACHE_SUEXEC) && !empty(APACHE_SUEXEC:M[Yy][Ee][Ss])
+PKG_DEFAULT_OPTIONS+= suexec
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.apache
+PKG_SUPPORTED_OPTIONS= suexec
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msuexec)
+APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
+APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
+APACHE_SUEXEC_CONFIGURE_ARGS+= \
+ --with-suexec-bin=${PREFIX}/sbin/suexec \
+ --with-suexec-caller=${APACHE_USER} \
+ --with-suexec-safepath='${APACHE_SUEXEC_PATH}' \
+ --with-suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
+ --with-suexec-logfile=${VARBASE}/log/httpd/suexec.log
+
+APACHE_MODULES+= suexec
+CONFIGURE_ARGS+= ${APACHE_SUEXEC_CONFIGURE_ARGS:M--with-suexec-*}
+BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS
+PLIST_SUBST+= SUEXEC_COMMENT=
+.else
+PLIST_SUBST+= SUEXEC_COMMENT="@comment "
+.endif