From owner-freebsd-ports@FreeBSD.ORG Mon May 3 10:28:46 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB0E716A4CE; Mon, 3 May 2004 10:28:46 -0700 (PDT) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A52343D4C; Mon, 3 May 2004 10:28:46 -0700 (PDT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.12.11/8.12.11/NinthNine) with SMTP id i43HSim7030287; Tue, 4 May 2004 02:28:45 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Tue, 4 May 2004 02:28:44 +0900 (JST) Message-Id: <200405031728.i43HSim7030287@sakura.ninth-nine.com> From: Norikatsu Shigemura To: clement@FreeBSD.org X-Mailer: Sylpheed version 0.9.9-gtk2-20040229 (GTK+ 2.4.1; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: ports@FreeBSD.org cc: ume@FreeBSD.org Subject: rcNG-fy www/apache2 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2004 17:28:47 -0000 Hi. I made a patch which rcNG-fy www/apache2. Please review my patch. Requested by: ume - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: Makefile =================================================================== RCS file: /home/ncvs/ports/www/apache2/Makefile,v retrieving revision 1.175 diff -u -r1.175 Makefile --- Makefile 20 Mar 2004 12:27:45 -0000 1.175 +++ Makefile 3 May 2004 17:25:03 -0000 @@ -9,6 +9,7 @@ PORTNAME= apache PORTVERSION= 2.0.49 +PORTREVISION= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \ http://sheepkiller.nerim.net/ports/${PORTNAME}/:powerlogo @@ -49,6 +50,7 @@ USE_LIBTOOL_VER= 13 USE_PERL5= yes USE_REINPLACE= yes +USE_RC_SUBR= yes LIBTOOLFILES= configure CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ @@ -65,7 +67,8 @@ LOCALBASE="${LOCALBASE}" PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} -RC_SUB= -e 's,@@PREFIX@@,${PREFIX_RELDEST},g' +RC_SCRIPTS_SUB= PREFIX_RELDEST=${PREFIX_RELDEST} RC_SUBR=${RC_SUBR} + MAKE_ENV+= DESTDIR=${DESTDIR} EXPR_COMPAT=yes WITH_MPM?= prefork # or worker, perchild @@ -167,7 +170,8 @@ ALT="[Powered by FreeBSD]"> /dev/null && echo -n ' apache2' - ;; -stop) - [ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache2' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac +# PROVIDE: apache +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown -exit 0 +# 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_command "$1" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -