blob: 075a33df823178a9c370f597bbf1b16e9b232ed2 (
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
57
58
59
60
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="SNMP Trap Translator"
SRC_URI="https://downloads.sourceforge.net/snmptt/${P/-/_}.tgz"
HOMEPAGE="http://www.snmptt.org/"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc x86"
SLOT="0"
S="${WORKDIR}/${P/-/_}"
RDEPEND="
dev-lang/perl
dev-perl/Config-IniFiles
net-analyzer/net-snmp
"
src_prepare() {
default
# bug 105354, daemonize by default
sed -i \
-e 's:mode = standalone:mode = daemon:g' \
-e '/pid_file/s:/var/run:/run:g' \
snmptt.ini || die
echo "traphandle default /usr/sbin/snmptt" > examples/snmptrapd.conf.sample || die
}
src_install() {
into /usr
dosbin \
snmptt \
snmptt-net-snmp-test \
snmpttconvert \
snmpttconvertmib \
snmptthandler \
snmptthandler-embedded
insinto /etc/snmp
doins \
examples/snmptrapd.conf.sample \
examples/snmptt.conf.generic \
snmptt.ini
newins examples/snmptt.conf.generic snmptt.conf
dodoc ChangeLog README sample-trap
docinto html
dodoc docs/*
newinitd "${FILESDIR}"/snmptt.initd-r1 snmptt
insinto /etc/logrotate.d
newins snmptt.logrotate snmptt
}
|