diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-07-22 15:38:18 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-07-22 15:38:18 +0000 |
commit | 1181181ada342cabe8dffabfa8bea46025623079 (patch) | |
tree | f7ea47a7c1dae97230b5fb8a6d3536b2eef1e5ad /media-sound/shoutcast-server-bin | |
parent | Fixed parallel make issue, bug #253611. (diff) | |
download | gentoo-2-1181181ada342cabe8dffabfa8bea46025623079.tar.gz gentoo-2-1181181ada342cabe8dffabfa8bea46025623079.tar.bz2 gentoo-2-1181181ada342cabe8dffabfa8bea46025623079.zip |
Don't run as root wrt #165331.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/shoutcast-server-bin')
4 files changed, 150 insertions, 7 deletions
diff --git a/media-sound/shoutcast-server-bin/ChangeLog b/media-sound/shoutcast-server-bin/ChangeLog index fd9b6f6b8cbe..771666e5b302 100644 --- a/media-sound/shoutcast-server-bin/ChangeLog +++ b/media-sound/shoutcast-server-bin/ChangeLog @@ -1,14 +1,13 @@ # ChangeLog for media-sound/shoutcast-server-bin # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/shoutcast-server-bin/ChangeLog,v 1.22 2009/05/12 11:23:50 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/shoutcast-server-bin/ChangeLog,v 1.23 2009/07/22 15:38:18 ssuominen Exp $ - 12 May 2009; Samuli Suominen <ssuominen@gentoo.org> - shoutcast-server-bin-1.9.8.ebuild: - Fix SRC_URI wrt #250223, thanks to Thomas Beierlein. +*shoutcast-server-bin-1.9.8-r1 (22 Jul 2009) - 02 Jul 2007; Piotr Jaroszyński <peper@gentoo.org> - shoutcast-server-bin-1.9.7.ebuild, shoutcast-server-bin-1.9.8.ebuild: - (QA) RESTRICT clean up. + 22 Jul 2009; Samuli Suominen <ssuominen@gentoo.org> + +files/1.9.8-sc_serv.conf.patch, +shoutcast-server-bin-1.9.8-r1.ebuild, + +files/shoutcast.2: + Don't run as root wrt #165331. 19 Apr 2007; Christian Faulhammer <opfer@gentoo.org> shoutcast-server-bin-1.9.8.ebuild: diff --git a/media-sound/shoutcast-server-bin/files/1.9.8-sc_serv.conf.patch b/media-sound/shoutcast-server-bin/files/1.9.8-sc_serv.conf.patch new file mode 100644 index 000000000000..09bf6af7980d --- /dev/null +++ b/media-sound/shoutcast-server-bin/files/1.9.8-sc_serv.conf.patch @@ -0,0 +1,44 @@ +--- sc_serv.conf.orig 2007-02-28 21:35:24.000000000 +0200 ++++ sc_serv.conf 2009-07-22 17:42:45.000000000 +0300 +@@ -50,17 +50,17 @@ + ; Note: on win32 systems if no path is specified the location is
+ ; in the same dir as the executable, on *nix systems it is in the
+ ; current directory.
+-LogFile=sc_serv.log
++LogFile=/dev/null
+
+ ; RealTime displays a status line that is updated every second
+ ; with the latest information on the current stream (*nix and win32
+ ; console systems only)
+-RealTime=1
++RealTime=0
+
+ ; ScreenLog controls whether logging is printed to the screen or not
+ ; on *nix and win32 console systems. It is useful to disable this when
+ ; running servers in background without their own terminals. Default is 1
+-ScreenLog=1
++ScreenLog=0
+
+ ; ShowLastSongs specifies how many songs to list in the /played.html
+ ; page. The default is 10. Acceptable entries are 1 to 20.
+@@ -91,7 +91,7 @@ +
+ ; W3CLog describes the name of the logfile for W3C logging. Default logfile is
+ ; sc_w3c.log, in the same directory wherever the DNAS gets started from.
+-W3CLog=sc_w3c.log
++W3CLog=/dev/null
+
+
+ ; ***************************
+@@ -153,9 +153,9 @@ +
+ ; ContentDir specifies the directory location on disk of where to stream
+ ; on-demand content from. Subdirectories are supported as of DNAS 1.8.2.
+-; Default is ./content, meaning a directory named content in the same directory
++; Default is ./content/, meaning a directory named content in the same directory
+ ; as where sc_serv was invoked from.
+-; ContentDir=./content
++ContentDir=/opt/shoutcast/content/
+
+ ; IntroFile can specify a mp3 file that will be streamed to listeners right
+ ; when they connect before they hear the live stream.
diff --git a/media-sound/shoutcast-server-bin/files/shoutcast.2 b/media-sound/shoutcast-server-bin/files/shoutcast.2 new file mode 100644 index 000000000000..bd8e07b94bd9 --- /dev/null +++ b/media-sound/shoutcast-server-bin/files/shoutcast.2 @@ -0,0 +1,30 @@ +#!/sbin/runscript + +depend() { + need localmount +} + +checkconfig() { + if ! [ -f /etc/shoutcast/sc_serv.conf ]; then + eerror "Can't find /etc/shoutcast/sc_serv.conf!" + return 1 + fi + + return 0 +} + +start() { + checkconfig || return 1 + + ebegin "Starting SHOUTcast" + start-stop-daemon --background --start --quiet --user shoutcast \ + --group nogroup --make-pidfile --pidfile /var/run/sc_serv.pid \ + --exec /opt/bin/sc_serv /etc/shoutcast/sc_serv.conf + eend $? +} + +stop() { + ebegin "Stopping SHOUTcast" + start-stop-daemon --stop --pidfile /var/run/sc_serv.pid --name sc_serv + eend $? +} diff --git a/media-sound/shoutcast-server-bin/shoutcast-server-bin-1.9.8-r1.ebuild b/media-sound/shoutcast-server-bin/shoutcast-server-bin-1.9.8-r1.ebuild new file mode 100644 index 000000000000..4690d90e3fa9 --- /dev/null +++ b/media-sound/shoutcast-server-bin/shoutcast-server-bin-1.9.8-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/shoutcast-server-bin/shoutcast-server-bin-1.9.8-r1.ebuild,v 1.1 2009/07/22 15:38:18 ssuominen Exp $ + +EAPI=2 +inherit eutils + +DESCRIPTION="SHOUTcast is a streaming audio system" +HOMEPAGE="http://www.shoutcast.com/license" +SRC_URI="sc_serv_${PV}_Linux.tar.gz" + +LICENSE="shoutcast" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="" + +RDEPEND="" +DEPEND="" + +QA_PRESTRIPPED=/opt/bin/sc_serv + +RESTRICT="fetch" + +S=${WORKDIR} + +pkg_nofetch() { + elog "Download ${A} from ${HOMEPAGE} and copy it to ${DISTDIR}." +} + +pkg_setup() { + enewuser shoutcast -1 -1 -1 nogroup +} + +src_prepare() { + epatch "${FILESDIR}"/${PV}-sc_serv.conf.patch +} + +src_install() { + into /opt + dobin sc_serv || die "dobin failed" + + newinitd "${FILESDIR}"/shoutcast.2 shoutcast || die "newinitd failed" + dodir /opt/shoutcast/content + + insinto /etc/shoutcast + doins sc_serv.conf || die "doins failed" + + dodoc README.TXT + + fowners -R shoutcast:nogroup /{etc,opt}/shoutcast || die "chown failed" + fperms -R 700 /{etc,opt}/shoutcast || die "chmod failed" +} + +pkg_postinst() { + elog + elog "To start shoutcast, use the init.d script by running" + elog "/etc/init.d/shoutcast." + elog + elog "On demand content should be stored in /opt/shoutcast/content" + elog "See http://forums.winamp.com/showthread.php?threadid=75736 for" + elog "more information on setting up on demand content" + elog + elog "FAQ's can be found at:" + elog "http://forums.winamp.com/showthread.php?threadid=75736 " + elog "and can help you with server setup." + elog + elog "An Gentoo Linux shoutcast guide can be found at " + elog "http://www.gentoo.org/doc/en/shoutcast-config.xml" + elog +} |