diff options
author | scheidell <scheidell@FreeBSD.org> | 2012-01-19 09:23:55 +0800 |
---|---|---|
committer | scheidell <scheidell@FreeBSD.org> | 2012-01-19 09:23:55 +0800 |
commit | 164cb2b7df8634c603be7aaecd07ac62c26af925 (patch) | |
tree | 4726a1c854ee8363cf84a65abd899b621bab0838 /audio | |
parent | 70d577dcceab4fc8f811639c0120f38066d3baf5 (diff) | |
download | freebsd-ports-gnome-164cb2b7df8634c603be7aaecd07ac62c26af925.tar.gz freebsd-ports-gnome-164cb2b7df8634c603be7aaecd07ac62c26af925.tar.zst freebsd-ports-gnome-164cb2b7df8634c603be7aaecd07ac62c26af925.zip |
- force commit to bring shoutcast(2) into old shoutcast position
- shoutcast(1) removed in November
- MOVED entry removed, original PR asked for new port, but gabor asked for this to replace old port
PR: ports/154031
Submitted by: Jarrod Sayers <jarrod@downtools.com.au> (maintainer)
Reviewed by: gabor,scheidell
Approved by: maintainer, gabor (mentor)
Diffstat (limited to 'audio')
-rw-r--r-- | audio/Makefile | 1 | ||||
-rw-r--r-- | audio/shoutcast/Makefile | 79 | ||||
-rw-r--r-- | audio/shoutcast/distinfo | 2 | ||||
-rw-r--r-- | audio/shoutcast/files/pkg-message.in | 13 | ||||
-rw-r--r-- | audio/shoutcast/files/shoutcast.in | 45 | ||||
-rw-r--r-- | audio/shoutcast/pkg-descr | 6 | ||||
-rw-r--r-- | audio/shoutcast/pkg-plist | 21 |
7 files changed, 167 insertions, 0 deletions
diff --git a/audio/Makefile b/audio/Makefile index 413d5218cf40..f257afb149aa 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -668,6 +668,7 @@ SUBDIR += shntool SUBDIR += shorten SUBDIR += shout + SUBDIR += shoutcast SUBDIR += sidplay SUBDIR += sidplay2 SUBDIR += sidplayer diff --git a/audio/shoutcast/Makefile b/audio/shoutcast/Makefile new file mode 100644 index 000000000000..f28b1c58b4b9 --- /dev/null +++ b/audio/shoutcast/Makefile @@ -0,0 +1,79 @@ +# New ports collection makefile for: shoutcast +# Date created: 15 January 2011 +# Whom: Jarrod Sayers <jarrod@downtools.com.au> +# +# $FreeBSD$ +# + +PORTNAME= shoutcast +PORTVERSION= 2.0.b14 +CATEGORIES= audio net +MASTER_SITES= http://download.nullsoft.com/shoutcast/tools/ +DISTNAME= sc_serv2_bsd_8_x_01_25_2011 + +MAINTAINER= jarrod@downtools.com.au +COMMENT= SHOUTcast Distributed Network Audio Server + +RESTRICTED= redistribution of software is not permitted +IA32_BINARY_PORT= yes + +USE_RC_SUBR= shoutcast + +CONFLICTS= linux-shoutcast-[0-9]* +NO_WRKSUBDIR= yes +NO_BUILD= yes + +SHOUTCASTUSER= ${PORTNAME} +SHOUTCASTGROUP= ${PORTNAME} +SHOUTCASTDIR= /var/run/${PORTNAME} + +PLIST_SUB= SHOUTCASTUSER=${SHOUTCASTUSER} \ + SHOUTCASTGROUP=${SHOUTCASTGROUP} \ + SHOUTCASTDIR=${SHOUTCASTDIR} + +SUB_FILES= pkg-message + +SUB_LIST= ${PLIST_SUB} + +USERS= ${SHOUTCASTUSER} +GROUPS= ${SHOUTCASTGROUP} + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 800000 +IGNORE= is for FreeBSD 8.x and later +.endif + +post-patch: + @${REINPLACE_CMD} -e '/^logfile=.*\/logfile.log/d' \ + -e '/sc_serv2 directory/d' \ + -e 's#=.*/sc_serv.log#=/var/log/sc_serv.log#g' \ + -e 's#=.*/sc_w3c.log#=/var/log/sc_w3c.log#g' \ + -e 's#=./control/#=${SHOUTCASTDIR}/#g' ${WRKSRC}/sc_serv_basic.conf + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sc_serv ${PREFIX}/sbin + ${MKDIR} ${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/sc_serv_basic.conf ${ETCDIR}/sc_serv_basic.conf.sample + ${INSTALL_DATA} ${WRKSRC}/sc_serv_debug.conf ${ETCDIR}/sc_serv_debug.conf.sample + ${INSTALL_DATA} ${WRKSRC}/sc_serv_public.conf ${ETCDIR}/sc_serv_public.conf.sample + ${INSTALL_DATA} ${WRKSRC}/sc_serv_relay.conf ${ETCDIR}/sc_serv_relay.conf.sample + ${INSTALL_DATA} ${WRKSRC}/sc_serv_simple.conf ${ETCDIR}/sc_serv_simple.conf.sample +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/changes.txt ${DOCSDIR}/changes.txt + ${INSTALL_DATA} ${WRKSRC}/docs/crossdomain.xml ${DOCSDIR}/crossdomain.xml + ${INSTALL_DATA} ${WRKSRC}/docs/dsp_sc/dsp_sc.txt ${DOCSDIR}/dsp_sc.txt + ${INSTALL_DATA} ${WRKSRC}/docs/dsp_sc/dsp_sc_config.txt ${DOCSDIR}/dsp_sc_config.txt + ${INSTALL_DATA} ${WRKSRC}/docs/getting_started.txt ${DOCSDIR}/getting_started.txt + ${INSTALL_DATA} ${WRKSRC}/docs/sc2_xml_metadata.txt ${DOCSDIR}/sc2_xml_metadata.txt + ${INSTALL_DATA} ${WRKSRC}/docs/shoutcast_system_overview.txt ${DOCSDIR}/shoutcast_system_overview.txt +.endif + +post-install: + ${MKDIR} ${SHOUTCASTDIR} + @${CHMOD} 0750 ${SHOUTCASTDIR} + @${CHOWN} ${SHOUTCASTUSER}:${SHOUTCASTGROUP} ${SHOUTCASTDIR} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/audio/shoutcast/distinfo b/audio/shoutcast/distinfo new file mode 100644 index 000000000000..9acd8d3e4adf --- /dev/null +++ b/audio/shoutcast/distinfo @@ -0,0 +1,2 @@ +SHA256 (sc_serv2_bsd_8_x_01_25_2011.tar.gz) = ecf72ec571d61c0967c522b14443e126cd82033d79d1f301daa6e3abab640ba9 +SIZE (sc_serv2_bsd_8_x_01_25_2011.tar.gz) = 696256 diff --git a/audio/shoutcast/files/pkg-message.in b/audio/shoutcast/files/pkg-message.in new file mode 100644 index 000000000000..707a64d266c9 --- /dev/null +++ b/audio/shoutcast/files/pkg-message.in @@ -0,0 +1,13 @@ +********************************************************************** + + SHOUTcast Distributed Network Audio Server is now installed. + + Enable SHOUTcast in /etc/rc.conf with the following line: + + shoutcast_enable="YES" + + Configuration templates are available in %%PREFIX%%/%%ETCDIR%% as + *.sample files. A basic installation can be completed by copying + sc_serv_basic.conf.sample to sc_serv.conf. + +********************************************************************** diff --git a/audio/shoutcast/files/shoutcast.in b/audio/shoutcast/files/shoutcast.in new file mode 100644 index 000000000000..8b2a3805959f --- /dev/null +++ b/audio/shoutcast/files/shoutcast.in @@ -0,0 +1,45 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: shoutcast +# REQUIRE: LOGIN +# BEFORE: +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable SHOUTcast: +# shoutcast_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable SHOUTcast. +# shoutcast_configfile (str): Set to "%%PREFIX%%/%%ETCDIR%%/sc_serv.conf" by default. +# + +. /etc/rc.subr + +name="shoutcast" +rcvar=`set_rcvar` +shoutcast_logfile="/var/log/sc_serv.log" + +start_cmd="shoutcast_startcmd" +stop_cmd="shoutcast_stopcmd" + +[ -z "${shoutcast_enable}" ] && shoutcast_enable="NO" +[ -z "${shoutcast_configfile}" ] && shoutcast_configfile="%%PREFIX%%/%%ETCDIR%%/sc_serv.conf" + +load_rc_config "${name}" + +required_files="${shoutcast_configfile}" + +shoutcast_startcmd() { + touch ${shoutcast_logfile} + chown %%SHOUTCASTUSER%%:wheel ${shoutcast_logfile} + chmod 0640 ${shoutcast_logfile} + su %%SHOUTCASTUSER%% -c "cd %%SHOUTCASTDIR%% && %%PREFIX%%/sbin/sc_serv ${shoutcast_configfile} >/dev/null 2>&1 &" +} + +shoutcast_stopcmd() { + killall sc_serv +} + +run_rc_command "$1" diff --git a/audio/shoutcast/pkg-descr b/audio/shoutcast/pkg-descr new file mode 100644 index 000000000000..04419babf301 --- /dev/null +++ b/audio/shoutcast/pkg-descr @@ -0,0 +1,6 @@ +SHOUTcast Distributed Network Audio Server 2.0 (or DNAS for short) is +the next-generation SHOUTcast server technology, designed to work with +the new YP 2.0 playform that supports real-time and coming soon search +results, international chatacter encoding support, and much more! + +WWW: http://www.shoutcast.com/broadcast-tools/ diff --git a/audio/shoutcast/pkg-plist b/audio/shoutcast/pkg-plist new file mode 100644 index 000000000000..5f336eefcaad --- /dev/null +++ b/audio/shoutcast/pkg-plist @@ -0,0 +1,21 @@ +@exec mkdir -p %%SHOUTCASTDIR%% +@exec chmod 0750 %%SHOUTCASTDIR%% +@exec chown %%SHOUTCASTUSER%%:%%SHOUTCASTGROUP%% %%SHOUTCASTDIR%% +%%ETCDIR%%/sc_serv_basic.conf.sample +%%ETCDIR%%/sc_serv_debug.conf.sample +%%ETCDIR%%/sc_serv_public.conf.sample +%%ETCDIR%%/sc_serv_relay.conf.sample +%%ETCDIR%%/sc_serv_simple.conf.sample +sbin/sc_serv +%%PORTDOCS%%%%DOCSDIR%%/changes.txt +%%PORTDOCS%%%%DOCSDIR%%/crossdomain.xml +%%PORTDOCS%%%%DOCSDIR%%/dsp_sc.txt +%%PORTDOCS%%%%DOCSDIR%%/dsp_sc_config.txt +%%PORTDOCS%%%%DOCSDIR%%/getting_started.txt +%%PORTDOCS%%%%DOCSDIR%%/sc2_xml_metadata.txt +%%PORTDOCS%%%%DOCSDIR%%/shoutcast_system_overview.txt +@dirrmtry %%ETCDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@unexec if [ ! -s %%SHOUTCASTDIR%%/sc_serv.ban ]; then rm -f %%SHOUTCASTDIR%%/sc_serv.ban; fi +@unexec if [ ! -s %%SHOUTCASTDIR%%/sc_serv.rip ]; then rm -f %%SHOUTCASTDIR%%/sc_serv.rip; fi +@unexec rmdir %%SHOUTCASTDIR%% 2>/dev/null || true |