Date: Sun, 24 Jan 2010 05:42:54 GMT From: Sevan Janiyan <venture37@geeklan.co.uk> To: FreeBSD-gnats-submit@FreeBSD.org Cc: multimedia@FreeBSD.org Subject: ports/143141: [PATCH] net/minisapserver: update rc script & use SUB_FILES Message-ID: <201001240542.o0O5gspK091356@newbie.thingamajig-systems.co.uk> Resent-Message-ID: <201001240550.o0O5o3cx030992@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 143141 >Category: ports >Synopsis: [PATCH] net/minisapserver: update rc script & use SUB_FILES >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jan 24 05:50:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Sevan Janiyan >Release: FreeBSD 8.0-RELEASE-p2 amd64 >Organization: >Environment: System: FreeBSD newbie.thingamajig-systems.co.uk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC >Description: No need to invoke sed manually, SUB_FILES can take care of pkg-message & USE_RC_SUBR can take care of the rc script drop the .sh extension from the rc script Added file(s): - files/pkg-message.in - files/sapserver.in Removed file(s): - pkg-message - files/sapserver.sh Port maintainer (multimedia@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- minisapserver-0.3.4.patch begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/minisapserver/Makefile,v retrieving revision 1.16 diff -u -r1.16 Makefile --- Makefile 21 Aug 2008 06:17:53 -0000 1.16 +++ Makefile 24 Jan 2010 05:40:22 -0000 @@ -17,15 +17,15 @@ GNU_CONFIGURE= yes USE_GMAKE= yes MAN1= sapserver.1 -PLIST_FILES= bin/sapserver etc/sap.cfg-dist etc/rc.d/sapserver.sh -USE_RC_SUBR= yes -PKGMESSAGE= ${WRKDIR}/pkg-message +PLIST_FILES= bin/sapserver etc/sap.cfg-dist +USE_RC_SUBR= sapserver +SUB_FILES= pkg-message OPTIONS= SLP "Enable SLP support via openslp" off CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> .if defined(WITH_SLP) LIB_DEPENDS+= slp.1:${PORTSDIR}/net/openslp @@ -37,6 +37,8 @@ CONFIGURE_ARGS+=--disable-slp .endif +.include <bsd.port.pre.mk> + post-patch: @${REINPLACE_CMD} -e 's|$$(prefix)/share/man|${MANPREFIX}/man|; \ s|$$(prefix)/share/doc/sapserver|${DOCSDIR}|; \ @@ -46,14 +48,9 @@ ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|/etc/sap.cfg|${PREFIX}/etc/sap.cfg|' \ ${WRKSRC}/sapserver.h - @${SED} -e 's|/usr/local|${PREFIX}|' \ - ${PKGDIR}/pkg-message >${PKGMESSAGE} - @${SED} -e 's|%%PREFIX%%|${PREFIX}|; s|%%RC_SUBR%%|${RC_SUBR}|' \ - ${FILESDIR}/sapserver.sh >${WRKDIR}/sapserver.sh @${CP} -f ${WRKSRC}/sap.cfg ${WRKSRC}/sap.cfg-dist post-install: - @${INSTALL_SCRIPT} ${WRKDIR}/sapserver.sh ${PREFIX}/etc/rc.d/ @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> Index: pkg-message =================================================================== RCS file: pkg-message diff -N pkg-message --- pkg-message 25 May 2004 09:17:51 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,7 +0,0 @@ -******************************************************************************* -A sample configuration file, sap.cfg-dist has been installed in /usr/local/etc/ - Please 'cp sap.cfg-dist sap.cfg' and edit sap.cfg. - -To start sapserver at boot time: - echo "sapserver_enable=yes" >> /etc/rc.conf -******************************************************************************* Index: files/pkg-message.in =================================================================== RCS file: files/pkg-message.in diff -N files/pkg-message.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/pkg-message.in 24 Jan 2010 05:40:22 -0000 @@ -0,0 +1,7 @@ +******************************************************************************* +A sample configuration file, sap.cfg-dist has been installed in %%PREFIX%%/etc/ + Please 'cp sap.cfg-dist sap.cfg' and edit sap.cfg. + +To start sapserver at boot time: + echo "sapserver_enable=yes" >> /etc/rc.conf +******************************************************************************* Index: files/sapserver.in =================================================================== RCS file: files/sapserver.in diff -N files/sapserver.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/sapserver.in 24 Jan 2010 05:40:22 -0000 @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD: ports/net/minisapserver/files/sapserver.sh,v 1.3 2006/02/20 20:47:27 dougb Exp $ +# +# PROVIDE: sapserver +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable sapserver: +# +# sapserver_enable="YES" +# + +. /etc/rc.subr + +name=sapserver +rcvar=${name}_enable + +command=%%PREFIX%%/bin/${name} +required_files=%%PREFIX%%/etc/sap.cfg + +load_rc_config ${name} + +: ${sapserver_enable="NO"} + +run_rc_command "$1" Index: files/sapserver.sh =================================================================== RCS file: files/sapserver.sh diff -N files/sapserver.sh --- files/sapserver.sh 20 Feb 2006 20:47:27 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,26 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/net/minisapserver/files/sapserver.sh,v 1.3 2006/02/20 20:47:27 dougb Exp $ -# - -# PROVIDE: sapserver -# REQUIRE: NETWORKING -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable sapserver: -# -#sapserver_enable="YES" -# -sapserver_enable="${sapserver_enable-NO}" - -. %%RC_SUBR%% - -name=sapserver -rcvar=`set_rcvar` - -command=%%PREFIX%%/bin/${name} -required_files=%%PREFIX%%/etc/sap.cfg - -load_rc_config ${name} -run_rc_command "$1" --- minisapserver-0.3.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001240542.o0O5gspK091356>