mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
- added libaacplus support
- added rc.d script - improved config file handling PR: 149795 Submitted by: Takefu <takefu@airport.fm>
This commit is contained in:
parent
30078c2fd6
commit
80ee484ff4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=261685
@ -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>
|
||||
|
25
audio/darkice/files/darkice.in
Normal file
25
audio/darkice/files/darkice.in
Normal file
@ -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"
|
19
audio/darkice/files/pkg-message.in
Normal file
19
audio/darkice/files/pkg-message.in
Normal file
@ -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
|
||||
********************************************************************
|
Loading…
Reference in New Issue
Block a user