summaryrefslogtreecommitdiff
blob: dd3cdfb15f10e1718b1bcba50c0842d9ef1a24ea (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-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ippl/ippl-1.4.14-r3.ebuild,v 1.5 2013/01/30 15:30:09 ago Exp $

EAPI="4"

inherit eutils toolchain-funcs user

DESCRIPTION="A daemon which logs TCP/UDP/ICMP packets"
HOMEPAGE="http://pltplp.net/ippl/"
SRC_URI="http://pltplp.net/ippl/archive/${P}.tar.gz"

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

DEPEND="virtual/yacc
	>=sys-devel/flex-2.5.4a-r4"
RDEPEND=""

src_prepare() {
	epatch \
		"${FILESDIR}"/ippl-1.4.14-noportresolve.patch \
		"${FILESDIR}"/ippl-1.4.14-manpage.patch \
		"${FILESDIR}"/ippl-1.4.14-privilege-drop.patch \
		"${FILESDIR}"/ippl-1.4.14-includes.patch
	sed -i Source/Makefile.in \
		-e 's|^LDFLAGS=|&@LDFLAGS@|g' \
		|| die "sed Source/Makefile.in"
	sed -i Makefile.in \
		-e 's|make |$(MAKE) |g' \
		|| die "sed Makefile.in"
	# fix for bug #351287
	sed -i -e '/lex.yy.c/s/ippl.l/& y.tab.c/' Source/Makefile.in \
		|| die "sed src/Makefile.in"
	tc-export CC
}

src_install() {
	dosbin Source/ippl

	insinto "/etc"
	doins ippl.conf

	doman Docs/{ippl.8,ippl.conf.5}

	dodoc BUGS CREDITS HISTORY README TODO

	newinitd "${FILESDIR}"/ippl.rc ippl
}

pkg_postinst() {
	enewuser ippl
}