aboutsummaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-09-26 20:28:52 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2015-09-26 20:28:52 +0300
commitc62da081f3dca12030a32fc10eb240c45d08f8f3 (patch)
treec30ce230e8806a8cebc0fe245ddbe39065ca7e9c /Makefile.PL
parent40468ec97480e350dc47e6db44b87ccce35ac67b (diff)
downloadnetsnmp-sendmail-c62da081f3dca12030a32fc10eb240c45d08f8f3.tar.gz
netsnmp-sendmail-c62da081f3dca12030a32fc10eb240c45d08f8f3.tar.bz2
Rewrite using mib2c
* .gitignore: Update. * MANIFEST: Update. * Makefile.PL: Build Sendmail.pm * NetSNMP/Sendmail.pm: Remove. * Sendmail.mib2c: New file. * sendmail.pl: New file.
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 3a5e151..1cc23a6 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -22,24 +22,31 @@ WriteMakefile(
'ABSTRACT' => 'NetSNMP module for Sendmail statistics',
'LICENSE' => 'gpl_v3',
'FIRST_MAKEFILE' => 'Makefile',
- 'VERSION_FROM' => 'NetSNMP/Sendmail.pm',
+ 'VERSION_FROM' => 'sendmail.pl',
'PM' => {
- 'NetSNMP/Sendmail.pm' => '$(INST_LIBDIR)/Sendmail.pm'
+ 'Sendmail.pm' => '$(INST_LIBDIR)/Sendmail.pm'
},
'PREREQ_PM' => { 'NetSNMP::OID' => 0,
'NetSNMP::agent' => 0,
- 'NetSNMP::ASN' => 0 },
+ 'NetSNMP::ASN' => 0 }
);
sub MY::postamble {
return <<'_MAKE_';
+NET_SNMP_MIBDIRS = `net-snmp-config --mibdirs`
+
+Sendmail.pm: Sendmail.mib2c sendmail.pl SENDMAIL-STATS.txt
+ MIBDIRS=.:${NET_SNMP_MIBDIRS} \
+ MIBS="+SENDMAIL-STATS" \
+ mib2c -c Sendmail.mib2c -f Sendmail.pm -S prologue=sendmail.pl SENDMAIL-STATS::sendmail
+
INSTALLSITEMIB = $(SITEPREFIX)/share/snmp/mibs
DESTINSTALLSITEMIB = $(DESTDIR)$(INSTALLSITEMIB)
install:: install-mib
install-mib:
- $(PERLRUN) install-mib.pl SENDMAIL-STATS.txt $(DESTINSTALLSITEMIB)
+ $(PERLRUN) install-mib.pl SENDMAIL-STATS.txt $(DESTINSTALLSITEMIB)
_MAKE_
}

Return to:

Send suggestions and report system problems to the System administrator.