mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
101 lines
3.4 KiB
Tcl
101 lines
3.4 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup perl5 1.0
|
|
|
|
name snmptt
|
|
version 1.5
|
|
revision 0
|
|
categories net
|
|
license GPL-2+
|
|
maintainers nomaintainer
|
|
description An SNMP trap handler written in Perl for use \
|
|
with the Net-SNMP / UCD-SNMP snmptrapd program
|
|
long_description ${description}
|
|
|
|
supported_archs noarch
|
|
platforms any
|
|
homepage http://www.snmptt.org/
|
|
master_sites sourceforge:snmptt
|
|
extract.suffix .tgz
|
|
distname ${name}_${version}
|
|
|
|
checksums rmd160 bbc8a30732f52d02d9c49d94892b9178706a8ff5 \
|
|
sha256 91fb6146a08c0d143e4193f1fffdb697f769f75666d72a73eeb78c013b8a227f \
|
|
size 633591
|
|
|
|
perl5.branches 5.34
|
|
depends_lib port:perl${perl5.major} \
|
|
port:p${perl5.major}-config-inifiles
|
|
|
|
use_configure no
|
|
build {}
|
|
|
|
set bindir ${prefix}/sbin
|
|
set docsdir ${prefix}/share/doc/${name}
|
|
set etcdir ${prefix}/etc/${name}
|
|
set scriptdir ${prefix}/share/${name}
|
|
|
|
post-patch {
|
|
reinplace "s|/usr/bin/perl|${perl5.bin}|g" \
|
|
${worksrcpath}/snmptt \
|
|
${worksrcpath}/snmptt-net-snmp-test \
|
|
${worksrcpath}/snmpttconvert \
|
|
${worksrcpath}/snmpttconvertmib \
|
|
${worksrcpath}/snmptthandler
|
|
|
|
reinplace "s|/etc/snmp/snmptt.ini|${prefix}/etc/${name}/snmptt.ini|g" \
|
|
${worksrcpath}/snmptt \
|
|
${worksrcpath}/snmptthandler
|
|
|
|
reinplace "s|/etc/snmp/snmptt.conf|${prefix}/etc/snmptt.conf|g" \
|
|
${worksrcpath}/snmptt.ini
|
|
}
|
|
|
|
destroot {
|
|
xinstall -m 755 -d ${destroot}${bindir}
|
|
xinstall -m 755 -d ${destroot}${docsdir}/docs
|
|
xinstall -m 755 -d ${destroot}${scriptdir}
|
|
xinstall -m 755 -d ${destroot}${etcdir}
|
|
|
|
xinstall -m 755 -W ${worksrcpath} snmptt snmptt-net-snmp-test snmpttconvert \
|
|
snmpttconvertmib snmptthandler ${destroot}${bindir}
|
|
|
|
xinstall -m 755 -W ${worksrcpath}/docs faqs.html index.html layout1.css \
|
|
snmptt.html snmpttconvert.html snmpttconvertmib.html ${destroot}${docsdir}/docs
|
|
|
|
xinstall -m 755 -W ${worksrcpath} ChangeLog INSTALL README ${destroot}${docsdir}
|
|
|
|
xinstall -m 644 {*}[glob ${worksrcpath}/sample-*] ${destroot}${docsdir}
|
|
xinstall -m 644 {*}[glob ${worksrcpath}/examples/*-trap.*] ${destroot}${docsdir}
|
|
|
|
xinstall -m 644 ${worksrcpath}/snmptt.ini ${destroot}${etcdir}/snmptt.ini.sample
|
|
xinstall -m 644 ${worksrcpath}/examples/snmptt.conf.generic ${destroot}${etcdir}
|
|
xinstall -m 755 ${worksrcpath}/snmptt-init.d ${destroot}${docsdir}
|
|
}
|
|
|
|
post-activate {
|
|
ui_msg "\n
|
|
|
|
snmptt setup:
|
|
|
|
-Rename the ${prefix}/etc/${name}/snmptt.ini.sample file to remove the trailing
|
|
\"sample\" so snmptt will be able to find its configuration, and customize the
|
|
file as necessary.
|
|
|
|
-Use snmpttconvertmib to build an ${prefix}/etc/snmptt.conf file with translations from
|
|
MIB files for your devices as described in the documentation.
|
|
|
|
|
|
snmptrapd setup:
|
|
|
|
-Edit your snmptrapd.conf (you may use the snmpconf utility) and make sure that
|
|
these items are present.
|
|
|
|
traphandle default ${perl5.bin} ${prefix}/sbin/snmptt
|
|
|
|
\n"
|
|
}
|
|
|
|
livecheck.regex {/snmptt/snmptt_([0-9.]+)/}
|