diff options
author | dougb <dougb@FreeBSD.org> | 2010-03-27 09:08:15 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2010-03-27 09:08:15 +0800 |
commit | 36032a43035325839323a6a57f151df882d0828d (patch) | |
tree | e37bf09354f719712f80b679dc0737b41ab241eb /net | |
parent | 7eddb8bcc2fa6e02126fff364cec8fa487d5fb72 (diff) | |
download | freebsd-ports-gnome-36032a43035325839323a6a57f151df882d0828d.tar.gz freebsd-ports-gnome-36032a43035325839323a6a57f151df882d0828d.tar.zst freebsd-ports-gnome-36032a43035325839323a6a57f151df882d0828d.zip |
Properly utilize USE_RC_SUBR
Make pkg-message dynamic
PR: ports/143141
Submitted by: Sevan Janiyan <venture37@geeklan.co.uk>
Approved by: maintainer timeout
Diffstat (limited to 'net')
-rw-r--r-- | net/minisapserver/Makefile | 16 | ||||
-rw-r--r-- | net/minisapserver/files/sapserver.sh | 26 | ||||
-rw-r--r-- | net/minisapserver/pkg-message | 7 |
3 files changed, 7 insertions, 42 deletions
diff --git a/net/minisapserver/Makefile b/net/minisapserver/Makefile index 9e1f45a57025..02170abd1c48 100644 --- a/net/minisapserver/Makefile +++ b/net/minisapserver/Makefile @@ -7,6 +7,7 @@ PORTNAME= minisapserver PORTVERSION= 0.3.4 +PORTREVISION= 1 CATEGORIES= net multimedia MASTER_SITES= http://downloads.videolan.org/pub/videolan/miniSAPserver/${PORTVERSION}/ @@ -17,15 +18,15 @@ USE_BZIP2= yes 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 +38,8 @@ CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ 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 +49,9 @@ post-patch: ${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> diff --git a/net/minisapserver/files/sapserver.sh b/net/minisapserver/files/sapserver.sh deleted file mode 100644 index d8257e7054b2..000000000000 --- a/net/minisapserver/files/sapserver.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net/minisapserver/files/Attic/sapserver.sh,v 1.4 2010-03-27 00:13:48 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}" - -. /etc/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" diff --git a/net/minisapserver/pkg-message b/net/minisapserver/pkg-message deleted file mode 100644 index ab1f614f4e38..000000000000 --- a/net/minisapserver/pkg-message +++ /dev/null @@ -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 -******************************************************************************* |