aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2004-05-03 12:27:23 +0800
committerdinoex <dinoex@FreeBSD.org>2004-05-03 12:27:23 +0800
commit68d6aab19d3365b21308172101cc4edf0dbd54cc (patch)
treeed6cee043cd6ebef236aedf404a224354519bf7d /www
parent1eacbe1ba93bba6dedab5a0844d2425657022dab (diff)
downloadfreebsd-ports-gnome-68d6aab19d3365b21308172101cc4edf0dbd54cc.tar.gz
freebsd-ports-gnome-68d6aab19d3365b21308172101cc4edf0dbd54cc.tar.zst
freebsd-ports-gnome-68d6aab19d3365b21308172101cc4edf0dbd54cc.zip
- rcNG-fy
Submitted by: nork WARNING installing the package will overwrite your "etc/rc.d/apache.sh" installing from port is safe - new option WITHOUT_RC_SUBR
Diffstat (limited to 'www')
-rw-r--r--www/apache13-modssl/Makefile22
-rw-r--r--www/apache13-modssl/files/rcng.sh30
-rw-r--r--www/apache13-modssl/pkg-plist2
3 files changed, 46 insertions, 8 deletions
diff --git a/www/apache13-modssl/Makefile b/www/apache13-modssl/Makefile
index e8469e6f6323..83011b1cc631 100644
--- a/www/apache13-modssl/Makefile
+++ b/www/apache13-modssl/Makefile
@@ -7,7 +7,7 @@
PORTNAME= apache+mod_ssl
PORTVERSION= ${VERSION_APACHE}+${VERSION_MODSSL}${PVERSION_MODSNMP}${PVERSION_MODACCEL}${PVERSION_MODDEFLATE}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www security
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
${MASTER_SITES_MODSSL:S/$/:mod_ssl/} \
@@ -52,6 +52,7 @@ MODSSL_FILE= mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE}${EXTRACT_SUFX}
MODSNMP_FILE= mod_snmp_${VERSION_MODSNMP}${EXTRACT_SUFX}
MODACCEL_FILE= mod_accel-${VERSION_MODACCEL}${EXTRACT_SUFX}
MODDEFLATE_FILE= mod_deflate-${VERSION_MODDEFLATE}${EXTRACT_SUFX}
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
.include <bsd.port.pre.mk>
@@ -59,6 +60,13 @@ DATADIR= ${PREFIX}/www
DOCSDIR= ${PREFIX}/share/doc/apache
DOCUMENT_ROOT= ${DATADIR}/data
+.if !exist(${PREFIX}/etc/rc.d/apache.sh && !defined(WITHOUT_RC_SUBR)
+USE_RC_SUBR= yes
+PLIST_FILES+= etc/rc.d/apache.sh
+.else
+PLIST_FILES+= etc/rc.d/apache.sh.sample
+.endif
+
.if defined(WITH_APACHE_SUEXEC) && ${WITH_APACHE_SUEXEC} == yes
APACHE_SUEXEC_CALLER?=www
@@ -310,6 +318,8 @@ pre-fetch:
post-extract:
post-extract:
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/rcng.sh > ${WRKSRC}/rcng.sh
@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \
> ${WRKSRC}/apache.sh
.if defined(APACHE_WITH_MODSNMP)
@@ -356,11 +366,11 @@ pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
- ${INSTALL_DATA} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh-dist
- @if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
- ${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
- ${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \
- fi
+.if defined(USE_RC_SUBR)
+ ${INSTALL_SCRIPT} ${WRKSRC}/rcng.sh ${PREFIX}/etc/rc.d/apache.sh
+.else
+ ${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh.sample
+.endif
.if defined(APACHE_WITH_MODSNMP)
@${MKDIR} ${DATADIR}/buckets
@${CHOWN} www:www ${DATADIR}/buckets
diff --git a/www/apache13-modssl/files/rcng.sh b/www/apache13-modssl/files/rcng.sh
new file mode 100644
index 000000000000..e3036de88757
--- /dev/null
+++ b/www/apache13-modssl/files/rcng.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: apache
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+# Define these apache_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/apache
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+apache_enable="NO"
+apache_flags="-DSSL"
+apache_pidfile="/var/run/httpd.pid"
+
+. %%RC_SUBR%%
+
+name="apache"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/httpd"
+
+load_rc_config $name
+
+pidfile="${apache_pidfile}"
+
+run_rc_commmand "$1"
diff --git a/www/apache13-modssl/pkg-plist b/www/apache13-modssl/pkg-plist
index 342e9caf1d83..d45a2f734913 100644
--- a/www/apache13-modssl/pkg-plist
+++ b/www/apache13-modssl/pkg-plist
@@ -38,8 +38,6 @@ etc/apache/ssl.key/snakeoil-rsa.key
etc/apache/ssl.prm/README.PRM
etc/apache/ssl.prm/snakeoil-ca-dsa.prm
etc/apache/ssl.prm/snakeoil-dsa.prm
-@unexec if cmp -s %D/etc/rc.d/apache.sh %D/etc/rc.d/apache.sh-dist; then rm -f %D/etc/rc.d/apache.sh; fi
-etc/rc.d/apache.sh-dist
include/apache/ap.h
include/apache/ap_alloc.h
include/apache/ap_compat.h