diff options
author | jlam <jlam> | 2001-11-19 16:23:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-11-19 16:23:08 +0000 |
commit | 921dba3e4056acfac3df83e1629ab22167889846 (patch) | |
tree | d5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /www/horde | |
parent | e740603fc9e2110613fe030c8dabf0543d664a81 (diff) | |
download | pkgsrc-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/horde')
-rw-r--r-- | www/horde/DEINSTALL | 116 | ||||
-rw-r--r-- | www/horde/INSTALL | 76 | ||||
-rw-r--r-- | www/horde/Makefile | 34 |
3 files changed, 14 insertions, 212 deletions
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" |