aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2000-09-01 02:09:43 +0800
committerknu <knu@FreeBSD.org>2000-09-01 02:09:43 +0800
commit62b31960f75e1150273b8e6962ef97e5f3421c02 (patch)
tree7767f415c55b4712bf2a33ef48ac304ad5b7c825
parentaff57106ec7f618785735f8f1be2258e7eceafe1 (diff)
downloadfreebsd-ports-gnome-62b31960f75e1150273b8e6962ef97e5f3421c02.tar.gz
freebsd-ports-gnome-62b31960f75e1150273b8e6962ef97e5f3421c02.tar.zst
freebsd-ports-gnome-62b31960f75e1150273b8e6962ef97e5f3421c02.zip
Add ruby-snmp, Ruby interface to UCD-SNMP library.
-rw-r--r--net-mgmt/ruby-snmp/Makefile52
-rw-r--r--net-mgmt/ruby-snmp/distinfo1
-rw-r--r--net-mgmt/ruby-snmp/files/patch-aa45
-rw-r--r--net-mgmt/ruby-snmp/pkg-comment1
-rw-r--r--net-mgmt/ruby-snmp/pkg-descr6
-rw-r--r--net-mgmt/ruby-snmp/pkg-plist8
-rw-r--r--net/Makefile1
-rw-r--r--net/ruby-snmp/Makefile52
-rw-r--r--net/ruby-snmp/distinfo1
-rw-r--r--net/ruby-snmp/files/patch-aa45
-rw-r--r--net/ruby-snmp/pkg-comment1
-rw-r--r--net/ruby-snmp/pkg-descr6
-rw-r--r--net/ruby-snmp/pkg-plist8
13 files changed, 227 insertions, 0 deletions
diff --git a/net-mgmt/ruby-snmp/Makefile b/net-mgmt/ruby-snmp/Makefile
new file mode 100644
index 000000000000..851dbf33e82f
--- /dev/null
+++ b/net-mgmt/ruby-snmp/Makefile
@@ -0,0 +1,52 @@
+# New ports collection makefile for: Ruby-SNMP
+# Date created: 1 Sep 2000
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= snmp
+PORTVERSION= 0.2.1
+CATEGORIES= net ruby
+MASTER_SITES= http://w3cic.riken.go.jp/~tsuruoka/
+PKGNAMEPREFIX= ruby-
+DISTNAME= ruby${PORTNAME}-${PORTVERSION}
+EXTRACT_SUFX= .tgz
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+BUILD_DEPENDS= ruby:${PORTSDIR}/lang/ruby
+LIB_DEPENDS= snmp.4:${PORTSDIR}/net/ucd-snmp
+RUN_DEPENDS= ruby:${PORTSDIR}/lang/ruby
+
+WRKSRC= ${WRKDIR}/SNMP
+INSTALL_TARGET= site-install
+CONFIGURE_ARGS= --with-snmp-dir="${LOCALBASE}"
+
+PLIST_SUB= RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"
+
+RUBY?= ${LOCALBASE}/bin/ruby
+RUBY_VER?= 1.4
+RUBY_ARCH?= ${ARCH}-freebsd${OSREL}
+
+DOCS_EN= mib_view.html \
+ rubysnmp.html \
+ sampleout.html \
+ snmp_module.html \
+ snmp_session.html \
+ snmp_var.html
+
+do-configure:
+ @cd ${WRKSRC}; \
+ ${SETENV} ${CONFIGURE_ENV} ${RUBY} extconf.rb ${CONFIGURE_ARGS}
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/ruby/snmp
+.for f in ${DOCS_EN}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/ruby/snmp/
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/ruby-snmp/distinfo b/net-mgmt/ruby-snmp/distinfo
new file mode 100644
index 000000000000..fcb93d287454
--- /dev/null
+++ b/net-mgmt/ruby-snmp/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/rubysnmp-0.2.1.tgz) = 0c30ae623895aa5304c808fddf34dd81
diff --git a/net-mgmt/ruby-snmp/files/patch-aa b/net-mgmt/ruby-snmp/files/patch-aa
new file mode 100644
index 000000000000..8e10fe8dbe29
--- /dev/null
+++ b/net-mgmt/ruby-snmp/files/patch-aa
@@ -0,0 +1,45 @@
+--- extconf.rb.orig Mon Jul 10 19:18:51 2000
++++ extconf.rb Fri Sep 1 01:53:44 2000
+@@ -1,15 +1,11 @@
+-require './mkmf.rb'
++require 'mkmf.rb'
+
+ def crash(str)
+ printf " extconf failure:%s\n", str
+ exit 1
+ end
+
+-if /linux/ =~ RUBY_PLATFORM
+- $LDFLAGS = "-L/usr/lib"
+-else
+- $LDFLAGS = "-L/usr/local/lib"
+-end
++dir_config('snmp')
+
+ # Headers
+ ruby_h = have_header("ruby.h")
+@@ -35,8 +31,10 @@
+ EOF
+
+ # Libraies
++have_library("crypto") if test(?e, "/usr/lib/libcrypto.so");
++
+ snmpsessinit = have_library("snmp", "snmp_sess_init")
+-unless snmpsessinit or snmpsessopen or snmpsessclose or snmpsessread or snmpsesssend
++unless snmpsessinit # or snmpsessopen or snmpsessclose or snmpsessread or snmpsesssend
+ crash "This module require snmp_sess_(init|open|close|read|send) functions."
+ end
+
+@@ -51,10 +49,10 @@
+ $CFLAGS = "-DNO_SNMP_FREE " + $CFLAGS
+ end
+
+-unless try_link(header+<<EOF, "-lsnmp")
++if try_link(header+<<EOF, "-lsnmp")
+
+ void main() {
+- init_snmp("snmpapp");
++ init_snmp();
+ }
+ EOF
+ $CFLAGS = "-DVOID_INIT_SNMP " + $CFLAGS
diff --git a/net-mgmt/ruby-snmp/pkg-comment b/net-mgmt/ruby-snmp/pkg-comment
new file mode 100644
index 000000000000..273e18db69f3
--- /dev/null
+++ b/net-mgmt/ruby-snmp/pkg-comment
@@ -0,0 +1 @@
+Ruby interface to UCD-SNMP library
diff --git a/net-mgmt/ruby-snmp/pkg-descr b/net-mgmt/ruby-snmp/pkg-descr
new file mode 100644
index 000000000000..b2d233893508
--- /dev/null
+++ b/net-mgmt/ruby-snmp/pkg-descr
@@ -0,0 +1,6 @@
+Ruby SNMP is UCD-SNMP library interface for the Ruby.
+
+The current version only supports SNMPv1 GET and GETNEXT requests.
+
+Author: Nobuhiko Tsuruoka <tsuruoka@postman.riken.go.jp>
+WWW: http://w3cic.riken.go.jp/~tsuruoka/
diff --git a/net-mgmt/ruby-snmp/pkg-plist b/net-mgmt/ruby-snmp/pkg-plist
new file mode 100644
index 000000000000..661480ab4dd7
--- /dev/null
+++ b/net-mgmt/ruby-snmp/pkg-plist
@@ -0,0 +1,8 @@
+lib/ruby/site_ruby/%%RUBY_VER%%/%%RUBY_ARCH%%/snmp.so
+share/doc/ruby/snmp/mib_view.html
+share/doc/ruby/snmp/rubysnmp.html
+share/doc/ruby/snmp/sampleout.html
+share/doc/ruby/snmp/snmp_module.html
+share/doc/ruby/snmp/snmp_session.html
+share/doc/ruby/snmp/snmp_var.html
+@dirrm share/doc/ruby/snmp
diff --git a/net/Makefile b/net/Makefile
index 6fc4133174a9..261dedcc4c5c 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -216,6 +216,7 @@
SUBDIR += rshell
SUBDIR += rsync
SUBDIR += rtsp_proxy
+ SUBDIR += ruby-snmp
SUBDIR += ruby-uri
SUBDIR += rwhois
SUBDIR += samba
diff --git a/net/ruby-snmp/Makefile b/net/ruby-snmp/Makefile
new file mode 100644
index 000000000000..851dbf33e82f
--- /dev/null
+++ b/net/ruby-snmp/Makefile
@@ -0,0 +1,52 @@
+# New ports collection makefile for: Ruby-SNMP
+# Date created: 1 Sep 2000
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= snmp
+PORTVERSION= 0.2.1
+CATEGORIES= net ruby
+MASTER_SITES= http://w3cic.riken.go.jp/~tsuruoka/
+PKGNAMEPREFIX= ruby-
+DISTNAME= ruby${PORTNAME}-${PORTVERSION}
+EXTRACT_SUFX= .tgz
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+BUILD_DEPENDS= ruby:${PORTSDIR}/lang/ruby
+LIB_DEPENDS= snmp.4:${PORTSDIR}/net/ucd-snmp
+RUN_DEPENDS= ruby:${PORTSDIR}/lang/ruby
+
+WRKSRC= ${WRKDIR}/SNMP
+INSTALL_TARGET= site-install
+CONFIGURE_ARGS= --with-snmp-dir="${LOCALBASE}"
+
+PLIST_SUB= RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"
+
+RUBY?= ${LOCALBASE}/bin/ruby
+RUBY_VER?= 1.4
+RUBY_ARCH?= ${ARCH}-freebsd${OSREL}
+
+DOCS_EN= mib_view.html \
+ rubysnmp.html \
+ sampleout.html \
+ snmp_module.html \
+ snmp_session.html \
+ snmp_var.html
+
+do-configure:
+ @cd ${WRKSRC}; \
+ ${SETENV} ${CONFIGURE_ENV} ${RUBY} extconf.rb ${CONFIGURE_ARGS}
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/ruby/snmp
+.for f in ${DOCS_EN}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/ruby/snmp/
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/net/ruby-snmp/distinfo b/net/ruby-snmp/distinfo
new file mode 100644
index 000000000000..fcb93d287454
--- /dev/null
+++ b/net/ruby-snmp/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/rubysnmp-0.2.1.tgz) = 0c30ae623895aa5304c808fddf34dd81
diff --git a/net/ruby-snmp/files/patch-aa b/net/ruby-snmp/files/patch-aa
new file mode 100644
index 000000000000..8e10fe8dbe29
--- /dev/null
+++ b/net/ruby-snmp/files/patch-aa
@@ -0,0 +1,45 @@
+--- extconf.rb.orig Mon Jul 10 19:18:51 2000
++++ extconf.rb Fri Sep 1 01:53:44 2000
+@@ -1,15 +1,11 @@
+-require './mkmf.rb'
++require 'mkmf.rb'
+
+ def crash(str)
+ printf " extconf failure:%s\n", str
+ exit 1
+ end
+
+-if /linux/ =~ RUBY_PLATFORM
+- $LDFLAGS = "-L/usr/lib"
+-else
+- $LDFLAGS = "-L/usr/local/lib"
+-end
++dir_config('snmp')
+
+ # Headers
+ ruby_h = have_header("ruby.h")
+@@ -35,8 +31,10 @@
+ EOF
+
+ # Libraies
++have_library("crypto") if test(?e, "/usr/lib/libcrypto.so");
++
+ snmpsessinit = have_library("snmp", "snmp_sess_init")
+-unless snmpsessinit or snmpsessopen or snmpsessclose or snmpsessread or snmpsesssend
++unless snmpsessinit # or snmpsessopen or snmpsessclose or snmpsessread or snmpsesssend
+ crash "This module require snmp_sess_(init|open|close|read|send) functions."
+ end
+
+@@ -51,10 +49,10 @@
+ $CFLAGS = "-DNO_SNMP_FREE " + $CFLAGS
+ end
+
+-unless try_link(header+<<EOF, "-lsnmp")
++if try_link(header+<<EOF, "-lsnmp")
+
+ void main() {
+- init_snmp("snmpapp");
++ init_snmp();
+ }
+ EOF
+ $CFLAGS = "-DVOID_INIT_SNMP " + $CFLAGS
diff --git a/net/ruby-snmp/pkg-comment b/net/ruby-snmp/pkg-comment
new file mode 100644
index 000000000000..273e18db69f3
--- /dev/null
+++ b/net/ruby-snmp/pkg-comment
@@ -0,0 +1 @@
+Ruby interface to UCD-SNMP library
diff --git a/net/ruby-snmp/pkg-descr b/net/ruby-snmp/pkg-descr
new file mode 100644
index 000000000000..b2d233893508
--- /dev/null
+++ b/net/ruby-snmp/pkg-descr
@@ -0,0 +1,6 @@
+Ruby SNMP is UCD-SNMP library interface for the Ruby.
+
+The current version only supports SNMPv1 GET and GETNEXT requests.
+
+Author: Nobuhiko Tsuruoka <tsuruoka@postman.riken.go.jp>
+WWW: http://w3cic.riken.go.jp/~tsuruoka/
diff --git a/net/ruby-snmp/pkg-plist b/net/ruby-snmp/pkg-plist
new file mode 100644
index 000000000000..661480ab4dd7
--- /dev/null
+++ b/net/ruby-snmp/pkg-plist
@@ -0,0 +1,8 @@
+lib/ruby/site_ruby/%%RUBY_VER%%/%%RUBY_ARCH%%/snmp.so
+share/doc/ruby/snmp/mib_view.html
+share/doc/ruby/snmp/rubysnmp.html
+share/doc/ruby/snmp/sampleout.html
+share/doc/ruby/snmp/snmp_module.html
+share/doc/ruby/snmp/snmp_session.html
+share/doc/ruby/snmp/snmp_var.html
+@dirrm share/doc/ruby/snmp