ports/143078: [PATCH] audio/ezstream: USE_RC_SUBR in use

Takefu takefu at airport.fm
Fri Jan 22 10:30:04 UTC 2010


>Number:         143078
>Category:       ports
>Synopsis:       [PATCH] audio/ezstream: USE_RC_SUBR in use
>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:   Fri Jan 22 10:30:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Takefu
>Release:        
>Organization:
FOX Amateur Radio Club
>Environment:
>Description:
USE_RC_SUBR in use
Default example ezstream_vorbis.xml to ezstream.xml

Added file(s):
- files/ezstream.in

Port maintainer (ayu at commun.jp) is cc'd.

>How-To-Repeat:
>Fix:

--- ezstream-0.5.6_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/audio/ezstream/Makefile ezstream/Makefile
--- /usr/ports/audio/ezstream/Makefile	2009-12-03 02:16:08.000000000 +0900
+++ ezstream/Makefile	2010-01-05 14:17:55.000000000 +0900
@@ -22,6 +22,7 @@

 USE_GNOME=	libxml2
 USE_ICONV=	yes
+USE_RC_SUBR=	${PORTNAME}
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"

@@ -31,7 +32,7 @@
 		ezstream_reencode_mp3.xml ezstream_reencode_theora.xml \
 		ezstream_reencode_vorbis.xml ezstream_stdin_vorbis.xml \
 		ezstream_vorbis.xml meta.sh play.sh
-PLIST_FILES=	bin/ezstream bin/ezstream-file.sh
+PLIST_FILES=	bin/ezstream bin/ezstream-file.sh etc/ezstream/ezstream.xml '@dirrm etc/ezstream'

 CPPFLAGS=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
 LDFLAGS=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
@@ -41,13 +42,13 @@
 .if defined(WITHOUT_TAGLIB)
 CONFIGURE_ARGS+=	--without-taglib
 .else
-LIB_DEPENDS+=	tag.1:${PORTSDIR}/audio/taglib
+LIB_DEPENDS+=		tag.1:${PORTSDIR}/audio/taglib
 CONFIGURE_ARGS+=	--with-taglib=${LOCALBASE}
 .endif

 post-patch:
 	@${REINPLACE_CMD} -e '/^SUBDIRS =/s|examples||g ; \
-		 s|: install-dist_docDATA|:|g' ${WRKSRC}/Makefile.in
+		s|: install-dist_docDATA|:|g' ${WRKSRC}/Makefile.in

 post-install:
 .if !defined(NOPORTDOCS)
@@ -62,5 +63,7 @@
 	${INSTALL_DATA} ${WRKSRC}/examples/${file} ${EXAMPLESDIR}
 .endfor
 .endif
+	@${MKDIR} ${ETCDIR}
+	@${INSTALL_DATA} ${WRKSRC}/examples/ezstream_vorbis.xml ${ETCDIR}/ezstream.xml

 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/audio/ezstream/files/ezstream.in ezstream/files/ezstream.in
--- /usr/ports/audio/ezstream/files/ezstream.in	1970-01-01 09:00:00.000000000 +0900
+++ ezstream/files/ezstream.in	2009-08-13 19:21:31.000000000 +0900
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: ezstream
+# REQUIRE: DAEMON
+# BEFORE:  login
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable the ezstream daemon:
+#
+# ezstream_enable="YES"
+# ezstream_flags="<set as needed>"
+#
+
+. %%RC_SUBR%%
+
+name="ezstream"
+rcvar=`set_rcvar`
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${ezstream_enable="NO"}
+: ${ezstream_flags="-c %%PREFIX%%/etc/${name}/${name}.xml"}
+
+command="%%PREFIX%%/bin/${name}"
+
+run_rc_command "$1"
--- ezstream-0.5.6_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list