# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PN="P2P-Radio" MAJ_PV=${PV:0:3} MIN_PVE=${PV:4:9} MIN_PV=${MIN_PVE/b/B} MY_P="${MY_PN}-${MAJ_PV}-${MIN_PV}" DESCRIPTION="P2P-Radio can distribute audio and video streams over the Internet in a peer-to-peer manner." HOMEPAGE="http://p2p-radio.sourceforge.net/" SRC_URI="mirror://sourceforge/${MY_P}-src.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=virtual/jdk-1.3" RDEPEND=">=virtual/jre-1.3" S=${WORKDIR}/p2pradio src_unpack() { unpack ${A} cd ${S}/gui # subtitute german umlauts in methodnames sed -i 's:\xe4:a:g' MainFrame.java } src_compile() { cd ${S} find . -name \*.java > ${T}/files javac -d ${T} @${T}/files cd ${T} cp ${S}/p2pradio*properties ./p2pradio/ jar cvfm ${WORKDIR}/${PN}.jar ${WORKDIR}/p2pradio/Manifest.txt p2pradio } src_install() { cd ${WORKDIR} insinto /opt/${PN}/lib doins ${PN}.jar echo "#!/bin/sh" > ${PN} echo "cd /opt/${PN}" >> ${PN} echo '${JAVA_HOME}'/bin/java -jar lib/${PN}.jar '$*' >> ${PN} into /opt dobin ${PN} }