ports/109360: [PATCH] audio/mpg123: provide rc_subr script
Alexander Logvinov
ports at logvinov.com
Tue Feb 20 14:23:00 UTC 2007
>Number: 109360
>Category: ports
>Synopsis: [PATCH] audio/mpg123: provide rc_subr script
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Feb 20 13:30:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Alexander Logvinov
>Release: FreeBSD 6.2-RELEASE-p1
>Organization:
>Environment:
>Description:
Provide rc_subr script
>How-To-Repeat:
>Fix:
diff -ruN --exclude=CVS /usr/ports/audio/mpg123/Makefile /home/projects/mpg123/Makefile
--- /usr/ports/audio/mpg123/Makefile Tue Nov 29 04:03:07 2005
+++ /home/projects/mpg123/Makefile Tue Feb 20 21:59:44 2007
@@ -7,7 +7,7 @@
PORTNAME= mpg123
PORTVERSION= 0.59r
-PORTREVISION= 17
+PORTREVISION= 18
CATEGORIES= audio ipv6
MASTER_SITES= http://www.mpg123.de/mpg123/ \
http://www-ti.informatik.uni-tuebingen.de/~hippm/mpg123/
@@ -27,6 +27,7 @@
WANT_GNOME= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_RC_SUBR= ${PORTNAME}
.if defined(WITH_ICONV)
MAKE_ARGS+= WITH_ICONV=yes
diff -ruN --exclude=CVS /usr/ports/audio/mpg123/files/mpg123.in /home/projects/mpg123/files/mpg123.in
--- /usr/ports/audio/mpg123/files/mpg123.in Thu Jan 1 09:00:00 1970
+++ /home/projects/mpg123/files/mpg123.in Tue Feb 20 22:01:32 2007
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: mpg123
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable mpg123
+#
+# mpg123_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable mpg123.
+
+. %%RC_SUBR%%
+
+name="mpg123"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${mpg123_enable="NO"}
+: ${mpg123_playlist="%%PREFIX%%/etc/mpg123.lst"}
+
+command="%%PREFIX%%/bin/mpg123"
+command_args="-q -Z -@ ${mpg123_playlist} 2>/dev/null &"
+required_files=${mpg123_playlist}
+
+run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list