diff options
author | itetcu <itetcu@FreeBSD.org> | 2006-06-05 18:39:01 +0800 |
---|---|---|
committer | itetcu <itetcu@FreeBSD.org> | 2006-06-05 18:39:01 +0800 |
commit | a4e284b9f1f69cd7c36d7be5978d2b5692dee9c4 (patch) | |
tree | cb062390216bce406035706488f38cdf0e0fd701 /audio/linux-shoutcast | |
parent | 14b18d69e299697a518ef8bbd997af1edbe95aa5 (diff) | |
download | freebsd-ports-gnome-a4e284b9f1f69cd7c36d7be5978d2b5692dee9c4.tar.gz freebsd-ports-gnome-a4e284b9f1f69cd7c36d7be5978d2b5692dee9c4.tar.zst freebsd-ports-gnome-a4e284b9f1f69cd7c36d7be5978d2b5692dee9c4.zip |
Shoutcast is Nullsoft's Winamp-based streaming audio server. It isn't
an open source software, but freely available for i386 versions of
FreeBSD 4.X/5.X and Linux. This port installs the Linux binary.
WWW: http://www.shoutcast.com
PR: ports/95514
Submitted by: Gabor Kovesdan
Approved by: lawrance(mentor, implicit)
Diffstat (limited to 'audio/linux-shoutcast')
-rw-r--r-- | audio/linux-shoutcast/Makefile | 53 | ||||
-rw-r--r-- | audio/linux-shoutcast/distinfo | 3 | ||||
-rw-r--r-- | audio/linux-shoutcast/files/shoutcast.sh.in | 27 | ||||
-rw-r--r-- | audio/linux-shoutcast/pkg-deinstall | 16 | ||||
-rw-r--r-- | audio/linux-shoutcast/pkg-descr | 5 | ||||
-rw-r--r-- | audio/linux-shoutcast/pkg-install | 50 | ||||
-rw-r--r-- | audio/linux-shoutcast/pkg-plist | 4 |
7 files changed, 158 insertions, 0 deletions
diff --git a/audio/linux-shoutcast/Makefile b/audio/linux-shoutcast/Makefile new file mode 100644 index 000000000000..e2c10864f057 --- /dev/null +++ b/audio/linux-shoutcast/Makefile @@ -0,0 +1,53 @@ +# Ports collection Makefile for: linux-shoutcast +# Date created: 08 Apr 2006 +# Whom: Gabor Kovesdan +# +# $FreeBSD$ + +PORTNAME= shoutcast +PORTVERSION= 1.9.5 +CATEGORIES= audio net +MASTER_SITES= http://www.shoutcast.com/downloads/sc1-9-5/ +PKGNAMEPREFIX= linux- +DISTNAME= shoutcast-1-9-5-linux-glibc6 + +MAINTAINER= gkovesdan@t-hosting.hu +COMMENT= Nullsoft's streaming audio server (Linux binary port) + +CONFLICTS= shoutcast-[0-9]* + +USE_LINUX= YES +ONLY_FOR_ARCHS= i386 amd64 ia64 +NO_BUILD= YES +RESTRICTED= Redistribution of the software is not allowed + +USE_RC_SUBR= shoutcast.sh +PORTDOCS= README.TXT + +post-patch: + ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' \ + -e 's|=sc_serv.log|=/var/log/sc_serv.log|' \ + -e 's|=sc_w3c.log|=/var/log/sc_w3c.log|' \ + -e 's|ScreenLog=1|ScreenLog=0|' \ + -e 's|RealTime=1|RealTime=0|' \ + -e 's|=sc_serv.ban|=${PREFIX}/etc/shoutcast/sc_serv.ban|' \ + -e 's|=sc_serv.rip|=${PREFIX}/etc/shoutcast/sc_serv.rip|' \ + ${WRKSRC}/sc_serv.conf + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sc_serv ${PREFIX}/sbin + ${MKDIR} ${PREFIX}/etc/shoutcast + ${INSTALL_DATA} ${WRKSRC}/sc_serv.conf ${PREFIX}/etc/shoutcast/sc_serv.conf.sample + @[ -f ${PREFIX}/etc/shoutcast/sc_serv.conf ] || \ + ${INSTALL_DATA} ${WRKSRC}/sc_serv.conf ${PREFIX}/etc/shoutcast/sc_serv.conf + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.TXT ${DOCSDIR} +.endif + +post-install: + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + ${BRANDELF} -t Linux ${PREFIX}/sbin/sc_serv + +.include <bsd.port.mk> diff --git a/audio/linux-shoutcast/distinfo b/audio/linux-shoutcast/distinfo new file mode 100644 index 000000000000..0d7f7e605a0c --- /dev/null +++ b/audio/linux-shoutcast/distinfo @@ -0,0 +1,3 @@ +MD5 (shoutcast-1-9-5-linux-glibc6.tar.gz) = 7488e350b16c60aaa4d3f374fbbce90d +SHA256 (shoutcast-1-9-5-linux-glibc6.tar.gz) = a2c158a8708d4828a8e49ddb3f63086b126f872e9dd385bc0de71f1d9d3d9791 +SIZE (shoutcast-1-9-5-linux-glibc6.tar.gz) = 58860 diff --git a/audio/linux-shoutcast/files/shoutcast.sh.in b/audio/linux-shoutcast/files/shoutcast.sh.in new file mode 100644 index 000000000000..eadc86683c1f --- /dev/null +++ b/audio/linux-shoutcast/files/shoutcast.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh +# + +# PROVIDE: shoutcast +# REQUIRE: LOGIN +# BEFORE: +# KEYWORD: shutdown + +. /etc/rc.subr + +name="shoutcast" +rcvar=`set_rcvar` +start_cmd="shoutcast_startcmd" +stop_cmd="shoutcast_stopcmd" + +shoutcast_startcmd () +{ +su shoutcast -c '%%PREFIX%%/sbin/sc_serv %%PREFIX%%/etc/shoutcast/sc_serv.conf & >/dev/null 2>&1' +} + +shoutcast_stopcmd () +{ +killall sc_serv +} + +load_rc_config $name +run_rc_command "$1" diff --git a/audio/linux-shoutcast/pkg-deinstall b/audio/linux-shoutcast/pkg-deinstall new file mode 100644 index 000000000000..21bac56cda91 --- /dev/null +++ b/audio/linux-shoutcast/pkg-deinstall @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +SC_GROUP=shoutcast +SC_USER=shoutcast +SC_SHELL=/bin/sh +SC_HOME=/nonexistent +PW=/usr/sbin/pw + +pw groupdel shoutcast >/dev/null 2>&1 +pw userdel shoutcast >/dev/null 2>&1 + +exit 0 diff --git a/audio/linux-shoutcast/pkg-descr b/audio/linux-shoutcast/pkg-descr new file mode 100644 index 000000000000..d6265351e7c5 --- /dev/null +++ b/audio/linux-shoutcast/pkg-descr @@ -0,0 +1,5 @@ +Shoutcast is Nullsoft's Winamp-based streaming audio server. It isn't +an open source software, but freely available for i386 versions of +FreeBSD 4.X/5.X and Linux. This port installs the Linux binary. + +WWW: http://www.shoutcast.com diff --git a/audio/linux-shoutcast/pkg-install b/audio/linux-shoutcast/pkg-install new file mode 100644 index 000000000000..bb97ac95dde2 --- /dev/null +++ b/audio/linux-shoutcast/pkg-install @@ -0,0 +1,50 @@ +#!/bin/sh + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +SC_GROUP=shoutcast +SC_USER=shoutcast +SC_SHELL=/bin/sh +SC_HOME=/nonexistent +PW=/usr/sbin/pw + +if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then + gid=210 + while ${PW} show group -g ${gid} -q >/dev/null; do + gid=`expr ${gid} + 1` + done + if ! ${PW} add group ${SC_GROUP} -g ${gid}; then + e=$? + echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually." + exit ${e} + fi + echo "*** Added group \`${SC_GROUP}' (id ${gid})" +else + gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3` +fi + +if ! ${PW} show user ${SC_USER} -q >/dev/null; then + uid=210 + while ${PW} show user -u ${uid} -q >/dev/null; do + uid=`expr ${uid} + 1` + done + if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \ + -c "Shoutcast sandbox" -s "${SC_SHELL}" -p "*" \ + ; then + e=$? + echo "*** Failed to add user \`${SC_USER}'. Please add it manually." + exit ${e} + fi + echo "*** Added user \`${SC_USER}' (id ${uid})" +else + if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \ + -c "Shoutcast sandbox" -s "${SC_SHELL}" -p "*" \ + ; then + e=$? + echo "*** Failed to update user \`${SC_USER}'." + exit ${e} + fi + echo "*** Updated user \`${SC_USER}'." +fi diff --git a/audio/linux-shoutcast/pkg-plist b/audio/linux-shoutcast/pkg-plist new file mode 100644 index 000000000000..ae9ece2dc583 --- /dev/null +++ b/audio/linux-shoutcast/pkg-plist @@ -0,0 +1,4 @@ +sbin/sc_serv +@unexec if cmp -s %%PREFIX%%/etc/shoutcast/sc_serv.conf %%PREFIX%%/etc/shoutcast/sc_serv.conf.sample; then rm %%PREFIX%%/etc/shoutcast/sc_serv.conf; fi +etc/shoutcast/sc_serv.conf.sample +@dirrmtry etc/shoutcast |