diff options
author | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2010-02-04 03:14:15 +0000 |
---|---|---|
committer | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2010-02-04 03:14:15 +0000 |
commit | f1aa03c3d924a72764fead4126fb9882668443a0 (patch) | |
tree | c59002598e69e2cb8895edc48b269180eb1f9178 /audio/ezstream | |
parent | 69f4cf050d016d77982f18636160480ee2bfb96b (diff) | |
download | ports-f1aa03c3d924a72764fead4126fb9882668443a0.tar.gz ports-f1aa03c3d924a72764fead4126fb9882668443a0.zip |
Notes
Diffstat (limited to 'audio/ezstream')
-rw-r--r-- | audio/ezstream/Makefile | 19 | ||||
-rw-r--r-- | audio/ezstream/files/ezstream.in | 30 |
2 files changed, 41 insertions, 8 deletions
diff --git a/audio/ezstream/Makefile b/audio/ezstream/Makefile index 3447d4828d47..7eb76305db4e 100644 --- a/audio/ezstream/Makefile +++ b/audio/ezstream/Makefile @@ -22,6 +22,7 @@ OPTIONS= TAGLIB "TagLib support" on USE_GNOME= libxml2 USE_ICONV= yes +USE_RC_SUBR= ${PORTNAME} GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" @@ -31,7 +32,7 @@ PORTEXAMPLES= ezstream_metadata.xml ezstream_mp3.xml \ 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,26 +42,28 @@ LDFLAGS= -L${LOCALBASE}/lib ${PTHREAD_LIBS} .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) - @${MKDIR} ${DOCSDIR} + @${MKDIR} ${DOCSDIR}/ .for file in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}/ .endfor .endif .if !defined(NOPORTEXAMPLES) - @${MKDIR} ${EXAMPLESDIR} -.for file in ${PORTEXAMPLES} - ${INSTALL_DATA} ${WRKSRC}/examples/${file} ${EXAMPLESDIR} + @${MKDIR} ${EXAMPLESDIR}/ +.for f in ${PORTEXAMPLES} + ${INSTALL_DATA} ${WRKSRC}/examples/${f} ${EXAMPLESDIR}/ .endfor .endif + @${MKDIR} ${ETCDIR}/ + @${INSTALL_DATA} ${WRKSRC}/examples/ezstream_vorbis.xml ${ETCDIR}/ezstream.xml .include <bsd.port.post.mk> diff --git a/audio/ezstream/files/ezstream.in b/audio/ezstream/files/ezstream.in new file mode 100644 index 000000000000..51abe397d0fa --- /dev/null +++ b/audio/ezstream/files/ezstream.in @@ -0,0 +1,30 @@ +#!/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" |