summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/apache/Makefile78
-rw-r--r--www/apache/pkg/DEINSTALL42
-rw-r--r--www/apache/pkg/DESCR4
-rw-r--r--www/apache/pkg/INSTALL45
-rw-r--r--www/apache/pkg/PLIST16
-rw-r--r--www/apache/pkg/PLIST.shared4
-rw-r--r--www/apache/pkg/PLIST.suexec3
7 files changed, 133 insertions, 59 deletions
diff --git a/www/apache/Makefile b/www/apache/Makefile
index feea64ba7ee..cac1c4e8bf3 100644
--- a/www/apache/Makefile
+++ b/www/apache/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2000/08/28 09:14:52 jlam Exp $
+# $NetBSD: Makefile,v 1.48 2000/09/06 06:17:55 jlam 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
@@ -25,27 +25,39 @@ CONFLICTS= apache-*modssl-* apache6-*
SSL_DISTNAME= mod_ssl-2.6.3-1.3.12
EXTRACT_ONLY= ${DISTFILES:N*.gif}
-HAS_CONFIGURE= YES
+HAS_CONFIGURE= # defined
CONFIGURE_ARGS+= --prefix=${PREFIX} --libexecdir=${PREFIX}/lib/httpd \
--runtimedir=/var/run --datadir=${PREFIX}/share/httpd \
--cgidir=${PREFIX}/libexec/cgi-bin \
- --logfiledir=/var/log/httpd --sysconfdir=${PREFIX}/etc/httpd \
+ --logfiledir=/var/log/httpd \
+ --sysconfdir=${PREFIX}/etc/httpd \
--proxycachedir=/var/spool/httpd/proxy \
--includedir=${PREFIX}/include/httpd \
- --sbindir=${PREFIX}/sbin \
- --enable-rule=EAPI --enable-module=most \
+ --sbindir=${PREFIX}/sbin
+CONFIGURE_ARGS+= --enable-rule=EAPI --enable-module=most \
--disable-module=ssl --enable-module=auth_db \
- --disable-module=auth_dbm \
- --with-perl=${PERL5}
+ --disable-module=auth_dbm
+CONFIGURE_ARGS+= --with-perl=${PERL5}
CONFIGURE_ENV+= OPTIM="${OPTIM}"
.include "../../mk/bsd.prefs.mk"
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
+SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
CONFIGURE_ARGS+= --enable-suexec --suexec-caller=www \
- --suexec-safepath='/bin:/usr/bin:${PREFIX}/bin:/usr/local/bin'
+ --suexec-safepath='${SUEXEC_PATH}'
+PLIST_SRC= ${PKGDIR}/PLIST.suexec
.endif
+.if !defined(NOPIC)
+CONFIGURE_ARGS+= --enable-module=so --enable-shared=proxy
+PLIST_SRC+= ${PKGDIR}/PLIST.shared
+.else
+CONFIGURE_ARGS+= --disable-module=proxy
+.endif
+
+PLIST_SRC+= ${PKGDIR}/PLIST
+
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
OPTIM+= -DBUFFERED_LOGS
CFLAGS+= -O6 -fomit-frame-pointer -fexpensive-optimizations
@@ -58,8 +70,6 @@ CONFIGURE_ENV+= INCLUDES="-I${LOCALBASE}/include/db2"
CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
.endif
-PLIST_SRC= ${WRKDIR}/PLIST
-
BUILD_DEFS+= APACHE_PERF_TUNING APACHE_SUEXEC
# Note that there is NO static compile module hook here. This is intentional.
@@ -67,46 +77,34 @@ BUILD_DEFS+= APACHE_PERF_TUNING APACHE_SUEXEC
# using the "apxs" program. See apxs(8).
post-extract:
- @${CP} ${FILESDIR}/ap_include_extern.h ${WRKSRC}/src/include/
- @${CP} ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/*.c ${WRKSRC}/src/ap/
- @${CP} ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/*.h ${WRKSRC}/src/include/
+ ${CP} ${FILESDIR}/ap_include_extern.h ${WRKSRC}/src/include
+ ${CP} ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/*.c ${WRKSRC}/src/ap
+ ${CP} ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/*.h ${WRKSRC}/src/include
pre-patch:
- @cd ${WRKSRC} && ${CAT} \
- ../${SSL_DISTNAME}/pkg.eapi/eapi.patch \
- ../${SSL_DISTNAME}/pkg.sslcfg/sslcfg.patch \
- ../${SSL_DISTNAME}/pkg.sslmod/sslmod.patch \
- ../${SSL_DISTNAME}/pkg.sslsup/sslsup.patch \
+ cd ${WRKSRC} && ${CAT} \
+ ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/eapi.patch \
+ ${WRKDIR}/${SSL_DISTNAME}/pkg.sslcfg/sslcfg.patch \
+ ${WRKDIR}/${SSL_DISTNAME}/pkg.sslmod/sslmod.patch \
+ ${WRKDIR}/${SSL_DISTNAME}/pkg.sslsup/sslsup.patch \
| ${PATCH} ${PATCH_ARGS}
- @cd ${WRKSRC} && ${TAIL} +156 \
- ../${SSL_DISTNAME}/pkg.ssldoc/ssldoc.patch \
+ cd ${WRKSRC} && ${TAIL} +156 \
+ ${WRKDIR}/${SSL_DISTNAME}/pkg.ssldoc/ssldoc.patch \
| ${PATCH} ${PATCH_ARGS}
post-patch:
- @${FIND} ${WRKSRC}/htdocs -name '*.orig' | xargs ${RM} -f
+ ${FIND} ${WRKSRC}/htdocs -name '*.orig' -exec ${RM} -f {} \;
post-build:
- ${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/apache.sh \
- >${WRKDIR}/apache.sh
+ ${SED} -e "s,@PREFIX@,${PREFIX},g" \
+ < ${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh
post-install:
- ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif \
- ${PREFIX}/share/httpd/htdocs
+.if !defined(NOPIC)
+ cd ${PREFIX}/lib/httpd; ${MV} libproxy.so mod_proxy.so
+.endif
+ ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs
${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache.sh
- @${MV} ${PREFIX}/lib/httpd/libproxy.so \
- ${PREFIX}/lib/httpd/mod_proxy.so 2>/dev/null || \
- ${MKDIR} ${PREFIX}/lib/httpd
- @${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
-.for FILE in man/man8/suexec.8 sbin/suexec
- @if ${TEST} -e ${PREFIX}/${FILE} ; then \
- ${ECHO} ${FILE} >>${PLIST_SRC}; \
- fi
-.endfor
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../mk/bsd.pkg.mk"
-
-.if !defined(NOPIC)
-CONFIGURE_ARGS+= --enable-module=so --enable-shared=proxy
-.else
-CONFIGURE_ARGS+= --disable-module=proxy
-.endif
diff --git a/www/apache/pkg/DEINSTALL b/www/apache/pkg/DEINSTALL
new file mode 100644
index 00000000000..383f52fcc35
--- /dev/null
+++ b/www/apache/pkg/DEINSTALL
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2000/09/06 06:17:56 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+DEINSTALL)
+ ;;
+POST-DEINSTALL)
+ SERVERROOT=${PKG_PREFIX}/etc/httpd
+ LOGDIR=/var/log/httpd
+ SPOOLDIR=/var/spool/httpd
+
+ rmdir ${SPOOLDIR}/proxy 2>/dev/null || true
+ rmdir ${SPOOLDIR} 2>/dev/null || true
+ rmdir ${LOGDIR} 2>/dev/null || true
+ rmdir ${SERVERROOT}/ssl.prm 2>/dev/null || true
+ rmdir ${SERVERROOT}/ssl.key 2>/dev/null || true
+ rmdir ${SERVERROOT}/ssl.csr 2>/dev/null || true
+ rmdir ${SERVERROOT}/ssl.crt 2>/dev/null || true
+ rmdir ${SERVERROOT}/ssl.crl 2>/dev/null || true
+ rmdir ${SERVERROOT} 2>/dev/null || true
+
+ cat << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove the
+following directories:
+
+ ${SERVERROOT}
+ ${LOGDIR}
+ ${SPOOLDIR}
+===========================================================================
+EOF
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/www/apache/pkg/DESCR b/www/apache/pkg/DESCR
index ec312aa9461..d877454ba56 100644
--- a/www/apache/pkg/DESCR
+++ b/www/apache/pkg/DESCR
@@ -1,7 +1,3 @@
The latest version of the most popular web server on the 'net.
This compile includes proxy server support, as well as the ability
to add modules that add many other features.
-
-You'll have to edit the configuration files in /usr/pkg/http/conf
-before you start it. The default root directory for documents is
-/usr/pkg/http/htdocs. You can start the server with `apachectl start'.
diff --git a/www/apache/pkg/INSTALL b/www/apache/pkg/INSTALL
new file mode 100644
index 00000000000..c2d612330f4
--- /dev/null
+++ b/www/apache/pkg/INSTALL
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2000/09/06 06:17:56 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+ SERVERROOT=${PKG_PREFIX}/etc/httpd
+ LOGDIR=/var/log/httpd
+ SPOOLDIR=/var/spool/httpd
+
+ mkdir -p ${SERVERROOT}
+ mkdir -p ${SERVERROOT}/ssl.crl
+ mkdir -p ${SERVERROOT}/ssl.crt
+ mkdir -p ${SERVERROOT}/ssl.crs
+ mkdir -p ${SERVERROOT}/ssl.key
+ mkdir -p ${SERVERROOT}/ssl.prm
+ mkdir -p ${LOGDIR}
+ mkdir -p ${SPOOLDIR}
+ mkdir -p ${SPOOLDIR}/proxy
+
+ echo "Installing configuration files:"
+ for file in httpd.conf magic mime.types
+ do
+ if [ -f ${SERVERROOT}/${file} ]
+ then
+ echo " ${SERVERROOT}/${file} already exists"
+ else
+ echo " ${SERVERROOT}/${file}.default --> ${SERVERROOT}/${file}"
+ cp ${SERVERROOT}/${file}.default ${SERVERROOT}/${file}
+ chmod 644 ${SERVERROOT}/${file}
+ fi
+ done
+ echo "done."
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/www/apache/pkg/PLIST b/www/apache/pkg/PLIST
index cb480aebf25..eae2c78e2c5 100644
--- a/www/apache/pkg/PLIST
+++ b/www/apache/pkg/PLIST
@@ -1,13 +1,10 @@
-@comment $NetBSD: PLIST,v 1.14 2000/04/24 13:13:23 tron Exp $
+@comment $NetBSD: PLIST,v 1.15 2000/09/06 06:17:57 jlam Exp $
bin/dbmmanage
bin/htdigest
bin/htpasswd
etc/httpd/httpd.conf.default
-@exec if [ ! -f %D/etc/httpd/httpd.conf ]; then cp -p %D/etc/httpd/httpd.conf.default %D/etc/httpd/httpd.conf; fi
etc/httpd/magic.default
-@exec if [ ! -f %D/etc/httpd/magic ]; then cp -p %D/etc/httpd/magic.default %D/etc/httpd/magic; fi
etc/httpd/mime.types.default
-@exec if [ ! -f %D/etc/httpd/mime.types ]; then cp -p %D/etc/httpd/mime.types.default %D/etc/httpd/mime.types; fi
etc/rc.d/apache.sh
include/httpd/alloc.h
include/httpd/ap.h
@@ -57,8 +54,6 @@ include/httpd/xml/latin1tab.h
include/httpd/xml/iasciitab.h
include/httpd/xml/hashtable.h
include/httpd/xml/xmltok_impl.h
-lib/httpd/mod_proxy.so
-lib/httpd/httpd.exp
libexec/cgi-bin/printenv
libexec/cgi-bin/test-cgi
man/man1/dbmmanage.1
@@ -333,17 +328,8 @@ share/httpd/icons/uu.gif
share/httpd/icons/uuencoded.gif
share/httpd/icons/world1.gif
share/httpd/icons/world2.gif
-@exec mkdir -p /var/log/httpd /var/spool/httpd/proxy %D/lib/httpd %D/etc/httpd/ssl.crl %D/etc/httpd/ssl.crt %D/etc/httpd/ssl.csr %D/etc/httpd/ssl.key %D/etc/httpd/ssl.prm
-@unexec rmdir /var/log/httpd /var/spool/httpd/proxy /var/spool/httpd 2>/dev/null || true
-@dirrm etc/httpd/ssl.crl
-@dirrm etc/httpd/ssl.crt
-@dirrm etc/httpd/ssl.csr
-@dirrm etc/httpd/ssl.key
-@dirrm etc/httpd/ssl.prm
-@unexec rmdir %D/etc/httpd 2>/dev/null || true
@dirrm include/httpd/xml
@dirrm include/httpd
-@dirrm lib/httpd
@unexec rmdir %D/libexec/cgi-bin 2>/dev/null || true
@dirrm share/httpd/htdocs/manual/images
@dirrm share/httpd/htdocs/manual/misc
diff --git a/www/apache/pkg/PLIST.shared b/www/apache/pkg/PLIST.shared
new file mode 100644
index 00000000000..37610ad9d7d
--- /dev/null
+++ b/www/apache/pkg/PLIST.shared
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST.shared,v 1.1 2000/09/06 06:17:57 jlam Exp $
+lib/httpd/mod_proxy.so
+lib/httpd/httpd.exp
+@dirrm lib/httpd
diff --git a/www/apache/pkg/PLIST.suexec b/www/apache/pkg/PLIST.suexec
new file mode 100644
index 00000000000..344af68effc
--- /dev/null
+++ b/www/apache/pkg/PLIST.suexec
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.suexec,v 1.1 2000/09/06 06:17:57 jlam Exp $
+sbin/suexec
+man/man8/suexec.8