summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorjlam <jlam>2001-11-19 16:23:08 +0000
committerjlam <jlam>2001-11-19 16:23:08 +0000
commit921dba3e4056acfac3df83e1629ab22167889846 (patch)
treed5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /www
parente740603fc9e2110613fe030c8dabf0543d664a81 (diff)
downloadpkgsrc-921dba3e4056acfac3df83e1629ab22167889846.tar.gz
Adapt to use shared INSTALL/DEINSTALL scripts by using the logic in
bsd.pkg.install.mk: * Remove old DEINSTALL/INSTALL scripts. * Move some text printed at POST-INSTALL time into the MESSAGE file. * Adjust rc.d scripts to respect rc.conf settings, so that the script may be directly copied into /etc/rc.d.
Diffstat (limited to 'www')
-rw-r--r--www/ap-ssl/DEINSTALL81
-rw-r--r--www/ap-ssl/INSTALL69
-rw-r--r--www/ap-ssl/Makefile69
-rw-r--r--www/apache/DEINSTALL112
-rw-r--r--www/apache/INSTALL73
-rw-r--r--www/apache/Makefile39
-rw-r--r--www/apache6/DEINSTALL112
-rw-r--r--www/apache6/INSTALL73
-rw-r--r--www/apache6/Makefile34
-rw-r--r--www/apc-gui/DEINSTALL102
-rw-r--r--www/apc-gui/INSTALL63
-rw-r--r--www/apc-gui/Makefile33
-rw-r--r--www/cvsweb/DEINSTALL67
-rw-r--r--www/cvsweb/INSTALL57
-rw-r--r--www/cvsweb/Makefile21
-rw-r--r--www/horde/DEINSTALL116
-rw-r--r--www/horde/INSTALL76
-rw-r--r--www/horde/Makefile34
-rw-r--r--www/php4/DEINSTALL66
-rw-r--r--www/php4/INSTALL56
-rw-r--r--www/php4/MESSAGE.module4
-rw-r--r--www/php4/Makefile18
-rw-r--r--www/php4/Makefile.common5
-rw-r--r--www/php4/Makefile.php4
-rw-r--r--www/surfraw/DEINSTALL107
-rw-r--r--www/surfraw/INSTALL68
-rw-r--r--www/surfraw/Makefile36
-rw-r--r--www/thttpd/DEINSTALL66
-rw-r--r--www/thttpd/INSTALL56
-rw-r--r--www/thttpd/MESSAGE3
-rw-r--r--www/thttpd/Makefile31
-rw-r--r--www/thttpd/files/thttpd.sh60
32 files changed, 148 insertions, 1663 deletions
diff --git a/www/ap-ssl/DEINSTALL b/www/ap-ssl/DEINSTALL
deleted file mode 100644
index 45e7902d252..00000000000
--- a/www/ap-ssl/DEINSTALL
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:15:59 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/mod_ssl
-CONFDIR=${SERVERROOT}
-CONFFILES="apache_start.conf"
-NONCONFFILES=" ssl.crl/Makefile.crl \
- ssl.crl/README.CRL \
- ssl.crt/Makefile.crt \
- ssl.crt/README.CRT \
- ssl.crt/ca-bundle.crt \
- ssl.csr/README.CSR \
- ssl.key/README.KEY \
- ssl.prm/README.PRM"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/ap-ssl/INSTALL b/www/ap-ssl/INSTALL
deleted file mode 100644
index b1e32926f2a..00000000000
--- a/www/ap-ssl/INSTALL
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:16:00 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-MKDIR="@MKDIR@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/mod_ssl
-CONFDIR=${SERVERROOT}
-CONFFILES="apache_start.conf"
-NONCONFFILES=" ssl.crl/Makefile.crl \
- ssl.crl/README.CRL \
- ssl.crt/Makefile.crt \
- ssl.crt/README.CRT \
- ssl.crt/ca-bundle.crt \
- ssl.csr/README.CSR \
- ssl.key/README.KEY \
- ssl.prm/README.PRM"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- # ${SERVERROOT} (${CONFDIR}) is already set up by apache/pkg/INSTALL,
- # so we don't need to create those directories here.
-
- echo "Installing configuration files:"
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/ap-ssl/Makefile b/www/ap-ssl/Makefile
index 394d5572ebc..7282528618b 100644
--- a/www/ap-ssl/Makefile
+++ b/www/ap-ssl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2001/10/17 19:17:11 jlam Exp $
+# $NetBSD: Makefile,v 1.41 2001/11/19 16:23:12 jlam Exp $
DISTNAME= mod_ssl-2.8.5-1.3.22
PKGNAME= ap-ssl-2.8.5
@@ -24,25 +24,29 @@ CONFIGURE_ARGS+= --with-apxs=${PREFIX}/sbin/apxs
CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_DIR}
MAKE_ENV+= SSL_RPATH_LDFLAGS="-R${SSLBASE}/lib"
-APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
+APACHE_SYSCONFDIR?= ${CONFDIR}/httpd
BUILD_DEFS+= APACHE_SYSCONFDIR
-
-SAMPLECONFDIR= ${PREFIX}/share/examples/mod_ssl
-
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-# Given foo=${bar}, replace @foo@ with ${bar}.
-#
-FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= MKDIR=${MKDIR:Q}
-FILES_SUBST+= PREFIX=${PREFIX}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/-e s!@/}
+FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
+
+EGDIR= ${PREFIX}/share/examples/mod_ssl
+CONF_FILES= ${EGDIR}/apache_start.conf \
+ ${APACHE_SYSCONFDIR}/apache_start.conf
+SUPPORT_FILES= ${EGDIR}/ssl.crl/Makefile.crl \
+ ${APACHE_SYSCONFDIR}/ssl.crl/Makefile.crl
+SUPPORT_FILES+= ${EGDIR}/ssl.crl/README.CRL \
+ ${APACHE_SYSCONFDIR}/ssl.crl/README.CRL
+SUPPORT_FILES+= ${EGDIR}/ssl.crt/Makefile.crt \
+ ${APACHE_SYSCONFDIR}/ssl.crt/Makefile.crt
+SUPPORT_FILES+= ${EGDIR}/ssl.crt/README.CRT \
+ ${APACHE_SYSCONFDIR}/ssl.crt/README.CRT
+SUPPORT_FILES+= ${EGDIR}/ssl.crt/ca-bundle.crt \
+ ${APACHE_SYSCONFDIR}/ssl.crt/ca-bundle.crt
+SUPPORT_FILES+= ${EGDIR}/ssl.csr/README.CSR \
+ ${APACHE_SYSCONFDIR}/ssl.csr/README.CSR
+SUPPORT_FILES+= ${EGDIR}/ssl.key/README.KEY \
+ ${APACHE_SYSCONFDIR}/ssl.key/README.KEY
+SUPPORT_FILES+= ${EGDIR}/ssl.prm/README.PRM \
+ ${APACHE_SYSCONFDIR}/ssl.prm/README.PRM
post-extract:
cd ${WRKSRC}/pkg.contrib; ${MV} -f loadcacert.cgi loadcacert.cgi.in
@@ -57,23 +61,21 @@ post-build:
> ${WRKSRC}/pkg.sslsup/mkcert.sh
pre-install:
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
${SED} ${FILES_SUBST_SED} \
${FILESDIR}/README.mkcert > ${WRKDIR}/README.mkcert
post-install:
- ${INSTALL_DATA_DIR} ${SAMPLECONFDIR}
- ${INSTALL_DATA_DIR} ${SAMPLECONFDIR}/ssl.crl
- ${INSTALL_DATA_DIR} ${SAMPLECONFDIR}/ssl.crt
- ${INSTALL_DATA_DIR} ${SAMPLECONFDIR}/ssl.csr
- ${INSTALL_DATA_DIR} ${SAMPLECONFDIR}/ssl.key
- ${INSTALL_DATA_DIR} ${SAMPLECONFDIR}/ssl.prm
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA_DIR} ${EGDIR}/ssl.crl
+ ${INSTALL_DATA_DIR} ${EGDIR}/ssl.crt
+ ${INSTALL_DATA_DIR} ${EGDIR}/ssl.csr
+ ${INSTALL_DATA_DIR} ${EGDIR}/ssl.key
+ ${INSTALL_DATA_DIR} ${EGDIR}/ssl.prm
cd ${PREFIX}/lib/httpd; ${MV} -f libssl.so mod_ssl.so
cd ${WRKSRC}/pkg.sslsup; ${INSTALL_SCRIPT} mkcert.sh \
${PREFIX}/sbin/mkcert
- ${INSTALL_DATA} ${FILESDIR}/apache_start.conf ${SAMPLECONFDIR}
+ ${INSTALL_DATA} ${FILESDIR}/apache_start.conf ${EGDIR}
${INSTALL_DATA_DIR} ${PREFIX}/share/httpd/htdocs/manual/mod/mod_ssl
cd ${WRKSRC}/pkg.ssldoc; ${INSTALL_DATA} *.html *.gif *.jpg \
@@ -86,17 +88,18 @@ post-install:
cd ${WRKSRC}/pkg.sslcfg; ${RM} -f server.*
cd ${WRKSRC}/pkg.sslcfg; ${INSTALL_DATA} README.CRL *.crl \
- ${SAMPLECONFDIR}/ssl.crl
+ ${EGDIR}/ssl.crl
cd ${WRKSRC}/pkg.sslcfg; ${INSTALL_DATA} README.CRT *.crt \
- ${SAMPLECONFDIR}/ssl.crt
+ ${EGDIR}/ssl.crt
cd ${WRKSRC}/pkg.sslcfg; ${INSTALL_DATA} README.CSR \
- ${SAMPLECONFDIR}/ssl.csr
+ ${EGDIR}/ssl.csr
cd ${WRKSRC}/pkg.sslcfg; ${INSTALL_DATA} README.KEY *.key \
- ${SAMPLECONFDIR}/ssl.key
+ ${EGDIR}/ssl.key
cd ${WRKSRC}/pkg.sslcfg; ${INSTALL_DATA} README.PRM *.prm \
- ${SAMPLECONFDIR}/ssl.prm
+ ${EGDIR}/ssl.prm
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../security/openssl/buildlink.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/apache/DEINSTALL b/www/apache/DEINSTALL
deleted file mode 100644
index a17b0b045aa..00000000000
--- a/www/apache/DEINSTALL
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:16:06 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TRUE="@TRUE@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-DATADIR=${PKG_PREFIX}/share/httpd
-LOGDIR=/var/log/httpd
-SPOOLDIR=/var/spool/httpd
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd
-CONFDIR=${SERVERROOT}
-CONFFILES="httpd.conf"
-NONCONFFILES="magic mime.types"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}.default
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- ${RMDIR} ${SPOOLDIR}/proxy 2>/dev/null || ${TRUE}
- ${RMDIR} ${SPOOLDIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${LOGDIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${DATADIR}/htdocs 2>/dev/null || ${TRUE}
- ${RMDIR} ${DATADIR} 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}
-
- existing_dirs=''
- for dir in ${CONFDIR} ${LOGDIR} ${REQUESTDIR} ${DATADIR}
- do
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
- * the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- echo " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/apache/INSTALL b/www/apache/INSTALL
deleted file mode 100644
index cf1122572a9..00000000000
--- a/www/apache/INSTALL
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:16:06 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CHOWN="@CHOWN@"
-CP="@CP@"
-MKDIR="@MKDIR@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-LOGDIR=/var/log/httpd
-SPOOLDIR=/var/spool/httpd
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd
-CONFDIR=${SERVERROOT}
-CONFFILES="httpd.conf"
-NONCONFFILES="magic mime.types"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- ${MKDIR} ${SERVERROOT}
- ${MKDIR} ${SERVERROOT}/ssl.crl
- ${MKDIR} ${SERVERROOT}/ssl.crt
- ${MKDIR} ${SERVERROOT}/ssl.csr
- ${MKDIR} ${SERVERROOT}/ssl.key
- ${MKDIR} ${SERVERROOT}/ssl.prm
- ${MKDIR} ${LOGDIR}
- ${MKDIR} ${SPOOLDIR}
- ${MKDIR} ${SPOOLDIR}/proxy
- ${CHOWN} nobody:nobody ${SPOOLDIR}/proxy
-
- echo "Installing configuration files:"
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}.default
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/apache/Makefile b/www/apache/Makefile
index 8d9c5fc7572..bd405fdf693 100644
--- a/www/apache/Makefile
+++ b/www/apache/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.81 2001/10/22 18:02:51 jlam Exp $
+# $NetBSD: Makefile,v 1.82 2001/11/19 16:23:12 jlam 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).
@@ -39,8 +39,9 @@ CONFIGURE_ENV+= OPTIM="${APACHE_CUSTOM_CFLAGS}"
.include "../../mk/bsd.prefs.mk"
-APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
+APACHE_SYSCONFDIR?= ${CONFDIR}/httpd
BUILD_DEFS+= APACHE_SYSCONFDIR
+FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
APACHE_USER?= www
@@ -98,23 +99,22 @@ BUILD_DEFS+= APACHE_CUSTOM_CFLAGS
BUILD_DEFS+= APACHE_PERF_TUNING
BUILD_DEFS+= APACHE_SUEXEC
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
+EGDIR= ${PREFIX}/share/examples/httpd
-# Given foo=${bar}, replace @foo@ with ${bar}.
-#
-FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CHOWN=${CHOWN:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= MKDIR=${MKDIR:Q}
-FILES_SUBST+= PREFIX=${PREFIX}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST+= RMDIR=${RMDIR:Q}
-FILES_SUBST+= TRUE=${TRUE:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/-e s!@/}
+CONF_FILES= ${EGDIR}/httpd.conf.default ${APACHE_SYSCONFDIR}/httpd.conf
+SUPPORT_FILES= ${EGDIR}/magic.default ${APACHE_SYSCONFDIR}/magic
+SUPPORT_FILES+= ${EGDIR}/mime.types.default ${APACHE_SYSCONFDIR}/mime.types
+RCD_SCRIPTS= ${PREFIX}/etc/rc.d/apache /etc/rc.d/apache
+
+MAKE_DIRS= ${APACHE_SYSCONFDIR}
+OWN_DIRS= ${APACHE_SYSCONFDIR}/ssl.crl
+OWN_DIRS+= ${APACHE_SYSCONFDIR}/ssl.crt
+OWN_DIRS+= ${APACHE_SYSCONFDIR}/ssl.csr
+OWN_DIRS+= ${APACHE_SYSCONFDIR}/ssl.key
+OWN_DIRS+= ${APACHE_SYSCONFDIR}/ssl.prm
+OWN_DIRS+= /var/log/httpd
+OWN_DIRS+= /var/spool/httpd
+OWN_DIRS_PERMS+= /var/spool/httpd/proxy nobody nobody 0755
post-extract:
${CP} ${FILESDIR}/ap_include_extern.h ${WRKSRC}/src/include
@@ -149,8 +149,6 @@ pre-configure:
pre-install:
${FIND} ${WRKSRC}/htdocs -name '*.orig' -print | ${XARGS} ${RM} -f
${SED} ${FILES_SUBST_SED} ${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
post-install:
.if !defined(NOPIC)
@@ -168,4 +166,5 @@ post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../textproc/expat/buildlink.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/apache6/DEINSTALL b/www/apache6/DEINSTALL
deleted file mode 100644
index 43993420643..00000000000
--- a/www/apache6/DEINSTALL
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:16:12 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TRUE="@TRUE@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-DATADIR=${PKG_PREFIX}/share/httpd
-LOGDIR=/var/log/httpd
-SPOOLDIR=/var/spool/httpd
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd
-CONFDIR=${SERVERROOT}
-CONFFILES="httpd.conf"
-NONCONFFILES="magic mime.types"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}.default
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- ${RMDIR} ${SPOOLDIR}/proxy 2>/dev/null || ${TRUE}
- ${RMDIR} ${SPOOLDIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${LOGDIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${DATADIR}/htdocs 2>/dev/null || ${TRUE}
- ${RMDIR} ${DATADIR} 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}
-
- existing_dirs=''
- for dir in ${CONFDIR} ${LOGDIR} ${REQUESTDIR} ${DATADIR}
- do
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
- * the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- echo " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/apache6/INSTALL b/www/apache6/INSTALL
deleted file mode 100644
index 87ae2dea8a6..00000000000
--- a/www/apache6/INSTALL
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:16:12 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CHOWN="@CHOWN@"
-CP="@CP@"
-MKDIR="@MKDIR@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-LOGDIR=/var/log/httpd
-SPOOLDIR=/var/spool/httpd
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/httpd
-CONFDIR=${SERVERROOT}
-CONFFILES="httpd.conf"
-NONCONFFILES="magic mime.types"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- ${MKDIR} ${SERVERROOT}
- ${MKDIR} ${SERVERROOT}/ssl.crl
- ${MKDIR} ${SERVERROOT}/ssl.crt
- ${MKDIR} ${SERVERROOT}/ssl.csr
- ${MKDIR} ${SERVERROOT}/ssl.key
- ${MKDIR} ${SERVERROOT}/ssl.prm
- ${MKDIR} ${LOGDIR}
- ${MKDIR} ${SPOOLDIR}
- ${MKDIR} ${SPOOLDIR}/proxy
- ${CHOWN} nobody:nobody ${SPOOLDIR}/proxy
-
- echo "Installing configuration files:"
- for file in ${CONFFILES} ${NONCONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}.default
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/apache6/Makefile b/www/apache6/Makefile
index 8afb89fc35e..5a3ed3cf9ff 100644
--- a/www/apache6/Makefile
+++ b/www/apache6/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2001/10/22 18:10:28 jlam Exp $
+# $NetBSD: Makefile,v 1.43 2001/11/19 16:23:13 jlam Exp $
#
# This package does not compile in mod_ssl support hooks, as it conflicts
# with IPv6-enable patch.
@@ -46,8 +46,9 @@ BUILD_DEFS+= USE_INET6
IGNORE= "IPv6 only build"
.endif
-APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
+APACHE_SYSCONFDIR?= ${CONFDIR}/httpd
BUILD_DEFS+= APACHE_SYSCONFDIR
+FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
APACHE_USER?= www
@@ -103,23 +104,17 @@ BUILD_DEFS+= APACHE_CUSTOM_CFLAGS
BUILD_DEFS+= APACHE_PERF_TUNING
BUILD_DEFS+= APACHE_SUEXEC
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
+EGDIR= ${PREFIX}/share/examples/httpd
-# Given foo=${bar}, replace @foo@ with ${bar}.
-#
-FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CHOWN=${CHOWN:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= MKDIR=${MKDIR:Q}
-FILES_SUBST+= PREFIX=${PREFIX}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST+= RMDIR=${RMDIR:Q}
-FILES_SUBST+= TRUE=${TRUE:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/-e s!@/}
+CONF_FILES= ${EGDIR}/httpd.conf.default ${APACHE_SYSCONFDIR}/httpd.conf
+SUPPORT_FILES= ${EGDIR}/magic.default ${APACHE_SYSCONFDIR}/magic
+SUPPORT_FILES+= ${EGDIR}/mime.types.default ${APACHE_SYSCONFDIR}/mime.types
+RCD_SCRIPTS= ${PREFIX}/etc/rc.d/apache /etc/rc.d/apache
+
+MAKE_DIRS= ${APACHE_SYSCONFDIR}
+OWN_DIRS= /var/log/httpd
+OWN_DIRS+= /var/spool/httpd
+OWN_DIRS_PERMS+= /var/spool/httpd/proxy nobody nobody 0755
pre-patch:
${FIND} ${WRKSRC} -name '*.orig' -print | ${XARGS} ${RM} -f
@@ -149,8 +144,6 @@ pre-configure:
pre-install:
${FIND} ${WRKSRC}/htdocs -name '*.orig' -print | ${XARGS} ${RM} -f
${SED} ${FILES_SUBST_SED} ${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
post-install:
.if !defined(NOPIC)
@@ -168,4 +161,5 @@ post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../textproc/expat/buildlink.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/apc-gui/DEINSTALL b/www/apc-gui/DEINSTALL
deleted file mode 100644
index 7595a08d594..00000000000
--- a/www/apc-gui/DEINSTALL
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.2 2001/11/05 07:44:49 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-ECHO="@ECHO@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TR="@TR@"
-TRUE="@TRUE@"
-
-APACHE_SYSCONFDIR=@APACHE_SYSCONFDIR@
-APC_GUI_DIR=${PKG_PREFIX}/@APC_GUI_DIR@
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
-
-CONFFILES=" \
- ${SAMPLECONFDIR}/apc_gui.conf ${APACHE_SYSCONFDIR}/apc_gui.conf : \
- /dev/null ${APC_GUI_DIR}/apc_config_local.php \
- "
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for FILE in ${CONFFILES}
- do
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- ${RMDIR} ${APC_GUI_DIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${APACHE_SYSCONFDIR} 2>/dev/null || ${TRUE}
-
- existing_dirs=''
- for dir in ${APC_GUI_DIR} ${APACHE_SYSCONFDIR}
- do
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- ${ECHO} " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
- * the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- ${ECHO} " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- ${ECHO} "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/apc-gui/INSTALL b/www/apc-gui/INSTALL
deleted file mode 100644
index 40494591944..00000000000
--- a/www/apc-gui/INSTALL
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.2 2001/11/05 07:47:48 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-ECHO="@ECHO@"
-MKDIR="@MKDIR@"
-TR="@TR@"
-
-APACHE_SYSCONFDIR=@APACHE_SYSCONFDIR@
-APC_GUI_DIR=${PKG_PREFIX}/@APC_GUI_DIR@
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
-
-CONFFILES=" \
- ${SAMPLECONFDIR}/apc_gui.conf ${APACHE_SYSCONFDIR}/apc_gui.conf : \
- /dev/null ${APC_GUI_DIR}/apc_config_local.php \
- "
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- ${MKDIR} ${APACHE_SYSCONFDIR}
-
- ${ECHO} "Installing configuration files:"
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- if [ -f ${FILE} ]
- then
- ${ECHO} " ${FILE} already exists"
- else
- ${ECHO} " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-You may wish to customize the following files:
-
-EOF
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- ${ECHO} " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- ${ECHO} "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/apc-gui/Makefile b/www/apc-gui/Makefile
index 70b7edc7349..d96e6601e43 100644
--- a/www/apc-gui/Makefile
+++ b/www/apc-gui/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2001/10/29 19:35:04 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2001/11/19 16:23:14 jlam Exp $
DISTNAME= apc_gui-1.0.3
PKGNAME= ${DISTNAME:S/_/-/}
@@ -14,7 +14,7 @@ DEPENDS+= php-gd>=4.0.1:../../graphics/php4-gd
NO_BUILD= YES
-APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
+APACHE_SYSCONFDIR?= ${CONFDIR}/httpd
BUILD_DEFS+= APACHE_SYSCONFDIR
MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
@@ -23,37 +23,19 @@ EGDIR= ${PREFIX}/share/examples/${PKGBASE}
PLIST_SUBST+= PKGBASE=${PKGBASE}
MESSAGE_SUBST+= APC_GUI_DIR=${APC_GUI_DIR}
-PLIST_SUBST+= PKGBASE=${PKGBASE}
-
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-FILES_SUBST= APC_GUI_DIR=${APC_GUI_DIR:S/^${PREFIX}\///}
-FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST+= PREFIX=${PREFIX}
-FILES_SUBST+= PKGBASE=${PKGBASE}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= ECHO=${ECHO:Q}
-FILES_SUBST+= MKDIR=${MKDIR:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST+= RMDIR=${RMDIR:Q}
-FILES_SUBST+= TR=${TR:Q}
-FILES_SUBST+= TRUE=${TRUE:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+CONF_FILES= ${EGDIR}/apc_gui.conf ${APACHE_SYSCONFDIR}/apc_gui.conf
+CONF_FILES+= /dev/null ${APC_GUI_DIR}/apc_config_local.php
+MAKE_DIRS= ${APACHE_SYSCONFDIR}
+OWN_DIRS= ${APC_GUI_DIR}
pre-install:
${SED} ${FILES_SUBST_SED} ${FILESDIR}/apc_gui.conf.dist \
> ${WRKDIR}/apc_gui.conf.dist
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
do-install:
${INSTALL_DATA_DIR} ${APC_GUI_DIR} ${EGDIR}
- cd ${WRKDIR}; ${INSTALL_DATA} apc_gui.conf.dist \
+ cd ${WRKDIR}; ${INSTALL_DATA} apc_gui.conf.dist \
${EGDIR}/apc_gui.conf
${CP} -R ${WRKSRC}/* ${APC_GUI_DIR}
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${APC_GUI_DIR}
@@ -62,4 +44,5 @@ do-install:
post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/cvsweb/DEINSTALL b/www/cvsweb/DEINSTALL
deleted file mode 100644
index 01803ad5a7e..00000000000
--- a/www/cvsweb/DEINSTALL
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:16:38 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-CP="@CP@"
-RM="@RM@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/cvsweb
-CONFDIR=${SERVERROOT}
-CONFFILES="cvsweb.conf"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}.default
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/cvsweb/INSTALL b/www/cvsweb/INSTALL
deleted file mode 100644
index fdd15d6244f..00000000000
--- a/www/cvsweb/INSTALL
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:16:38 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-
-SERVERROOT="@APACHE_SYSCONFDIR@"
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/cvsweb
-CONFDIR=${SERVERROOT}
-CONFFILES="cvsweb.conf"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- echo "Installing configuration files:"
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}.default
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} -p ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/cvsweb/Makefile b/www/cvsweb/Makefile
index 237e1c62c18..c6ef9311fa5 100644
--- a/www/cvsweb/Makefile
+++ b/www/cvsweb/Makefile
@@ -1,5 +1,5 @@
#
-# $NetBSD: Makefile,v 1.4 2001/10/15 17:25:09 martti Exp $
+# $NetBSD: Makefile,v 1.5 2001/11/19 16:23:14 jlam Exp $
#
DISTNAME= cvsweb-1.112
@@ -22,15 +22,11 @@ INSTALL_FILE= ${WRKDIR}/INSTALL
.include "../../mk/bsd.prefs.mk"
-APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
+APACHE_SYSCONFDIR?= ${CONFDIR}/httpd
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+CONF_FILES= ${EGDIR}/cvsweb.conf.default ${APACHE_SYSCONFDIR}/cvsweb.conf
+MAKE_DIRS= ${APACHE_SYSCONFDIR}
do-build:
${MV} ${WRKSRC}/cvsweb.cgi ${WRKSRC}/cvsweb.cgi.bak
@@ -38,16 +34,15 @@ do-build:
-e 's,/usr/local/web/apache/conf/,${APACHE_SYSCONFDIR}/,' \
${WRKSRC}/cvsweb.cgi.bak > ${WRKSRC}/cvsweb.cgi
-pre-install:
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
-
do-install:
${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/cgi-bin
${INSTALL_SCRIPT} ${WRKSRC}/cvsweb.cgi ${PREFIX}/libexec/cgi-bin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/cvsweb
${INSTALL_DATA} ${WRKSRC}/cvsweb.conf \
${PREFIX}/share/examples/cvsweb/cvsweb.conf.default
+
+post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/horde/DEINSTALL b/www/horde/DEINSTALL
deleted file mode 100644
index 093d7d86d7e..00000000000
--- a/www/horde/DEINSTALL
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:16:51 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TRUE="@TRUE@"
-
-APACHE_SYSCONFDIR="@APACHE_SYSCONFDIR@"
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/horde
-CONFDIR=${APACHE_SYSCONFDIR}
-HORDEDIR=${PKG_PREFIX}/@HORDEDIR@
-PHPLIBDIR=${PKG_PREFIX}/@PHPLIBDIR@
-
-CONFFILES=" ${PHPLIBDIR}/local.inc \
- ${PHPLIBDIR}/prepend.php3 \
- ${HORDEDIR}/config/horde.php3"
-NONCONFFILES=" ${HORDEDIR}/config/MOTD.html \
- ${HORDEDIR}/config/header.txt \
- ${HORDEDIR}/config/html.php3 \
- ${HORDEDIR}/config/lang.php3 \
- ${HORDEDIR}/config/menu.txt \
- ${HORDEDIR}/config/mime.php3"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- FILE=${CONFDIR}/horde.conf
- SAMPLEFILE=${SAMPLECONFDIR}/horde.conf
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- for FILE in ${CONFFILES} ${NONCONFFILES}
- do
- SAMPLEFILE=${FILE}.dist
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for FILE in ${CONFDIR}/horde.conf ${CONFFILES} ${NONCONFFILES}
- do
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- ${RMDIR} ${PHPLIBDIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${HORDEDIR}/config 2>/dev/null || ${TRUE}
- ${RMDIR} ${HORDEDIR} 2>/dev/null || ${TRUE}
- ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE}
-
- existing_dirs=''
- for dir in ${PHPLIBDIR} ${HORDEDIR}
- do
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove:
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
- * the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- echo " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/horde/INSTALL b/www/horde/INSTALL
deleted file mode 100644
index 6b06e8ec82c..00000000000
--- a/www/horde/INSTALL
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:16:51 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-
-APACHE_SYSCONFDIR="@APACHE_SYSCONFDIR@"
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/horde
-CONFDIR=${APACHE_SYSCONFDIR}
-HORDEDIR=${PKG_PREFIX}/@HORDEDIR@
-PHPLIBDIR=${PKG_PREFIX}/@PHPLIBDIR@
-
-CONFFILES=" ${PHPLIBDIR}/local.inc \
- ${PHPLIBDIR}/prepend.php3 \
- ${HORDEDIR}/config/horde.php3"
-NONCONFFILES=" ${HORDEDIR}/config/MOTD.html \
- ${HORDEDIR}/config/header.txt \
- ${HORDEDIR}/config/html.php3 \
- ${HORDEDIR}/config/lang.php3 \
- ${HORDEDIR}/config/menu.txt \
- ${HORDEDIR}/config/mime.php3"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- echo "Installing configuration files:"
- FILE=${CONFDIR}/horde.conf
- SAMPLEFILE=${SAMPLECONFDIR}/horde.conf
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- for FILE in ${CONFFILES} ${NONCONFFILES}
- do
- SAMPLEFILE=${FILE}.dist
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for FILE in ${CONFFILES}
- do
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/horde/Makefile b/www/horde/Makefile
index 4dfb14ed659..0c8f05c2b2f 100644
--- a/www/horde/Makefile
+++ b/www/horde/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2001/11/11 19:30:07 bouyer Exp $
+# $NetBSD: Makefile,v 1.15 2001/11/19 16:23:15 jlam Exp $
DISTNAME= horde-1.2.7
CATEGORIES= www
@@ -11,11 +11,6 @@ COMMENT= PHP application framework
DEPENDS+= php>3.0.17:../../www/php4
DEPENDS+= php-pcre>3.0.17:../../devel/php4-pcre
-NO_CONFIGURE= # defined
-
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
DOCDIR= ${PREFIX}/share/doc/horde
EGDIR= ${PREFIX}/share/examples/horde
HORDEDIR= ${PREFIX}/share/horde
@@ -26,21 +21,21 @@ MESSAGE_SUBST+= PHPLIBDIR=${PHPLIBDIR}
.include "../../mk/bsd.prefs.mk"
-APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
+APACHE_SYSCONFDIR?= ${CONFDIR}/httpd
BUILD_DEFS+= APACHE_SYSCONFDIR
MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST= HORDEDIR=${HORDEDIR:S/^${PREFIX}\///}
-FILES_SUBST+= PHPLIBDIR=${PHPLIBDIR:S/^${PREFIX}\///}
-FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST+= RMDIR=${RMDIR:Q}
-FILES_SUBST+= TRUE=${TRUE:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+CONF_FILES= ${EGDIR}/horde.conf ${APACHE_SYSCONFDIR}/horde.conf
+CONF_FILES+= ${PHPLIBDIR}/local.inc.dist ${PHPLIBDIR}/local.inc
+CONF_FILES+= ${PHPLIBDIR}/prepend.php3.dist ${PHPLIBDIR}/prepend.php3
+CONF_FILES+= ${HORDEDIR}/config/horde.php3.dist ${HORDEDIR}/config/horde.php3
+SUPPORT_FILES= ${HORDEDIR}/config/MOTD.html.dist ${HORDEDIR}/config/MOTD.html
+SUPPORT_FILES+= ${HORDEDIR}/config/header.txt.dist ${HORDEDIR}/config/header.txt
+SUPPORT_FILES+= ${HORDEDIR}/config/html.php3.dist ${HORDEDIR}/config/html.php3
+SUPPORT_FILES+= ${HORDEDIR}/config/lang.php3.dist ${HORDEDIR}/config/lang.php3
+SUPPORT_FILES+= ${HORDEDIR}/config/menu.txt.dist ${HORDEDIR}/config/menu.txt
+SUPPORT_FILES+= ${HORDEDIR}/config/mime.php3.dist ${HORDEDIR}/config/mime.php3
+MAKE_DIRS= ${APACHE_SYSCONFDIR}
post-extract:
cd ${WRKSRC}/phplib; \
@@ -82,8 +77,6 @@ pre-install:
${FILESDIR}/horde_setup.sh > ${WRKDIR}/horde_setup.sh
${SED} -e "s|@HORDEDIR@|${HORDEDIR}|g" \
${FILESDIR}/horde_secure.sh > ${WRKDIR}/horde_secure.sh
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
do-install:
@@ -103,4 +96,5 @@ do-install:
post-install:
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/php4/DEINSTALL b/www/php4/DEINSTALL
deleted file mode 100644
index 44ca1ef324f..00000000000
--- a/www/php4/DEINSTALL
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:18:38 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/php
-CONFDIR="@PHP_CONFDIR@"
-CONFFILES="php.ini"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}-dist
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove the
-following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/php4/INSTALL b/www/php4/INSTALL
deleted file mode 100644
index e1ce12e47e7..00000000000
--- a/www/php4/INSTALL
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:18:38 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/php
-CONFDIR="@PHP_CONFDIR@"
-CONFFILES="php.ini"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- echo "Installing configuration files:"
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}-dist
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/php4/MESSAGE.module b/www/php4/MESSAGE.module
index 623f2866fa0..2cf5de6114b 100644
--- a/www/php4/MESSAGE.module
+++ b/www/php4/MESSAGE.module
@@ -1,7 +1,7 @@
===========================================================================
-$NetBSD: MESSAGE.module,v 1.1 2001/11/01 19:34:52 jlam Exp $
+$NetBSD: MESSAGE.module,v 1.2 2001/11/19 16:23:15 jlam Exp $
-To enable this module, add the following to ${PHP_CONFDIR}/php.ini:
+To enable this module, add the following to ${CONFDIR}/php.ini:
extension=${MODNAME}.so
diff --git a/www/php4/Makefile b/www/php4/Makefile
index 55a02a65beb..51144daedaa 100644
--- a/www/php4/Makefile
+++ b/www/php4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2001/10/20 17:46:50 jlam Exp $
+# $NetBSD: Makefile,v 1.17 2001/11/19 16:23:15 jlam Exp $
.include "Makefile.php"
@@ -17,17 +17,6 @@ LDFLAGS+= -Wl,--export-dynamic
CGIDIR= ${PREFIX}/libexec/cgi-bin
EGDIR= ${PREFIX}/share/examples/php
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-FILES_SUBST= PHP_CONFDIR=${PHP_CONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
-
# On NetBSD ELF platforms, we need to link libgcc.a whole-archive so that
# certain symbols from the C++ implementation (__get_eh_context, etc.)
# referenced by DSOs written in C++ will resolve correctly. We need to
@@ -40,9 +29,9 @@ LINK_LIBGCC_LDFLAGS= -Wl,--whole-archive -Wl,-lgcc -Wl,--no-whole-archive
MAKE_ENV+= LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}"
.endif
+CONF_FILES= ${EGDIR}/php.ini-dist ${CONFDIR}/php.ini
+
pre-install:
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
post-install:
@@ -55,4 +44,5 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/php4.gif ${PREFIX}/share/php
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/php4/Makefile.common b/www/php4/Makefile.common
index 87879f55658..dea78f38234 100644
--- a/www/php4/Makefile.common
+++ b/www/php4/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.17 2001/10/16 04:54:24 jlam Exp $
+# $NetBSD: Makefile.common,v 1.18 2001/11/19 16:23:15 jlam Exp $
DISTNAME= php-${PHP_DIST_VERS}
CATEGORIES+= www php4
@@ -31,5 +31,4 @@ PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
.include "../../mk/bsd.prefs.mk"
-PHP_CONFDIR?= ${LOCALBASE}/etc
-MESSAGE_SUBST+= PHP_CONFDIR=${PHP_CONFDIR}
+MESSAGE_SUBST+= CONFDIR=${CONFDIR}
diff --git a/www/php4/Makefile.php b/www/php4/Makefile.php
index 38d2d065a45..3d5d7a65d5f 100644
--- a/www/php4/Makefile.php
+++ b/www/php4/Makefile.php
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.3 2001/10/18 17:16:43 jlam Exp $
+# $NetBSD: Makefile.php,v 1.4 2001/11/19 16:23:15 jlam Exp $
.include "../../www/php4/Makefile.common"
@@ -17,7 +17,7 @@ CONFIGURE_ARGS+= --disable-posix
CONFIGURE_ARGS+= --disable-session
CONFIGURE_ARGS+= --disable-xml
-CONFIGURE_ARGS+= --with-config-file-path=${PHP_CONFDIR}
+CONFIGURE_ARGS+= --with-config-file-path=${CONFDIR}
CONFIGURE_ARGS+= --with-exec-dir=${PREFIX}/libexec/php4
CONFIGURE_ARGS+= --with-regex=system
diff --git a/www/surfraw/DEINSTALL b/www/surfraw/DEINSTALL
deleted file mode 100644
index bb4a088a979..00000000000
--- a/www/surfraw/DEINSTALL
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.4 2001/11/06 23:12:00 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-ECHO="@ECHO@"
-RM="@RM@"
-RMDIR="@RMDIR@"
-TR="@TR@"
-TRUE="@TRUE@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
-CONFDIR=@SURFRAW_SYSCONFDIR@
-MAKEDIRS=""
-
-CONFFILES=" \
- ${SAMPLECONFDIR}/surfraw.conf ${CONFDIR}/surfraw.conf : \
- ${SAMPLECONFDIR}/surfraw_elvi.list ${CONFDIR}/surfraw_elvi.list \
- "
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=` \
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | \
- while read SAMPLEFILE FILE; \
- do \
- if [ -f ${FILE} ]; \
- then \
- ${ECHO} ${FILE}; \
- fi; \
- done; \
- `
-
- existing_dirs=''
- for dir in __dummy ${MAKEDIRS}
- do
- if [ "${dir}" != "__dummy" -a \
- "${dir}" != "/etc" -a \
- "${dir}" != "${PKG_PREFIX}/etc" ]
- then
- ${RMDIR} -p ${dir} 2>/dev/null || ${TRUE}
- if [ -d ${dir} ]
- then
- existing_dirs="${existing_dirs} ${dir}"
- fi
- fi
- done
-
- if [ -n "${modified_files}" -o -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove
-EOF
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-
- * the following files:
-
-EOF
- for file in ${modified_files}
- do
- ${ECHO} " ${file}"
- done
- fi
- if [ -n "${existing_dirs}" ]
- then
- ${CAT} << EOF
-
-* the following directories:
-
-EOF
- for dir in ${existing_dirs}
- do
- ${ECHO} " ${dir}"
- done
- fi
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- ${ECHO} "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/surfraw/INSTALL b/www/surfraw/INSTALL
deleted file mode 100644
index e9ffb363131..00000000000
--- a/www/surfraw/INSTALL
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.2 2001/11/06 10:58:03 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-ECHO="@ECHO@"
-MKDIR="@MKDIR@"
-TR="@TR@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
-CONFDIR=@SURFRAW_SYSCONFDIR@
-MAKEDIRS="${CONFDIR}"
-
-CONFFILES=" \
- ${SAMPLECONFDIR}/surfraw.conf ${CONFDIR}/surfraw.conf : \
- ${SAMPLECONFDIR}/surfraw_elvi.list ${CONFDIR}/surfraw_elvi.list \
- "
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- for dir in __dummy ${MAKEDIRS}
- do
- if [ "${dir}" != "__dummy" ]
- then
- ${MKDIR} ${dir}
- fi
- done
-
- ${ECHO} "Installing configuration files:"
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- if [ -f ${FILE} ]
- then
- ${ECHO} " ${FILE} already exists"
- else
- ${ECHO} " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-===========================================================================
-You may wish to customize the following files:
-
-EOF
- ${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
- do
- ${ECHO} " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- ${ECHO} "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/surfraw/Makefile b/www/surfraw/Makefile
index a960dc7f363..b5bfd1889bb 100644
--- a/www/surfraw/Makefile
+++ b/www/surfraw/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2001/11/07 06:12:20 jlam Exp $
+# $NetBSD: Makefile,v 1.15 2001/11/19 16:23:16 jlam Exp $
#
DISTNAME= surfraw-1.0.5
@@ -14,7 +14,7 @@ CONFLICTS+= surfaw-[0-9]*
USE_BUILDLINK_ONLY= YES
AUTOMAKE_OVERRIDE= YES
GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --sysconfdir=${SURFRAW_SYSCONFDIR}
+CONFIGURE_ARGS+= --sysconfdir=${CONFDIR}
# Override sysconfdir so that the installation puts the example config file
# in ${EGDIR}.
@@ -22,32 +22,15 @@ CONFIGURE_ARGS+= --sysconfdir=${SURFRAW_SYSCONFDIR}
MAKE_FLAGS+= sysconfdir=${EGDIR}
MAKE_ENV+= AM_MAKEFLAGS="${MAKE_FLAGS}"
-SURFRAW_SYSCONFDIR?= ${PREFIX}/etc
-DOCDIR= ${PREFIX}/share/doc/surfraw
-EGDIR= ${PREFIX}/share/examples/${PKGBASE}
-
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-PLIST_SUBST+= PKGBASE=${PKGBASE}
-
-FILES_SUBST+= PKGBASE=${PKGBASE}
-FILES_SUBST+= SURFRAW_SYSCONFDIR=${SURFRAW_SYSCONFDIR}
-FILES_SUBST+= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= ECHO=${ECHO:Q}
-FILES_SUBST+= MKDIR=${MKDIR:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST+= RMDIR=${RMDIR:Q}
-FILES_SUBST+= TR=${TR:Q}
-FILES_SUBST+= TRUE=${TRUE:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+DOCDIR= ${PREFIX}/share/doc/surfraw
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+
+CONF_FILES= ${EGDIR}/surfraw.conf ${CONFDIR}/surfraw.conf
+SUPPORT_FILES= ${EGDIR}/surfraw_elvi.list ${CONFDIR}/surfraw_elvi.list
+
+PLIST_SUBST+= PKGBASE=${PKGBASE}
pre-install:
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
post-install:
@@ -55,4 +38,5 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/thttpd/DEINSTALL b/www/thttpd/DEINSTALL
deleted file mode 100644
index 38428f4a9c7..00000000000
--- a/www/thttpd/DEINSTALL
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:18:57 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples
-CONFDIR=/etc
-CONFFILES="thttpd.conf"
-
-case ${STAGE} in
-DEINSTALL)
- # Remove configuration files if they don't differ from the default
- # config file.
- #
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}
- if ${CMP} -s ${FILE} ${SAMPLEFILE}
- then
- ${RM} -f ${FILE}
- fi
- done
- ;;
-
-POST-DEINSTALL)
- modified_files=''
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- modified_files="${modified_files} ${FILE}"
- fi
- done
-
- if [ -n "${modified_files}" ]
- then
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove the
-following files:
-
-EOF
- for file in ${modified_files}
- do
- echo " ${file}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- fi
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/thttpd/INSTALL b/www/thttpd/INSTALL
deleted file mode 100644
index 26bd2bbe4ef..00000000000
--- a/www/thttpd/INSTALL
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 02:18:57 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples
-CONFDIR=/etc
-CONFFILES="thttpd.conf"
-
-case ${STAGE} in
-PRE-INSTALL)
- ;;
-
-POST-INSTALL)
- echo "Installing configuration files:"
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- SAMPLEFILE=${SAMPLECONFDIR}/${file}
- if [ -f ${FILE} ]
- then
- echo " ${FILE} already exists"
- else
- echo " ${FILE}"
- ${CP} ${SAMPLEFILE} ${FILE}
- ${CHMOD} 644 ${FILE}
- fi
- done
- ${CAT} << EOF
-
-===========================================================================
-Some files you might need to customize include the following:
-
-EOF
- for file in ${CONFFILES}
- do
- FILE=${CONFDIR}/${file}
- echo " ${FILE}"
- done
- ${CAT} << EOF
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/www/thttpd/MESSAGE b/www/thttpd/MESSAGE
index dd436d03907..2a185db797a 100644
--- a/www/thttpd/MESSAGE
+++ b/www/thttpd/MESSAGE
@@ -1,5 +1,5 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1 2001/11/01 02:18:57 zuntum Exp $
+$NetBSD: MESSAGE,v 1.2 2001/11/19 16:23:16 jlam Exp $
In order to use makeweb:
@@ -7,5 +7,4 @@ In order to use makeweb:
chmod 2755 makeweb
The suggested group is "www".
-
===========================================================================
diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile
index 0a13b4759ca..8865790e657 100644
--- a/www/thttpd/Makefile
+++ b/www/thttpd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2001/07/13 07:09:27 jlam Exp $
+# $NetBSD: Makefile,v 1.14 2001/11/19 16:23:16 jlam Exp $
DISTNAME= thttpd-2.21b
CATEGORIES= www
@@ -16,35 +16,27 @@ GNU_CONFIGURE= # defined
# Note: this pkg auto-detects IPv6 without regarding USE_INET6.
BUILD_DEFS+= USE_INET6
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-FILES_SUBST= CAT=${CAT:Q}
-FILES_SUBST+= CHMOD=${CHMOD:Q}
-FILES_SUBST+= CMP=${CMP:Q}
-FILES_SUBST+= CP=${CP:Q}
-FILES_SUBST+= RM=${RM:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+EGDIR= ${PREFIX}/share/examples
+CONF_FILES= ${EGDIR}/thttpd.conf ${CONFDIR}/thttpd.conf
+RCD_SCRIPTS= ${PREFIX}/etc/rc.d/thttpd /etc/rc.d/thttpd
pre-configure:
${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thtpasswd.1
${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thtpasswd.c
- for file in thttpd.8 extras/Makefile.in extras/thtpasswd.c; do \
- ${MV} -f ${WRKSRC}/$${file} ${WRKSRC}/$${file}.bak; \
- ${SED} -e "s,htpasswd,thtpasswd,g" \
- < ${WRKSRC}/$${file}.bak > ${WRKSRC}/$${file}; \
+ for file in thttpd.8 extras/Makefile.in extras/thtpasswd.c; do \
+ ${MV} -f ${WRKSRC}/$${file} ${WRKSRC}/$${file}.bak; \
+ ${SED} -e "s,htpasswd,thtpasswd,g" \
+ ${WRKSRC}/$${file}.bak > ${WRKSRC}/$${file}; \
done
post-build:
- for file in thttpd.conf thttpd.sh; do \
- ${SED} -e "s,@PREFIX@,${PREFIX},g" \
- < ${FILESDIR}/$${file} > ${WRKDIR}/$${file}; \
+ for file in thttpd.conf thttpd.sh; do \
+ ${SED} ${FILES_SUBST_SED} \
+ ${FILESDIR}/$${file} > ${WRKDIR}/$${file}; \
done
pre-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/thttpd
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
post-install:
@@ -54,4 +46,5 @@ post-install:
${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/thttpd
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/thttpd/files/thttpd.sh b/www/thttpd/files/thttpd.sh
index 5b8ef544608..d5ffb3848c1 100644
--- a/www/thttpd/files/thttpd.sh
+++ b/www/thttpd/files/thttpd.sh
@@ -1,54 +1,26 @@
#!/bin/sh
#
-# $NetBSD: thttpd.sh,v 1.4 2001/01/14 06:14:13 jlam Exp $
+# $NetBSD: thttpd.sh,v 1.5 2001/11/19 16:23:17 jlam Exp $
#
# PROVIDE: thttpd
# REQUIRE: DAEMON
+if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
name="thttpd"
+rcvar=$name
command=@PREFIX@/sbin/${name}
+command_args="-C @CONFDIR@/${name}.conf"
+required_files="@CONFDIR@/${name}.conf"
-pid=`ps -ax | awk '{print $1,$5}' | grep ${name} | awk '{print $1}'`
-
-cmd=${1:-start}
-
-case ${cmd} in
-start)
- if [ "$pid" = "" -a -x ${command} -a -f /etc/${name}.conf ]
- then
- echo "Starting ${name}."
- ${command} -C /etc/${name}.conf
- fi
- ;;
-
-stop)
- if [ "$pid" != "" ]
- then
- echo "Stopping ${name}."
- kill -TERM ${pid}
- else
- echo "${name} not running?"
- fi
- ;;
-
-restart)
- ( $0 stop )
- sleep 1
- $0 start
- ;;
-
-status)
- if [ "$pid" != "" ]
- then
- echo "${name} is running as pid ${pid}."
- else
- echo "${name} is not running."
- fi
- ;;
+if [ ! -d /etc/rc.d ]
+then
+ @ECHO@ -n " ${name}"
+ exec ${command} ${thttpd_flags} ${command_args}
+fi
-*)
- echo 1>&2 "Usage: ${name} [restart|start|stop|status]"
- exit 1
- ;;
-esac
-exit 0
+load_rc_config $name
+run_rc_command "$1"