summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-05-22 00:56:14 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-05-22 00:56:14 +0000
commit28665908102745d54e2168d5f7ebfa0397c42e9c (patch)
tree20e5f3882127b8559ea49f2755b12a3df3583863 /media-sound/peercast
parentDrop old (diff)
downloadgentoo-2-28665908102745d54e2168d5f7ebfa0397c42e9c.tar.gz
gentoo-2-28665908102745d54e2168d5f7ebfa0397c42e9c.tar.bz2
gentoo-2-28665908102745d54e2168d5f7ebfa0397c42e9c.zip
New init.d file wrt #133595, thanks to Tomoaki Yamasaki.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/peercast')
-rw-r--r--media-sound/peercast/ChangeLog8
-rwxr-xr-xmedia-sound/peercast/files/peercast.initd28
-rw-r--r--media-sound/peercast/peercast-0.1218-r2.ebuild52
3 files changed, 87 insertions, 1 deletions
diff --git a/media-sound/peercast/ChangeLog b/media-sound/peercast/ChangeLog
index 3c495a3b016c..4396cc8f1a61 100644
--- a/media-sound/peercast/ChangeLog
+++ b/media-sound/peercast/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/peercast
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/ChangeLog,v 1.20 2009/05/08 15:38:32 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/ChangeLog,v 1.21 2009/05/22 00:56:13 ssuominen Exp $
+
+*peercast-0.1218-r2 (22 May 2009)
+
+ 22 May 2009; Samuli Suominen <ssuominen@gentoo.org>
+ +peercast-0.1218-r2.ebuild, +files/peercast.initd:
+ New init.d file wrt #133595, thanks to Tomoaki Yamasaki.
08 May 2009; Samuli Suominen <ssuominen@gentoo.org>
peercast-0.1218-r1.ebuild:
diff --git a/media-sound/peercast/files/peercast.initd b/media-sound/peercast/files/peercast.initd
new file mode 100755
index 000000000000..636e2c0dfe78
--- /dev/null
+++ b/media-sound/peercast/files/peercast.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/files/peercast.initd,v 1.1 2009/05/22 00:56:14 ssuominen Exp $
+
+pidfile=/var/run/peercast.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting peercast daemon"
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile ${pidfile} \
+ --chuid nobody:audio \
+ --exec /usr/sbin/peercast -- \
+ -i /usr/share/peercast/peercast.ini \
+ -l /var/log/peercast.log \
+ -P /usr/share/peercast
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping peercast daemon"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ eend $?
+}
diff --git a/media-sound/peercast/peercast-0.1218-r2.ebuild b/media-sound/peercast/peercast-0.1218-r2.ebuild
new file mode 100644
index 000000000000..2455428004e4
--- /dev/null
+++ b/media-sound/peercast/peercast-0.1218-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/peercast-0.1218-r2.ebuild,v 1.1 2009/05/22 00:56:13 ssuominen Exp $
+
+EAPI=2
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A client and server for Peercast P2P-radio network"
+HOMEPAGE="http://www.peercast.org"
+SRC_URI="http://www.peercast.org/src/${P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2008-2040.patch \
+ "${FILESDIR}"/${PN}-0.1216-makefile.patch \
+ "${FILESDIR}"/${PN}-0.1216-amd64.patch
+}
+
+src_compile() {
+ append-ldflags -pthread
+
+ cd ui/linux
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" LDFLAGS="${LDFLAGS}" \
+ LD="$(tc-getCXX)" || die "emake failed"
+}
+
+src_install() {
+ dosbin ui/linux/peercast
+
+ insinto /usr/share/peercast
+ doins -r ui/html
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+}
+
+pkg_postinst() {
+ elog "Start Peercast with '/etc/init.d/peercast start' and point your"
+ elog "webbrowser to 'http://localhost:7144' to start using Peercast."
+ elog
+ elog "You can also run 'rc-update add peercast default' to make Peercast"
+ elog "start at boot."
+}