# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="" S=${WORKDIR} DESCRIPTION="A client and server for Peercast P2P-radio network" HOMEPAGE="http://www.peercast.org" # as the official peercast download site does *NOT* provide # versioned URLs we must provide a seperated download URL where # we can download this (versioned). #SRC_URI="mirror://gentoo/${PN}-linux-${PV}.tgz" SRC_URI="http://www.peercast.org/${P}-src.tgz" LICENSE="freedist" SLOT="0" KEYWORDS="-* amd64 x86" DEPEND="" RDEPEND="amd64? ( app-emulation/emul-linux-x86-baselibs )" 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 cd ${S}/ui/linux emake } src_install() { cd ${S}/ui/linux exeinto /opt/peercast doexe peercast cd ${S}/ui cp -R html ${D}/opt/peercast/ cd ${S} into /opt newbin peercast.sh peercast exeinto /etc/init.d newexe ${FILESDIR}/peercast.init peercast } pkg_postinst() { 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." }