summaryrefslogtreecommitdiff
blob: b2fbf6110b9302d26159e8278c1d5a57b3e65f7c (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
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/neti/neti-1.01.ebuild,v 1.7 2005/01/29 19:26:00 dragonheart Exp $

DESCRIPTION="NETI@Home research project from GATech"
HOMEPAGE="http://www.neti.gatech.edu"
SRC_URI="mirror://sourceforge/neti/${P}.tar.gz"
KEYWORDS="x86 ~ppc"
LICENSE="GPL-2"
SLOT="0"

IUSE="zlib java"

RDEPEND="java? ( || ( >=virtual/jdk-1.2 >=virtual/jre-1.2 ) )
	virtual/libpcap
	net-analyzer/ethereal
	virtual/libc"

DEPEND="java? ( >=virtual/jdk-1.2 )
	virtual/libpcap
	virtual/libc
	sys-devel/autoconf
	sys-devel/automake
	sys-devel/gcc"

src_compile() {
	econf \
		`use_with zlib` \
		 || die "failed to configure"

	emake NETILogParse neti \
		|| die "failed to make"

	if use java;
	then
		emake javadir=/usr/share/${PN} classjava.stamp
	fi
}

src_install() {
	emake DESTDIR=${D} install-sbinPROGRAMS install-sbinSCRIPTS \
		install-sysconfDATA install-man || die "install failed"

	if use java;
	then
		emake javadir=/usr/share/${PN} \
			 DESTDIR=${D} install-javaJAVA install-javaDATA || die "java install failed"
	fi

	dobin /usr/bin
	echo java -cp /usr/share/${PN} NETIMap > ${D}/usr/bin/NETIMap
	fperms ugo+x /usr/bin/NETIMap
	dodoc COPYING
	exeinto /etc/init.d
	newexe ${FILESDIR}/neti-init neti
}