initial import
authorChristian Parpart <trapni@gentoo.org>
Thu, 7 Oct 2004 10:04:49 +0000 (10:04 +0000)
committerChristian Parpart <trapni@gentoo.org>
Thu, 7 Oct 2004 10:04:49 +0000 (10:04 +0000)
media-sound/peercast/ChangeLog [new file with mode: 0644]
media-sound/peercast/Manifest [new file with mode: 0644]
media-sound/peercast/files/digest-peercast-0.1210 [new file with mode: 0644]
media-sound/peercast/files/peercast.init [new file with mode: 0644]
media-sound/peercast/metadata.xml [new file with mode: 0644]
media-sound/peercast/peercast-0.1210.ebuild [new file with mode: 0644]

diff --git a/media-sound/peercast/ChangeLog b/media-sound/peercast/ChangeLog
new file mode 100644 (file)
index 0000000..49f38b6
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for media-sound/peercast
+# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/ChangeLog,v 1.1 2004/10/07 10:04:49 trapni Exp $
+
+  07 Oct 2004; Christian Parpart <trapni@gentoo.org> :
+  Initial ebuild submitted and improved via BUG#45501 by
+  Pol <blenderman@tiscali.be>, Andrej Kacian <ticho@gentoo.org>, 
+  and Per Wigren <tuxie@dekadance.se>.
+  I just change/improved a little in init script and ebuild,
+  and adapted ebuild to meet policies.
+
diff --git a/media-sound/peercast/Manifest b/media-sound/peercast/Manifest
new file mode 100644 (file)
index 0000000..b26fb15
--- /dev/null
@@ -0,0 +1,5 @@
+MD5 05ab4d4775083f0930841e415df18ad6 metadata.xml 160
+MD5 278aaa096067cec5778293f69be7e63c ChangeLog 531
+MD5 d472961650b1698c09524e9e3843fb20 peercast-0.1210.ebuild 1433
+MD5 46edc53a482f19af8574b644d6ba02ec files/peercast.init 890
+MD5 669b6d16bf9e97cdf6fe6608e7291791 files/digest-peercast-0.1210 63
diff --git a/media-sound/peercast/files/digest-peercast-0.1210 b/media-sound/peercast/files/digest-peercast-0.1210
new file mode 100644 (file)
index 0000000..16e241b
--- /dev/null
@@ -0,0 +1 @@
+MD5 896a4201a2a2e90e06779654919e1cd4 peercast-linux.tgz 198726
diff --git a/media-sound/peercast/files/peercast.init b/media-sound/peercast/files/peercast.init
new file mode 100644 (file)
index 0000000..005c706
--- /dev/null
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/files/peercast.init,v 1.1 2004/10/07 10:04:49 trapni Exp $
+
+depend() {
+       need net
+}
+
+host_ia32_aware() {
+       case "$(uname -m)" in
+               i?86)
+                       return 0;
+                       ;;
+               x86_64)
+                       return $(test $(cat /proc/sys/abi/vsyscall32 2>/dev/null) -eq 1);
+                       ;;
+               *)
+                       return 1;
+                       ;;
+       esac
+}
+
+start() {
+       ebegin "Starting peercast"
+
+       if host_ia32_aware; then
+               start-stop-daemon --start --chuid nobody --make-pidfile --pidfile /opt/peercast/peercast.pid --background --exec /opt/bin/peercast
+               rv=$?
+       else
+               eerror "You must have IA32 Emulation enabled in your kernel!"
+               rv=1
+       fi
+
+       eend $rv
+}
+
+stop() {
+       ebegin "Stopping peercast"
+
+       start-stop-daemon --stop --retry 20 --pidfile /opt/peercast/peercast.pid &>/dev/null
+
+       eend $?
+}
diff --git a/media-sound/peercast/metadata.xml b/media-sound/peercast/metadata.xml
new file mode 100644 (file)
index 0000000..3bf6bcf
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <herd>sound</herd>
+</pkgmetadata>
diff --git a/media-sound/peercast/peercast-0.1210.ebuild b/media-sound/peercast/peercast-0.1210.ebuild
new file mode 100644 (file)
index 0000000..a651c05
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/peercast/peercast-0.1210.ebuild,v 1.1 2004/10/07 10:04:49 trapni Exp $
+
+DESCRIPTION="A client and server for Peercast P2P-radio network"
+HOMEPAGE="http://www.peercast.org"
+SRC_URI="http://www.peercast.org/${PN}-linux.tgz"
+LICENSE="freedist"
+
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+       amd64?  ( app-emulation/emul-linux-x86-baselibs )
+"
+
+S=${WORKDIR}
+
+src_compile() {
+       (
+               echo "#! /bin/sh"
+               echo ""
+               if use amd64 &> /dev/null; then
+                       echo "GCC_VERSION=\$(gcc-config -c)"
+                       echo "export LD_LIBRARY_PATH=/lib32:/emul/linux/x86/usr/lib/gcc-lib/\${GCC_VERSION/gnu-/gnu/}"
+               fi
+               echo "cd /opt/peercast"
+               echo "exec ./peercast \"\$@\""
+       ) > peercast.sh
+}
+
+src_install() {
+       exeinto /opt/peercast
+       doexe peercast
+
+       cp -R html ${D}/opt/peercast/
+
+       into /opt
+       newbin peercast.sh peercast
+
+       exeinto /etc/init.d
+       newexe ${FILESDIR}/peercast.init peercast
+}
+
+pkg_postinst() {
+       einfo
+       einfo
+
+       einfo "Start Peercast with '/etc/init.d/peercast start' and point your"
+       einfo "webbrowser to 'http://localhost:7144' to start using Peercast."
+       einfo
+       einfo "You can also run 'rc-update add peercast default' to make Peercast"
+       einfo "start at boot."
+
+       use amd64 >/dev/null && (
+               einfo
+               einfo "Also make sure you have 'IA32 Emulation' enabled in your kernel!"
+       )
+
+       einfo
+       einfo
+}