diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/apache13/Makefile | 14 | ||||
-rw-r--r-- | www/apache13/files/apache.sh | 41 | ||||
-rw-r--r-- | www/apache13/pkg-message | 4 | ||||
-rw-r--r-- | www/apache13/pkg-plist | 4 |
4 files changed, 39 insertions, 24 deletions
diff --git a/www/apache13/Makefile b/www/apache13/Makefile index fd339001d1ea..5d048396a64a 100644 --- a/www/apache13/Makefile +++ b/www/apache13/Makefile @@ -7,7 +7,7 @@ PORTNAME= apache PORTVERSION= 1.3.29 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} DISTNAME= apache_${PORTVERSION} @@ -27,10 +27,12 @@ CONFLICTS= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* caudium-devel-1.* caudium10-1.* caudium12-* \ ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.* USE_PERL5= yes +USE_RC_SUBR= yes DATADIR=${PREFIX}/www DOCUMENT_ROOT=${DATADIR}/data DEFAULT_PATH=/bin:/usr/bin:${PREFIX}/bin +RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} .if defined(WITHOUT_APACHE_EXPAT) && ${WITHOUT_APACHE_EXPAT} == yes EXPAT_CONF+= --disable-rule=EXPAT @@ -128,18 +130,14 @@ MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 \ ${SUEXEC_MAN} post-extract: - @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \ - > ${WRKSRC}/apache.sh + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/apache.sh > ${WRKSRC}/apache.sh pre-install: PKG_PREFIX=${PREFIX} ${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} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \ - ${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \ - fi + ${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh @${TOUCH} ${PREFIX}/www/data-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING @${TOUCH} ${PREFIX}/www/cgi-bin-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING @${CAT} ${PKGMESSAGE} diff --git a/www/apache13/files/apache.sh b/www/apache13/files/apache.sh index da657b5307ba..1b57c7853e5a 100644 --- a/www/apache13/files/apache.sh +++ b/www/apache13/files/apache.sh @@ -1,15 +1,30 @@ #!/bin/sh +# $FreeBSD$ -case "$1" in -start) - [ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /dev/null && echo -n ' apache' - ;; -stop) - [ -r /var/run/httpd.pid ] && %%PREFIX%%/sbin/apachectl stop > /dev/null && echo -n ' apache' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 +# 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="" +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/pkg-message b/www/apache13/pkg-message index 76b79ba42849..dc9db343ea65 100644 --- a/www/apache13/pkg-message +++ b/www/apache13/pkg-message @@ -2,3 +2,7 @@ As of version 1.3.24, the RedirectMatch directive requires an absolute URL target location per RFC 2068. Uses of RedirectMatch that specify a relative URL will fail and must be corrected to function. + +===> BE CAREFULL HOW TO BOOT on 1.3.29_4 or after: + To run apache www server from startup, add apache_enable="YES" + in your /etc/rc.conf. diff --git a/www/apache13/pkg-plist b/www/apache13/pkg-plist index 8e73cead3aa2..60c73d8da083 100644 --- a/www/apache13/pkg-plist +++ b/www/apache13/pkg-plist @@ -18,9 +18,7 @@ etc/apache/mime.types-dist @unexec if cmp -s %D/etc/apache/srm.conf %D/etc/apache/srm.conf-dist; then rm -f %D/etc/apache/srm.conf; fi etc/apache/srm.conf-dist @exec [ -f %B/srm.conf ] || cp %B/%f %B/srm.conf -@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 -@exec [ -f %B/apache.sh ] || ( cp %B/%f %B/apache.sh; chmod 755 %B/apache.sh ) +etc/rc.d/apache.sh include/apache/ap.h include/apache/ap_alloc.h include/apache/ap_compat.h |