summaryrefslogtreecommitdiff
blob: e1fbfab414a9a4a28870f3a7e274fa7e77e9984c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-p2p/g2gui/g2gui-0.3.0_pre1.ebuild,v 1.3 2004/06/18 19:59:50 dholm Exp $

MY_P=${P/_/-}-linux-jar-gtk
S=${WORKDIR}/${MY_P}

DESCRIPTION="The 2nd generation gui for the universal p2p-client mldonkey"
HOMEPAGE="http://developer.berlios.de/projects/mldonkey/"
SRC_URI="http://download.berlios.de/mldonkey/${MY_P}.tar.bz2"
LICENSE="GPL-2 CPL-1.0"
KEYWORDS="~x86 ~ppc"
IUSE=""
SLOT="0"
DEPEND=">=sys-apps/sed-4"
RDEPEND="virtual/jdk"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -i -e 's:cd $(dirname $0):cd /usr/share/g2gui:g' g2gui
}

src_compile() {
	if [ -z "$JAVA_HOME" ]; then
		einfo
		einfo "\$JAVA_HOME not set!"
		einfo "Please use java-config to configure your JVM and try again."
		einfo
		die "\$JAVA_HOME not set."
	fi
}

src_install () {
	dodir /usr/share/g2gui
	dodir /usr/bin
	cd ${WORKDIR}/${P/_/-}-linux-jar-gtk
	cp -R g2gui distrib g2submit lib ${D}/usr/share/g2gui
	cd ${D}/usr/share/g2gui
	chmod -R u+rw,ug-s,go+u,go-w distrib g2submit lib
	chmod 755 ${D}/usr/share/g2gui/g2gui
	dosym ${D}/usr/share/g2gui/g2gui /usr/bin/g2gui
}