diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2010-09-23 12:09:39 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2010-09-23 12:09:39 +0800 |
commit | fcd0f043fb2357140c6a628f613bf39960a59292 (patch) | |
tree | 0c7d4e5037a80f222ae4c45c5d8a4d5eaeeecb3b /audio | |
parent | c90926686e78f537742ab8f131c8e8a9381f3ece (diff) | |
download | freebsd-ports-gnome-fcd0f043fb2357140c6a628f613bf39960a59292.tar.gz freebsd-ports-gnome-fcd0f043fb2357140c6a628f613bf39960a59292.tar.zst freebsd-ports-gnome-fcd0f043fb2357140c6a628f613bf39960a59292.zip |
- added libaacplus support
- added rc.d script
- improved config file handling
PR: 149795
Submitted by: Takefu <takefu@airport.fm>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/darkice/Makefile | 24 | ||||
-rw-r--r-- | audio/darkice/files/darkice.in | 25 | ||||
-rw-r--r-- | audio/darkice/files/pkg-message.in | 19 |
3 files changed, 65 insertions, 3 deletions
diff --git a/audio/darkice/Makefile b/audio/darkice/Makefile index 62a1d3164dd2..c5e0c539d6a1 100644 --- a/audio/darkice/Makefile +++ b/audio/darkice/Makefile @@ -9,7 +9,7 @@ PORTNAME= darkice PORTVERSION= 1.0 CATEGORIES= audio net -MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} +MASTER_SITES= GOOGLE_CODE MAINTAINER= ports@FreeBSD.org COMMENT= An IceCast, IceCast2 and ShoutCast live audio streamer @@ -19,16 +19,20 @@ OPTIONS= VORBIS "Ogg Vorbis support" on \ TWOLAME "TwoLAME support for MP2" off \ FAAC "FAAC support for AAC" off \ JACK "Jack support" off \ + AACPLUS "AAC HEv2 support" off \ SAMPLERATE "Libsamplerate support" off GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS}" LDFLAGS="${PTHREAD_LIBS}" \ ac_cv_prog_acx_pthread_config=no -CONFIGURE_ARGS= --without-alsa --without-aacplus +CONFIGURE_ARGS= --without-alsa + +SUB_FILES= pkg-message +USE_RC_SUBR= ${PORTNAME} MAN1= darkice.1 MAN5= darkice.cfg.5 -PLIST_FILES= bin/darkice etc/darkice.cfg +PLIST_FILES= bin/darkice etc/darkice.cfg.dist .include <bsd.port.pre.mk> @@ -67,6 +71,13 @@ CONFIGURE_ARGS+= --with-jack-prefix=${LOCALBASE} CONFIGURE_ARGS+= --without-jack .endif +.if defined(WITH_AACPLUS) +LIB_DEPENDS+= aacplus.1:${PORTSDIR}/audio/libaacplus +CONFIGURE_ARGS+= --with-aacplus-prefix=${LOCALBASE} +.else +CONFIGURE_ARGS+= --without-aacplus +.endif + .if defined(WITH_SAMPLERATE) LIB_DEPENDS+= samplerate.1:${PORTSDIR}/audio/libsamplerate CONFIGURE_ARGS+= --with-samplerate-prefix=${LOCALBASE} @@ -78,4 +89,11 @@ post-patch: @${REINPLACE_CMD} -e '/test/s|==|=|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|-O2 -pedantic||g' ${WRKSRC}/src/Makefile.in +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin + @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.cfg ${PREFIX}/etc/${PORTNAME}.cfg.dist + @${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.1 ${MAN1PREFIX}/man/man1 + @${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.cfg.5 ${MAN5PREFIX}/man/man5 + @${CAT} ${PKGMESSAGE} + .include <bsd.port.post.mk> diff --git a/audio/darkice/files/darkice.in b/audio/darkice/files/darkice.in new file mode 100644 index 000000000000..8036797d39eb --- /dev/null +++ b/audio/darkice/files/darkice.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: darkice +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: SHUTDOWN + +. "/etc/rc.subr" + +name="darkice" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/$name" +command_args="& 1>/dev/null" +required_files="%%ETCDIR%%.cfg" + +# read configuration and set defaults +load_rc_config "$name" +: ${darkice_enable="NO"} +: ${darkice_flags="-c ${required_files}"} + +run_rc_command "$1" diff --git a/audio/darkice/files/pkg-message.in b/audio/darkice/files/pkg-message.in new file mode 100644 index 000000000000..70f03b1d4d36 --- /dev/null +++ b/audio/darkice/files/pkg-message.in @@ -0,0 +1,19 @@ +******************************************************************** +Unless this file already existed, a sample configuration file +has been placed in %%ETCDIR%%.cfg. + +Please edit it according to your needs. + +******************************************************************** + +The darkice will *not* be started automatically. To allow it +to start, put this line in /etc/rc.conf: + +darkice_enable="YES" + +Then, it will be started on the next boot. If this line is already +present, the client will be started now. Otherwise, edit +/etc/rc.conf and execute this command: + + %%ETCDIR%%/rc.d/darkice start +******************************************************************** |