summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrstuden <wrstuden@pkgsrc.org>2001-01-30 22:03:38 +0000
committerwrstuden <wrstuden@pkgsrc.org>2001-01-30 22:03:38 +0000
commit302a9a2a433ea7b6652e2934cb320eb441d6c79a (patch)
tree011973d499c0c8c45e2817cb24627f33ac4e6c06
parent8bb4b32ca20a99304263e549b6658a82fb356a65 (diff)
downloadpkgsrc-302a9a2a433ea7b6652e2934cb320eb441d6c79a.tar.gz
Update to version 3.1.0.
Also added support for regression testing. make test in package directory will run test suite. snmpd and snmptrapd need to already running, and t/startagent.pl needs to have correct values for SNMP v1 access.
-rw-r--r--net/p5-SNMP/Makefile21
-rw-r--r--net/p5-SNMP/files/md54
-rw-r--r--net/p5-SNMP/files/patch-sum6
-rw-r--r--net/p5-SNMP/patches/patch-aa67
-rw-r--r--net/p5-SNMP/patches/patch-ab16
-rw-r--r--net/p5-SNMP/patches/patch-ac20
-rw-r--r--net/p5-SNMP/pkg/COMMENT2
-rw-r--r--net/p5-SNMP/pkg/PLIST11
8 files changed, 101 insertions, 46 deletions
diff --git a/net/p5-SNMP/Makefile b/net/p5-SNMP/Makefile
index eb8caa75fa4..6100b549c85 100644
--- a/net/p5-SNMP/Makefile
+++ b/net/p5-SNMP/Makefile
@@ -1,27 +1,38 @@
-# $NetBSD: Makefile,v 1.7 2000/08/29 20:48:14 jlam Exp $
+# $NetBSD: Makefile,v 1.8 2001/01/30 22:03:38 wrstuden Exp $
# FreeBSD Id: Makefile,v 1.1.1.1 1997/06/27 01:53:13 jfitz Exp
#
-DISTNAME= SNMP-1.7
-PKGNAME= p5-SNMP-1.7
+DISTNAME= SNMP-3.1.0
+PKGNAME= p5-SNMP-3.1.0
CATEGORIES= net perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=SNMP/}
MAINTAINER= packages@netbsd.org
-DEPENDS= ucd-snmp>=4.0.1:../../net/ucd-snmp
+DEPENDS= ucd-snmp>=4.1.0:../../net/ucd-snmp
USE_PERL5= # defined
PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/SNMP/.packlist
# Until the source catches up to the current Perl API, we need PERL_POLLUTE
# to look like an older perl.
-MAKE_PARAMS= DEFINE="-DPERL_POLLUTE=1"
+#MAKE_PARAMS= DEFINE="-DPERL_POLLUTE=1"
+
+PLFILES= async1.pl async2.pl ipforward.pl mibtree.pl mibwalk.pl
+PLFILES+= pingmib.pl tablewalk.pl testleak.pl
do-configure:
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} Makefile.PL ${MAKE_PARAMS}
+post-build:
+ @for i in ${PLFILES} ; do ${ECHO} "#! ${PREFIX}/bin/perl" | ${CAT} - ${WRKSRC}/examples/$$i > ${WRKDIR}/$$i ; done
+
post-install:
@${INSTALL_DATA} ${WRKSRC}/README ${PERL5_SITELIB}/README.SNMP
+ @${MKDIR} ${PREFIX}/share/examples/p5-SNMP
+ @for i in ${PLFILES} ; do ${INSTALL_SCRIPT} ${WRKDIR}/$$i ${PREFIX}/share/examples/p5-SNMP/$$i ; done
+
+test:
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} test
.include "../../mk/bsd.pkg.mk"
diff --git a/net/p5-SNMP/files/md5 b/net/p5-SNMP/files/md5
index ddd1124a6bd..e9af2ad7c8a 100644
--- a/net/p5-SNMP/files/md5
+++ b/net/p5-SNMP/files/md5
@@ -1,3 +1,3 @@
-$NetBSD: md5,v 1.2 1998/08/07 13:25:11 agc Exp $
+$NetBSD: md5,v 1.3 2001/01/30 22:03:39 wrstuden Exp $
-MD5 (SNMP-1.7.tar.gz) = 430af6d8ff8ceaad2dfc35f6e0dcfd0a
+MD5 (SNMP-3.1.0.tar.gz) = 21dc57fbf812b2b105412f584e2c2463
diff --git a/net/p5-SNMP/files/patch-sum b/net/p5-SNMP/files/patch-sum
index 1e1ffc840cf..b1a9a021049 100644
--- a/net/p5-SNMP/files/patch-sum
+++ b/net/p5-SNMP/files/patch-sum
@@ -1,3 +1,5 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 14:12:26 agc Exp $
+$NetBSD: patch-sum,v 1.2 2001/01/30 22:03:39 wrstuden Exp $
-MD5 (patch-aa) = 36edb9af9dfbd05fb0b82084d1a83bfd
+MD5 (patch-aa) = 30e86db994132e71af3d90c014795097
+MD5 (patch-ab) = 46ee3d5608d83ff544f0dd738375ab80
+MD5 (patch-ac) = fb73e365cf90e149ed52760fa689bdf1
diff --git a/net/p5-SNMP/patches/patch-aa b/net/p5-SNMP/patches/patch-aa
index a579cb87828..5c681c576ec 100644
--- a/net/p5-SNMP/patches/patch-aa
+++ b/net/p5-SNMP/patches/patch-aa
@@ -1,37 +1,34 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 11:10:49 agc Exp $
+$NetBSD: patch-aa,v 1.3 2001/01/30 22:03:39 wrstuden Exp $
---- Makefile.PL.orig Fri Dec 19 01:34:49 1997
-+++ Makefile.PL Sun May 24 00:39:43 1998
-@@ -32,10 +32,10 @@
- $sep = '/';
- }
- my $inc_path1 = "${sep}usr${sep}include";
--my $inc_path2 = "${sep}usr${sep}local${sep}include";
-+my $inc_path2 = "$ENV{'PREFIX'}${sep}include";
- my $inc_path3 = "${inc_path2}${sep}ucd-snmp";
- my $lib_path1 = "${sep}usr${sep}lib";
--my $lib_path2 = "${sep}usr${sep}local${sep}lib";
-+my $lib_path2 = "$ENV{'PREFIX'}${sep}lib";
-
- my @IncludeFiles = qw[asn1.h mib.h parse.h snmp.h snmp_api.h
- snmp_client.h snmp_impl.h];
-@@ -52,7 +52,7 @@
-
- @IncludeFiles = map {"$IncludeDir$sep$_";} @IncludeFiles;
- $Params{LIBS} = "-L$LibDir -l$snmp_llib";
-- $Params{INC} = "-I$IncludeDir";
-+ $Params{INC} = "-I$IncludeDir -DCMU_COMPATIBLE";
- $Params{H} = \@IncludeFiles;
- return(%Params);
- }
-@@ -79,8 +79,8 @@
+--- Makefile.PL.orig Fri Jan 26 13:35:24 2001
++++ Makefile.PL Fri Jan 26 14:03:10 2001
+@@ -31,9 +31,9 @@
+ $snmp_link_lib = 'snmp';
+ $sep = '/';
}
- $host ||= 'localhost';
- $comm ||= 'private';
-- my $resp = prompt("Enter host and community for SNMP tests: ",
-- "$host $comm");
-+#HF# my $resp = prompt("Enter host and community for SNMP tests: ",
-+#HF# "$host $comm");
- open(H, ">host") || die "Error: could not open file 'host' ($!)";
- print H "$resp\n";
- close H;
+- my $inc_path1 = "${sep}usr${sep}local${sep}include";
++ my $inc_path1 = "$ENV{'PREFIX'}${sep}include";
+ my $inc_path2 = "${sep}usr${sep}include";
+- my $lib_path1 = "${sep}usr${sep}local${sep}lib";
++ my $lib_path1 = "$ENV{'PREFIX'}${sep}lib";
+ my $lib_path2 = "${sep}usr${sep}lib";
+
+ my @IncludeFiles = qw[ucd-snmp/ucd-snmp-config.h
+@@ -58,7 +58,7 @@
+ $ssl_link_lib = ($^O =~ /win32/i ? 'libeay32' : 'crypto');
+ my $ssl_link_libs;
+ if (HasSSL("$IncludeDir${sep}ucd-snmp/ucd-snmp-config.h")) {
+- my @SSLLibDirs = ("/usr/local/lib", "/usr/local/ssl/lib", "/usr/lib");
++ my @SSLLibDirs = ("/usr/lib", "$ENV{'PREFIX'}/lib");
+ my $SSLLibDir = find_files([$ssl_lib], \@SSLLibDirs) ||
+ prompt("Where is the SSL library installed?", $SSLLibDirs[1]);
+ $ssl_link = "-L$SSLLibDir -l$ssl_link_lib" if $SSLLibDir;
+@@ -87,7 +87,7 @@
+ sub GetTestInfo {
+ my $sep = ($^O =~ /win32/i ? '\\' : '/');
+ my $info_file = "t${sep}snmptest.cmd";
+- my $snmpd_path1 = "${sep}usr${sep}local${sep}sbin";
++ my $snmpd_path1 = "$ENV{'PREFIX'}${sep}sbin";
+ my $snmpd_path2 = "${sep}usr${sep}sbin";
+ my $snmpd_path3 = "${sep}usr${sep}bin";
+ return if -e $info_file;
diff --git a/net/p5-SNMP/patches/patch-ab b/net/p5-SNMP/patches/patch-ab
new file mode 100644
index 00000000000..ae9e87f4cc5
--- /dev/null
+++ b/net/p5-SNMP/patches/patch-ab
@@ -0,0 +1,16 @@
+$NetBSD: patch-ab,v 1.1 2001/01/30 22:03:39 wrstuden Exp $
+--- t/mibload.t.orig Mon Jan 29 10:19:18 2001
++++ t/mibload.t Mon Jan 29 10:24:02 2001
+@@ -33,9 +33,9 @@
+ @mibdir = ("/usr/mibs");
+ @mibfile = ("/usr/mibs/IPV6-TCP-MIB.txt", "/usr/mibs/snmp-proxy-mib.txt");
+ } else {
+- $mibfile1 = "/usr/local/share/snmp/mibs/TCP-MIB.txt";
+- @mibdir = ('/usr/local/share/snmp/mibs/');
+- @mibfile = ('/usr/local/share/snmp/mibs/IPV6-TCP-MIB.txt');
++ $mibfile1 = "$ENV{'PREFIX'}/share/snmp/mibs/TCP-MIB.txt";
++ @mibdir = ("$ENV{'PREFIX'}/share/snmp/mibs/");
++ @mibfile = ("$ENV{'PREFIX'}/share/snmp/mibs/IPV6-TCP-MIB.txt");
+ }
+ ######################################################################
+ # See if we can find a mib to use, return of 0 means the file wasn't
diff --git a/net/p5-SNMP/patches/patch-ac b/net/p5-SNMP/patches/patch-ac
new file mode 100644
index 00000000000..ac873584093
--- /dev/null
+++ b/net/p5-SNMP/patches/patch-ac
@@ -0,0 +1,20 @@
+$NetBSD: patch-ac,v 1.1 2001/01/30 22:03:40 wrstuden Exp $
+
+--- t/mib.t.orig Tue Jan 30 05:15:44 2001
++++ t/mib.t Tue Jan 30 05:16:19 2001
+@@ -147,13 +147,13 @@
+ ###################### 15 #########################
+ $res = $SNMP::MIB{atNetAddress}{nextNode};
+ #print("res is --> $res\n");
+-ok($res =~ /^HASH/);
++ok(ref($res) eq HASH);
+ #print("\n");
+
+ ######################## 16 #########################
+ $res = $SNMP::MIB{sysDescr}{children};
+ #print("res is --> $res\n");
+-ok($res =~ /^ARRAY/);
++ok(ref($res) eq ARRAY);
+ #print("\n");
+ #################### 17 #########################
+
diff --git a/net/p5-SNMP/pkg/COMMENT b/net/p5-SNMP/pkg/COMMENT
index 41980eb08aa..43a7dbf12ce 100644
--- a/net/p5-SNMP/pkg/COMMENT
+++ b/net/p5-SNMP/pkg/COMMENT
@@ -1 +1 @@
-Perl5 module for interfacing to the CMU SNMP library
+Perl5 module for interfacing to the UCD SNMP library
diff --git a/net/p5-SNMP/pkg/PLIST b/net/p5-SNMP/pkg/PLIST
index 4204921d87f..3875316aef2 100644
--- a/net/p5-SNMP/pkg/PLIST
+++ b/net/p5-SNMP/pkg/PLIST
@@ -1,2 +1,11 @@
-@comment $NetBSD: PLIST,v 1.2 2000/08/29 20:48:14 jlam Exp $
+@comment $NetBSD: PLIST,v 1.3 2001/01/30 22:03:40 wrstuden Exp $
${PERL5_SITELIB}/README.SNMP
+share/examples/p5-SNMP/async1.pl
+share/examples/p5-SNMP/async2.pl
+share/examples/p5-SNMP/ipforward.pl
+share/examples/p5-SNMP/mibtree.pl
+share/examples/p5-SNMP/mibwalk.pl
+share/examples/p5-SNMP/pingmib.pl
+share/examples/p5-SNMP/tablewalk.pl
+share/examples/p5-SNMP/testleak.pl
+@dirrm share/examples/p5-SNMP