From 5e201008709228c047f8439bc80e8bdefe29ddc3 Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Thu, 7 Oct 2004 10:04:49 +0000 Subject: [PATCH] initial import --- media-sound/peercast/ChangeLog | 11 ++++ media-sound/peercast/Manifest | 5 ++ .../peercast/files/digest-peercast-0.1210 | 1 + media-sound/peercast/files/peercast.init | 44 +++++++++++++ media-sound/peercast/metadata.xml | 5 ++ media-sound/peercast/peercast-0.1210.ebuild | 64 +++++++++++++++++++ 6 files changed, 130 insertions(+) create mode 100644 media-sound/peercast/ChangeLog create mode 100644 media-sound/peercast/Manifest create mode 100644 media-sound/peercast/files/digest-peercast-0.1210 create mode 100644 media-sound/peercast/files/peercast.init create mode 100644 media-sound/peercast/metadata.xml create mode 100644 media-sound/peercast/peercast-0.1210.ebuild diff --git a/media-sound/peercast/ChangeLog b/media-sound/peercast/ChangeLog new file mode 100644 index 000000000000..49f38b6666e9 --- /dev/null +++ b/media-sound/peercast/ChangeLog @@ -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 : + Initial ebuild submitted and improved via BUG#45501 by + Pol , Andrej Kacian , + and Per Wigren . + 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 index 000000000000..b26fb15254ce --- /dev/null +++ b/media-sound/peercast/Manifest @@ -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 index 000000000000..16e241b7a44f --- /dev/null +++ b/media-sound/peercast/files/digest-peercast-0.1210 @@ -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 index 000000000000..005c706424ee --- /dev/null +++ b/media-sound/peercast/files/peercast.init @@ -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 index 000000000000..3bf6bcfeb512 --- /dev/null +++ b/media-sound/peercast/metadata.xml @@ -0,0 +1,5 @@ + + + + sound + diff --git a/media-sound/peercast/peercast-0.1210.ebuild b/media-sound/peercast/peercast-0.1210.ebuild new file mode 100644 index 000000000000..a651c053c300 --- /dev/null +++ b/media-sound/peercast/peercast-0.1210.ebuild @@ -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 +} -- 2.26.2