# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils IUSE="gtk" DESCRIPTION="Frostwire Java Gnutella client" HOMEPAGE="http://www.frostwire.com" SRC_URI="http://www.peercommons.com/frostwire/${PV}/frostwire-${PV}.noarch.tar.gz" LICENSE="GPL-2 Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" DEPEND="app-arch/unzip gtk? ( >=x11-libs/gtk+-2.4 )" RDEPEND="virtual/jre virtual/jdk" S="${WORKDIR}/frostwire-4.13.1.noarch" PREFIX="/opt/frostwire" src_compile() { ( echo \#!/bin/sh echo cd ${PREFIX} echo export J2SE_PREEMPTCLOSE=1 echo java -cp .:jl011.jar:MessagesBundles.jar:themes.jar:FrostWire.jar com.limegroup.gnutella.gui.Main ) >frostwire.gentoo echo PATH=${PREFIX} > frostwire.envd } src_install() { insinto ${PREFIX} doins *.jar *.war *.properties *.ver *.sh hashes exeinto /usr/bin newexe frostwire.gentoo frostwire newenvd frostwire.envd 99frostwire insinto /usr/share/icons/hicolor/32x32/apps newins "${FILESDIR}"/main-icon.png frostwire.png make_desktop_entry frostwire FrostWire } pkg_postinst() { use gtk || ewarn "You will probably not be able to use the gtk frontend." einfo " Finished installing Frostwire into ${PREFIX}" }