diff options
author | jlam <jlam@pkgsrc.org> | 2001-11-19 16:23:08 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-11-19 16:23:08 +0000 |
commit | b23d2e86260aaa8ed2013bf77ad605b63e34b0ed (patch) | |
tree | d5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /www/cvsweb | |
parent | c850f81b615ba9e58563fe40c1075ad3aea9ffa4 (diff) | |
download | pkgsrc-b23d2e86260aaa8ed2013bf77ad605b63e34b0ed.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/cvsweb')
-rw-r--r-- | www/cvsweb/DEINSTALL | 67 | ||||
-rw-r--r-- | www/cvsweb/INSTALL | 57 | ||||
-rw-r--r-- | www/cvsweb/Makefile | 21 |
3 files changed, 8 insertions, 137 deletions
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" |