summaryrefslogtreecommitdiff
path: root/www/ap-ssl
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/ap-ssl
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/ap-ssl')
-rw-r--r--www/ap-ssl/DEINSTALL81
-rw-r--r--www/ap-ssl/INSTALL69
-rw-r--r--www/ap-ssl/Makefile69
3 files changed, 36 insertions, 183 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"