summaryrefslogtreecommitdiff
path: root/net-firewall/iptables-snmp/iptables-snmp-0.1.ebuild
blob: eb1f8bb6a2047cb2178666a1ab2109141ba6a817 (plain) (blame)
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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit toolchain-funcs

DESCRIPTION="SNMP agent for linux iptables"
HOMEPAGE="http://www.nobiscuit.com/iptables-snmp"
SRC_URI="http://www.nobiscuit.com/iptables-snmp/${P}.tar.gz"

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

REQUIRED_USE="kernel_linux"

DEPEND="net-firewall/iptables
	net-analyzer/net-snmp"
RDEPEND="${DEPEND}"

src_prepare() {
	default

	tc-export CC
}

src_compile() {
	emake V=1 VERSION="${PVR}"
}

src_install() {
	emake install-lib V=1 \
		DESTDIR="${ED}" LIBDIR="/usr/$(get_libdir)"

	insinto /usr/share/snmp/mibs
	newins mibs/IPTABLES.MIB IPTABLES.txt
	newins mibs/STAMFEST.MIB STAMFEST.txt

	dodoc README
}

pkg_postinst() {
	elog
	elog "You can now enable ${PN} by adding"
	elog "	dlmod iptables ${EPREFIX}/usr/$(get_libdir)/${PN}.so"
	elog "To ${EPREFIX}/etc/snmp/snmpd.conf"
	elog
}