summaryrefslogtreecommitdiff
path: root/www/php4
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-19 16:23:08 +0000
committerjlam <jlam@pkgsrc.org>2001-11-19 16:23:08 +0000
commitb23d2e86260aaa8ed2013bf77ad605b63e34b0ed (patch)
treed5fafec9bfc1b14f6b1c5da4d0c45beb2b4758b4 /www/php4
parentc850f81b615ba9e58563fe40c1075ad3aea9ffa4 (diff)
downloadpkgsrc-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/php4')
-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
6 files changed, 10 insertions, 143 deletions
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