| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snmptt/snmptt-1.2.ebuild,v 1.3 2008/03/28 18:27:37 hollow Exp $
|
| 4 |
|
| 5 |
MY_P="${P/-/_}"
|
| 6 |
|
| 7 |
DESCRIPTION="SNMP Trap Translator"
|
| 8 |
SRC_URI="mirror://sourceforge/snmptt/${MY_P}.tgz"
|
| 9 |
HOMEPAGE="http://www.snmptt.org/"
|
| 10 |
|
| 11 |
LICENSE="GPL-2"
|
| 12 |
|
| 13 |
KEYWORDS="~amd64 ~ppc x86"
|
| 14 |
SLOT="0"
|
| 15 |
IUSE="mysql postgres"
|
| 16 |
|
| 17 |
S="${WORKDIR}/${MY_P}"
|
| 18 |
|
| 19 |
RDEPEND=">=dev-lang/perl-5.6.1
|
| 20 |
dev-perl/Config-IniFiles
|
| 21 |
>=net-analyzer/net-snmp-5.1
|
| 22 |
mysql? ( dev-perl/DBD-mysql )
|
| 23 |
postgres? ( dev-perl/DBD-Pg )"
|
| 24 |
|
| 25 |
src_unpack() {
|
| 26 |
unpack ${A}
|
| 27 |
cd "${S}"
|
| 28 |
|
| 29 |
# bug 105354, daemonize this thing
|
| 30 |
sed -i -e "s:mode = standalone:mode = daemon:g" snmptt.ini || die
|
| 31 |
|
| 32 |
echo "traphandle default /usr/sbin/snmptt" >examples/snmptrapd.conf.sample
|
| 33 |
}
|
| 34 |
|
| 35 |
src_install() {
|
| 36 |
into /usr
|
| 37 |
dosbin snmptt
|
| 38 |
dosbin snmptthandler
|
| 39 |
dosbin snmptt-net-snmp-test
|
| 40 |
dosbin snmpttconvert
|
| 41 |
dosbin snmpttconvertmib
|
| 42 |
|
| 43 |
insinto /etc/snmp
|
| 44 |
doins snmptt.ini
|
| 45 |
doins examples/snmptt.conf.generic
|
| 46 |
cp -pPR ${D}/etc/snmp/snmptt.conf.generic ${D}/etc/snmp/snmptt.conf
|
| 47 |
doins examples/snmptrapd.conf.sample
|
| 48 |
|
| 49 |
dodoc BUGS ChangeLog README sample-trap
|
| 50 |
dohtml docs/faqs.html docs/index.html docs/layout1.css docs/snmptt.html docs/snmpttconvert.html docs/snmpttconvertmib.html
|
| 51 |
|
| 52 |
newinitd "${FILESDIR}"/snmptt.initd snmptt
|
| 53 |
}
|
| 54 |
|
| 55 |
pkg_postinst() {
|
| 56 |
if ( use mysql || use postgres ); then
|
| 57 |
elog "Read the html documentation to configure your database."
|
| 58 |
fi
|
| 59 |
elog "Please configure /etc/snmp/snmptt.conf before running."
|
| 60 |
}
|