summaryrefslogtreecommitdiff
path: root/net/p5-SNMP
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>1998-05-24 12:33:45 +0000
committerhubertf <hubertf@pkgsrc.org>1998-05-24 12:33:45 +0000
commitdebb8d8875f43c340b4266c0d4cd029f3ede0d0b (patch)
tree638169d39aad55f7191875d99b6a261501edd56d /net/p5-SNMP
parent46a3040b2eb35869e31ca55ee0124db80fa3a98d (diff)
downloadpkgsrc-debb8d8875f43c340b4266c0d4cd029f3ede0d0b.tar.gz
Add pkg for a SNMP-interface for perl; based on FreeBSD port.
Diffstat (limited to 'net/p5-SNMP')
-rw-r--r--net/p5-SNMP/Makefile23
-rw-r--r--net/p5-SNMP/files/md51
-rw-r--r--net/p5-SNMP/patches/patch-aa35
-rw-r--r--net/p5-SNMP/pkg/COMMENT1
-rw-r--r--net/p5-SNMP/pkg/DESCR32
-rw-r--r--net/p5-SNMP/pkg/PLIST-md.shared4
-rw-r--r--net/p5-SNMP/pkg/PLIST-md.static4
-rw-r--r--net/p5-SNMP/pkg/PLIST-mi6
8 files changed, 106 insertions, 0 deletions
diff --git a/net/p5-SNMP/Makefile b/net/p5-SNMP/Makefile
new file mode 100644
index 00000000000..8ad045a8627
--- /dev/null
+++ b/net/p5-SNMP/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1 1998/05/24 12:33:45 hubertf 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
+CATEGORIES= net perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= SNMP
+
+MAINTAINER= packages@netbsd.org
+
+BUILD_DEPENDS= ${PREFIX}/lib/libsnmp.a:${PKGSRCDIR}/net/ucd-snmp
+
+USE_PERL5= YES
+
+do-configure:
+ @ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/perl Makefile.PL
+
+post-install:
+ @ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/lib/perl5/site_perl/README.SNMP
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/p5-SNMP/files/md5 b/net/p5-SNMP/files/md5
new file mode 100644
index 00000000000..7440719bd01
--- /dev/null
+++ b/net/p5-SNMP/files/md5
@@ -0,0 +1 @@
+MD5 (SNMP-1.7.tar.gz) = 430af6d8ff8ceaad2dfc35f6e0dcfd0a
diff --git a/net/p5-SNMP/patches/patch-aa b/net/p5-SNMP/patches/patch-aa
new file mode 100644
index 00000000000..f7e38416876
--- /dev/null
+++ b/net/p5-SNMP/patches/patch-aa
@@ -0,0 +1,35 @@
+--- 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 @@
+ }
+ $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;
diff --git a/net/p5-SNMP/pkg/COMMENT b/net/p5-SNMP/pkg/COMMENT
new file mode 100644
index 00000000000..a5faff815b4
--- /dev/null
+++ b/net/p5-SNMP/pkg/COMMENT
@@ -0,0 +1 @@
+a perl5 module for interfacing with the CMU SNMP library
diff --git a/net/p5-SNMP/pkg/DESCR b/net/p5-SNMP/pkg/DESCR
new file mode 100644
index 00000000000..cf17a82af26
--- /dev/null
+++ b/net/p5-SNMP/pkg/DESCR
@@ -0,0 +1,32 @@
+This is a Perl5 extension module which provides an interface to the
+CMU-SNMPv2 library.
+
+Description:
+
+The basic operations offered by SNMP are provided through an object
+oriented interface for modularity and ease of use. The primary object is
+SNMP::Session which is implemented as a blessed hash reference. The
+object supports 'get', 'set', and 'getNext' method calls. All calls are
+blocking/synchronous (i.e., they must receive a response or timeout
+before control is returned to the caller). The methods take a variety of
+input argument formats(see test.pl and examp/* for examples). A
+description of the objects data fields follow.
+
+SNMP::Session
+ DestHost - default 'localhost', hostname or ip addr of SNMP agent
+ Community - default 'public', SNMP community string
+ Version - default '1', v1 support only for now
+ Timeout - default '1000000', micro-seconds before retry
+ Retries - default '5', retries before failure
+ RetryNoSuch - default '1', for get request NOSUCH errors, the pdu will
+ be repaired, removing the varbind in error, and resent -
+ undef will be returned for all NOSUCH varbinds, setting
+ to '0' disables this feature and the entire get request
+ will fail on any NOSUCH error
+ ErrorStr - read-only, returns a test description of any error occuring
+ in the last request
+ ErrorNum - read-only, returns the snmp_err or staus of last request
+ private
+ DestAddr - internal field used to hold the translated DestHost field
+ SessPtr - internal field used to cache a created session structure
+
diff --git a/net/p5-SNMP/pkg/PLIST-md.shared b/net/p5-SNMP/pkg/PLIST-md.shared
new file mode 100644
index 00000000000..5aa07883fe2
--- /dev/null
+++ b/net/p5-SNMP/pkg/PLIST-md.shared
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST-md.shared,v 1.1 1998/05/24 12:33:47 hubertf Exp $
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP/SNMP.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP/SNMP.so
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP
diff --git a/net/p5-SNMP/pkg/PLIST-md.static b/net/p5-SNMP/pkg/PLIST-md.static
new file mode 100644
index 00000000000..07c5544d3e8
--- /dev/null
+++ b/net/p5-SNMP/pkg/PLIST-md.static
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST-md.static,v 1.1 1998/05/24 12:33:47 hubertf Exp $
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP/SNMP.a
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP/extralibs.ld
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP
diff --git a/net/p5-SNMP/pkg/PLIST-mi b/net/p5-SNMP/pkg/PLIST-mi
new file mode 100644
index 00000000000..db371e4feb8
--- /dev/null
+++ b/net/p5-SNMP/pkg/PLIST-mi
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST-mi,v 1.1 1998/05/24 12:33:47 hubertf Exp $
+lib/perl5/site_perl/auto/SNMP/autosplit.ix
+lib/perl5/site_perl/SNMP.pm
+lib/perl5/site_perl/README.SNMP
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/SNMP/.packlist
+@dirrm lib/perl5/site_perl/auto/SNMP