summaryrefslogtreecommitdiff
path: root/net-analyzer/ipcad/ipcad-3.7.3.ebuild
blob: 9cc3e9072ec48ec4867e1ca69061fafd37f7074e (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-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="IP Cisco Accounting Daemon"
HOMEPAGE="https://sourceforge.net/projects/ipcad/ http://lionet.info/ipcad/"
SRC_URI="https://downloads.sourceforge.net/ipcad/${P}.tar.gz"

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

RDEPEND="
	net-libs/libpcap
	net-firewall/iptables
"
DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}"/${PN}-3.7-linux-2.6.27.patch
	"${FILESDIR}"/${PN}-3.7-linux-2.6.35.patch
	"${FILESDIR}"/${P}-signal_h.patch
)

src_prepare() {
	default

	sed -i \
		-e "s|^chroot = /adm/tmp;|chroot = /var/ipcad;|" \
		-e "s|^interface|#&|" \
		-e "s|^aggregate|#&|" \
		-e "s|^pidfile = ipcad.pid;|pidfile = /run/ipcad.pid;|" \
		ipcad.conf.default || die

	eautoreconf
}

src_install() {
	dodoc AUTHORS ChangeLog README BUGS FAQ ipcad.conf.simple ipcad.conf.default

	dosbin ipcad

	insinto /etc
	insopts -m0600
	newins ipcad.conf.default ipcad.conf

	keepdir /var/ipcad/run

	doman ipcad.8 ipcad.conf.5

	newinitd "${FILESDIR}"/ipcad.init ipcad
	newconfd "${FILESDIR}"/ipcad.conf.d ipcad
}