mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- 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
This commit is contained in:
parent
630f04e799
commit
8970412bd0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108235
@ -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
|
||||
|
30
www/apache13-modssl/files/rcng.sh
Normal file
30
www/apache13-modssl/files/rcng.sh
Normal file
@ -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"
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user