From e6e2609df285ca9f52fcfbed026c89c599bc3ed6 Mon Sep 17 00:00:00 2001 From: kim Date: Sat, 14 Apr 2001 19:42:53 +0000 Subject: Use APACHE_SYSCONFDIR to set sysconfdir (the location of config files). --- mk/mk.conf.example | 9 ++++++++- www/apache/Makefile | 14 +++++++++++++- www/apache/files/config.layout | 4 ++-- www/apache/pkg/DEINSTALL | 6 +++--- www/apache/pkg/INSTALL | 6 +++--- www/apache/pkg/PLIST | 9 +++++---- www/apache6/Makefile | 15 +++++++++++++-- www/apache6/pkg/DEINSTALL | 6 +++--- www/apache6/pkg/INSTALL | 6 +++--- www/apache6/pkg/PLIST | 9 +++++---- 10 files changed, 58 insertions(+), 26 deletions(-) diff --git a/mk/mk.conf.example b/mk/mk.conf.example index c3172d26d0e..714a0b1e279 100644 --- a/mk/mk.conf.example +++ b/mk/mk.conf.example @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf.example,v 1.195 2001/04/13 04:18:33 kim Exp $ +# $NetBSD: mk.conf.example,v 1.196 2001/04/14 19:42:53 kim Exp $ # # Sample /etc/mk.conf file, which can be used to set specific values @@ -307,6 +307,13 @@ # Possible: not defined, YES # Default: not defined +#APACHE_SYSCONFDIR= /etc/httpd +# Specifies the location for Apache configuration files. +# If your ${LOCALBASE} is shared between machines use /etc/httpd +# or a similar directory that is local to each machine. +# Possible: Any valid directory +# Default: ${LOCALBASE}/etc/httpd + #APACHE_USER= www # Used in the apache package to specify the user allowed to execute # the `suexec' wrapper. diff --git a/www/apache/Makefile b/www/apache/Makefile index 287f4bc3d4e..f20bf7b2acc 100644 --- a/www/apache/Makefile +++ b/www/apache/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.63 2001/03/13 20:52:26 jlam Exp $ +# $NetBSD: Makefile,v 1.64 2001/04/14 19:42:53 kim Exp $ # # The fourth number in the PKGNAME version indicates a NetBSD pkg revision # (to indicate changes in the shipped third party patches such as the mod_ssl @@ -42,6 +42,9 @@ CONFIGURE_ENV+= OPTIM="${OPTIM}" .include "../../mk/bsd.prefs.mk" +APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd +BUILD_DEFS+= APACHE_SYSCONFDIR + .if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES APACHE_USER?= www SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin @@ -108,6 +111,7 @@ pre-patch: pre-configure: ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ + -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ ${FILESDIR}/config.layout > ${WRKDIR}/config.layout post-build: @@ -120,18 +124,26 @@ pre-install: -e "s|@RM@|${RM}|g" \ -e "s|@RMDIR@|${RMDIR}|g" \ -e "s|@TRUE@|${TRUE}|g" \ + -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} ${SED} -e "s|@CAT@|${CAT}|g" \ -e "s|@CHMOD@|${CHMOD}|g" \ -e "s|@CHOWN@|${CHOWN}|g" \ -e "s|@CP@|${CP}|g" \ -e "s|@MKDIR@|${MKDIR}|g" \ + -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ ${PKGDIR}/INSTALL > ${INSTALL_FILE} post-install: .if !defined(NOPIC) cd ${PREFIX}/lib/httpd; ${MV} libproxy.so mod_proxy.so .endif + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/httpd + for i in httpd.conf magic mime.types; do \ + ${INSTALL_DATA} ${APACHE_SYSCONFDIR}/$$i.default \ + ${PREFIX}/share/examples/httpd; \ + ${RM} -f ${APACHE_SYSCONFDIR}/$$i.default; \ + done ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs ${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL diff --git a/www/apache/files/config.layout b/www/apache/files/config.layout index e74da5a03dd..f35b0b74bce 100644 --- a/www/apache/files/config.layout +++ b/www/apache/files/config.layout @@ -1,4 +1,4 @@ -# $NetBSD: config.layout,v 1.1 2001/03/13 20:52:27 jlam Exp $ +# $NetBSD: config.layout,v 1.2 2001/04/14 19:42:54 kim Exp $ prefix: @PREFIX@ @@ -7,7 +7,7 @@ bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libexecdir: ${exec_prefix}/lib/httpd mandir: ${prefix}/man -sysconfdir: ${prefix}/etc/httpd +sysconfdir: @APACHE_SYSCONFDIR@ datadir: ${prefix}/share/httpd iconsdir: ${prefix}/share/httpd/icons htdocsdir: ${prefix}/share/httpd/htdocs diff --git a/www/apache/pkg/DEINSTALL b/www/apache/pkg/DEINSTALL index 3235f808ba9..caf4bf2cd0d 100644 --- a/www/apache/pkg/DEINSTALL +++ b/www/apache/pkg/DEINSTALL @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.5 2001/02/02 16:39:58 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.6 2001/04/14 19:42:54 kim Exp $ PKGNAME=$1 STAGE=$2 @@ -10,12 +10,12 @@ RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" -SERVERROOT=${PKG_PREFIX}/etc/httpd +SERVERROOT="@APACHE_SYSCONFDIR@" CGIBINDIR=${PKG_PREFIX}/libexec/cgi-bin DATADIR=${PKG_PREFIX}/share/httpd LOGDIR=/var/log/httpd SPOOLDIR=/var/spool/httpd -SAMPLECONFDIR=${SERVERROOT} +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd CONFDIR=${SERVERROOT} CONFFILES="httpd.conf" NONCONFFILES="magic mime.types" diff --git a/www/apache/pkg/INSTALL b/www/apache/pkg/INSTALL index 34ca76ad245..ca70726b155 100644 --- a/www/apache/pkg/INSTALL +++ b/www/apache/pkg/INSTALL @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: INSTALL,v 1.4 2001/02/02 16:39:58 jlam Exp $ +# $NetBSD: INSTALL,v 1.5 2001/04/14 19:42:54 kim Exp $ PKGNAME=$1 STAGE=$2 @@ -11,10 +11,10 @@ CHOWN="@CHOWN@" CP="@CP@" MKDIR="@MKDIR@" -SERVERROOT=${PKG_PREFIX}/etc/httpd +SERVERROOT="@APACHE_SYSCONFDIR@" LOGDIR=/var/log/httpd SPOOLDIR=/var/spool/httpd -SAMPLECONFDIR=${SERVERROOT} +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd CONFDIR=${SERVERROOT} CONFFILES="httpd.conf" NONCONFFILES="magic mime.types" diff --git a/www/apache/pkg/PLIST b/www/apache/pkg/PLIST index df260f703dd..f53ba492779 100644 --- a/www/apache/pkg/PLIST +++ b/www/apache/pkg/PLIST @@ -1,10 +1,7 @@ -@comment $NetBSD: PLIST,v 1.19 2001/03/13 20:52:28 jlam Exp $ +@comment $NetBSD: PLIST,v 1.20 2001/04/14 19:42:54 kim Exp $ bin/dbmmanage bin/htdigest bin/htpasswd -etc/httpd/httpd.conf.default -etc/httpd/magic.default -etc/httpd/mime.types.default etc/rc.d/apache include/httpd/ap.h include/httpd/ap_alloc.h @@ -71,6 +68,9 @@ sbin/apxs sbin/httpd sbin/logresolve sbin/rotatelogs +share/examples/httpd/httpd.conf.default +share/examples/httpd/magic.default +share/examples/httpd/mime.types.default share/httpd/htdocs/README.rus share/httpd/htdocs/apache_pb.gif share/httpd/htdocs/index.html.ca @@ -411,6 +411,7 @@ share/httpd/icons/world2.gif @dirrm share/httpd/htdocs/manual/images @dirrm share/httpd/htdocs/manual/howto @dirrm share/httpd/htdocs/manual +@dirrm share/examples/httpd @dirrm include/httpd/xml @dirrm include/httpd @unexec rmdir %D/libexec/cgi-bin 2>/dev/null || true diff --git a/www/apache6/Makefile b/www/apache6/Makefile index 2e2f07f981f..702e3ec3cb2 100644 --- a/www/apache6/Makefile +++ b/www/apache6/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2001/03/01 04:03:08 itojun Exp $ +# $NetBSD: Makefile,v 1.27 2001/04/14 19:42:54 kim Exp $ # # The fourth number in the PKGNAME version indicates a NetBSD pkg revision # (to indicate changes in the shipped third party patches such as the mod_ssl @@ -34,7 +34,6 @@ CONFIGURE_SCRIPT= ${WRKSRC}/configure.v6 CONFIGURE_ARGS+= --prefix=${PREFIX} \ --sbindir=${PREFIX}/sbin \ --libexecdir=${PREFIX}/lib/httpd \ - --sysconfdir=${PREFIX}/etc/httpd \ --datadir=${PREFIX}/share/httpd \ --cgidir=${PREFIX}/libexec/cgi-bin \ --includedir=${PREFIX}/include/httpd \ @@ -56,6 +55,10 @@ BUILD_DEFS+= USE_INET6 IGNORE= "IPv6 only build" .endif +APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd +CONFIGURE_ARGS+= --sysconfdir=${APACHE_SYSCONFDIR} +BUILD_DEFS+= APACHE_SYSCONFDIR + .if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES APACHE_USER?= www SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin @@ -119,18 +122,26 @@ pre-install: -e "s|@RM@|${RM}|g" \ -e "s|@RMDIR@|${RMDIR}|g" \ -e "s|@TRUE@|${TRUE}|g" \ + -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} ${SED} -e "s|@CAT@|${CAT}|g" \ -e "s|@CHMOD@|${CHMOD}|g" \ -e "s|@CHOWN@|${CHOWN}|g" \ -e "s|@CP@|${CP}|g" \ -e "s|@MKDIR@|${MKDIR}|g" \ + -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ ${PKGDIR}/INSTALL > ${INSTALL_FILE} post-install: .if !defined(NOPIC) cd ${PREFIX}/lib/httpd; ${MV} libproxy.so mod_proxy.so .endif + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/httpd + for i in httpd.conf magic mime.types; do \ + ${INSTALL_DATA} ${APACHE_SYSCONFDIR}/$$i.default \ + ${PREFIX}/share/examples/httpd; \ + ${RM} -f ${APACHE_SYSCONFDIR}/$$i.default; \ + done ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs ${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL diff --git a/www/apache6/pkg/DEINSTALL b/www/apache6/pkg/DEINSTALL index d69468b9744..d8aaa0373a7 100644 --- a/www/apache6/pkg/DEINSTALL +++ b/www/apache6/pkg/DEINSTALL @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/02/06 10:58:20 itojun Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/04/14 19:42:54 kim Exp $ PKGNAME=$1 STAGE=$2 @@ -10,12 +10,12 @@ RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" -SERVERROOT=${PKG_PREFIX}/etc/httpd +SERVERROOT="@APACHE_SYSCONFDIR@" CGIBINDIR=${PKG_PREFIX}/libexec/cgi-bin DATADIR=${PKG_PREFIX}/share/httpd LOGDIR=/var/log/httpd SPOOLDIR=/var/spool/httpd -SAMPLECONFDIR=${SERVERROOT} +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd CONFDIR=${SERVERROOT} CONFFILES="httpd.conf" NONCONFFILES="magic mime.types" diff --git a/www/apache6/pkg/INSTALL b/www/apache6/pkg/INSTALL index 2b03117eaea..b3db41312a8 100644 --- a/www/apache6/pkg/INSTALL +++ b/www/apache6/pkg/INSTALL @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: INSTALL,v 1.1 2001/02/06 10:58:20 itojun Exp $ +# $NetBSD: INSTALL,v 1.2 2001/04/14 19:42:54 kim Exp $ PKGNAME=$1 STAGE=$2 @@ -11,10 +11,10 @@ CHOWN="@CHOWN@" CP="@CP@" MKDIR="@MKDIR@" -SERVERROOT=${PKG_PREFIX}/etc/httpd +SERVERROOT="@APACHE_SYSCONFDIR@" LOGDIR=/var/log/httpd SPOOLDIR=/var/spool/httpd -SAMPLECONFDIR=${SERVERROOT} +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd CONFDIR=${SERVERROOT} CONFFILES="httpd.conf" NONCONFFILES="magic mime.types" diff --git a/www/apache6/pkg/PLIST b/www/apache6/pkg/PLIST index 09e7d34280b..c3ea485c358 100644 --- a/www/apache6/pkg/PLIST +++ b/www/apache6/pkg/PLIST @@ -1,10 +1,7 @@ -@comment $NetBSD: PLIST,v 1.10 2001/03/01 04:03:09 itojun Exp $ +@comment $NetBSD: PLIST,v 1.11 2001/04/14 19:42:54 kim Exp $ bin/dbmmanage bin/htdigest bin/htpasswd -etc/httpd/httpd.conf.default -etc/httpd/magic.default -etc/httpd/mime.types.default etc/rc.d/apache include/httpd/ap.h include/httpd/ap_alloc.h @@ -69,6 +66,9 @@ sbin/apxs sbin/httpd sbin/logresolve sbin/rotatelogs +share/examples/httpd/httpd.conf.default +share/examples/httpd/magic.default +share/examples/httpd/mime.types.default share/httpd/htdocs/README.rus share/httpd/htdocs/apache_pb.gif share/httpd/htdocs/index.html.ca @@ -408,6 +408,7 @@ share/httpd/icons/world2.gif @dirrm share/httpd/htdocs/manual/images @dirrm share/httpd/htdocs/manual/howto @dirrm share/httpd/htdocs/manual +@dirrm share/examples/httpd @dirrm include/httpd/xml @dirrm include/httpd @unexec rmdir %D/libexec/cgi-bin 2>/dev/null || true -- cgit v1.2.3