summaryrefslogtreecommitdiff
blob: 54a3f860e4dff20e964724bc16a4dcbedd179b7c (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

DESCRIPTION="NETI@Home research project from GATech"
HOMEPAGE="http://www.neti.gatech.edu"
SRC_URI="mirror://sourceforge/neti/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc x86"
IUSE="zlib java"

DEPEND="
	java? ( || ( >=virtual/jdk-1.2 >=virtual/jre-1.2 ) )
	net-libs/libpcap
	sys-libs/zlib
"
RDEPEND="${DEPEND}"

RESTRICT="test"

src_configure() {
	econf $(use_with zlib)
}

src_compile() {
	emake NETILogParse neti

	use java && emake javadir=/usr/share/${PN} classjava.stamp
}

src_install() {
	emake \
		DESTDIR="${D}" \
		install-sbinPROGRAMS \
		install-sysconfDATA \
		install-man \
		install-info

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

		echo cd /usr/share/${PN}\;java -cp /usr/share/${PN} NETIMap > "${WORKDIR}"/NETIMap
		dobin "${WORKDIR}"/NETIMap
	fi

	dodoc README AUTHORS
	newinitd "${FILESDIR}"/neti-init2 neti
}