[DRE-commits] r2364 - in packages/libpcap-ruby/trunk/debian: . patches
lucas at alioth.debian.org
lucas at alioth.debian.org
Mon Dec 24 16:06:27 UTC 2007
Author: lucas
Date: 2007-12-24 16:06:27 +0000 (Mon, 24 Dec 2007)
New Revision: 2364
Added:
packages/libpcap-ruby/trunk/debian/docs
packages/libpcap-ruby/trunk/debian/examples
packages/libpcap-ruby/trunk/debian/patches/
packages/libpcap-ruby/trunk/debian/patches/00list
packages/libpcap-ruby/trunk/debian/patches/01_examples_ruby_path.dpatch
packages/libpcap-ruby/trunk/debian/patches/02_optparse.dpatch
packages/libpcap-ruby/trunk/debian/patches/03_debug_print.dpatch
packages/libpcap-ruby/trunk/debian/patches/04_findalldevs.dpatch
Modified:
packages/libpcap-ruby/trunk/debian/changelog
packages/libpcap-ruby/trunk/debian/compat
packages/libpcap-ruby/trunk/debian/control
packages/libpcap-ruby/trunk/debian/copyright
packages/libpcap-ruby/trunk/debian/rules
packages/libpcap-ruby/trunk/debian/watch
Log:
converted to cdbs+dpatch
Modified: packages/libpcap-ruby/trunk/debian/changelog
===================================================================
--- packages/libpcap-ruby/trunk/debian/changelog 2007-12-24 15:45:08 UTC (rev 2363)
+++ packages/libpcap-ruby/trunk/debian/changelog 2007-12-24 16:06:27 UTC (rev 2364)
@@ -1,13 +1,13 @@
-libpcap-ruby (0.6-8) UNRELEASED; urgency=low
+libpcap-ruby (0.6-8) unstable; urgency=low
- [ Lucas Nussbaum ]
- * NOT RELEASED YET
+ * Move to cdbs and extconf class
+ * Bump debhelper build-dep and compat to 5
+ * Add watch file
+ * Update FSF address in copyright file
+ * Bump Standards Version to 3.7.3
- [ Vincent Fourmond ]
- * Added watchfile
+ -- Barry deFreese <bddebian at comcast.net> Tue, 18 Dec 2007 12:18:38 -0500
- -- Vincent Fourmond <fourmond at debian.org> Mon, 10 Dec 2007 19:40:35 +0100
-
libpcap-ruby (0.6-7) unstable; urgency=low
* New maintainer.
Modified: packages/libpcap-ruby/trunk/debian/compat
===================================================================
--- packages/libpcap-ruby/trunk/debian/compat 2007-12-24 15:45:08 UTC (rev 2363)
+++ packages/libpcap-ruby/trunk/debian/compat 2007-12-24 16:06:27 UTC (rev 2364)
@@ -1 +1 @@
-4
+5
Modified: packages/libpcap-ruby/trunk/debian/control
===================================================================
--- packages/libpcap-ruby/trunk/debian/control 2007-12-24 15:45:08 UTC (rev 2363)
+++ packages/libpcap-ruby/trunk/debian/control 2007-12-24 16:06:27 UTC (rev 2364)
@@ -2,8 +2,8 @@
Section: interpreters
Priority: optional
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
-Build-Depends: debhelper (>> 4), libpcap-dev, ruby1.8, ruby1.8-dev
-Standards-Version: 3.6.2
+Build-Depends: debhelper (>> 5), cdbs, ruby-pkg-tools,libpcap-dev, dpatch, ruby1.8, ruby1.8-dev
+Standards-Version: 3.7.3
Homepage: http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html
Vcs-Browser: http://svn.debian.org/wsvn/pkg-ruby-extras/packages/libpcap-ruby/
Vcs-Svn: svn://svn.debian.org/pkg-ruby-extras/packages/libpcap-ruby/
Modified: packages/libpcap-ruby/trunk/debian/copyright
===================================================================
--- packages/libpcap-ruby/trunk/debian/copyright 2007-12-24 15:45:08 UTC (rev 2363)
+++ packages/libpcap-ruby/trunk/debian/copyright 2007-12-24 16:06:27 UTC (rev 2364)
@@ -19,8 +19,8 @@
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02111-1301, USA.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
Added: packages/libpcap-ruby/trunk/debian/docs
===================================================================
--- packages/libpcap-ruby/trunk/debian/docs (rev 0)
+++ packages/libpcap-ruby/trunk/debian/docs 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1,4 @@
+README
+README.ja
+doc/*
+doc-ja/*
Added: packages/libpcap-ruby/trunk/debian/examples
===================================================================
--- packages/libpcap-ruby/trunk/debian/examples (rev 0)
+++ packages/libpcap-ruby/trunk/debian/examples 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1 @@
+examples/*
Added: packages/libpcap-ruby/trunk/debian/patches/00list
===================================================================
--- packages/libpcap-ruby/trunk/debian/patches/00list (rev 0)
+++ packages/libpcap-ruby/trunk/debian/patches/00list 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1,4 @@
+01_examples_ruby_path.dpatch
+02_optparse.dpatch
+03_debug_print.dpatch
+04_findalldevs.dpatch
Added: packages/libpcap-ruby/trunk/debian/patches/01_examples_ruby_path.dpatch
===================================================================
--- packages/libpcap-ruby/trunk/debian/patches/01_examples_ruby_path.dpatch (rev 0)
+++ packages/libpcap-ruby/trunk/debian/patches/01_examples_ruby_path.dpatch 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_examples_ruby_path.dpatch by <bdefreese at bddebian1>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use /usr/bin/ruby, not /usr/local/bin/ruby
+
+ at DPATCH@
+diff -urNad pcap~/examples/httpdump.rb pcap/examples/httpdump.rb
+--- pcap~/examples/httpdump.rb 2000-08-13 01:41:14.000000000 -0400
++++ pcap/examples/httpdump.rb 2007-12-20 09:15:27.000000000 -0500
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/ruby
++#!/usr/bin/ruby
+ require 'pcaplet'
+ httpdump = Pcaplet.new('-s 1500')
+
+diff -urNad pcap~/examples/tcpdump.rb pcap/examples/tcpdump.rb
+--- pcap~/examples/tcpdump.rb 1999-10-27 05:54:39.000000000 -0400
++++ pcap/examples/tcpdump.rb 2007-12-20 09:15:39.000000000 -0500
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/ruby
++#!/usr/bin/ruby
+ require 'pcaplet'
+ include Pcap
+
+diff -urNad pcap~/examples/test.rb pcap/examples/test.rb
+--- pcap~/examples/test.rb 1999-11-01 03:22:54.000000000 -0500
++++ pcap/examples/test.rb 2007-12-20 09:15:14.000000000 -0500
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/ruby
++#!/usr/bin/ruby
+ require 'pcap'
+
+ dev = Pcap.lookupdev
Added: packages/libpcap-ruby/trunk/debian/patches/02_optparse.dpatch
===================================================================
--- packages/libpcap-ruby/trunk/debian/patches/02_optparse.dpatch (rev 0)
+++ packages/libpcap-ruby/trunk/debian/patches/02_optparse.dpatch 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_optparse.dpatch by <bdefreese at bddebian1>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use optparse instead of getopts
+
+ at DPATCH@
+diff -urNad pcap~/lib/pcaplet.rb pcap/lib/pcaplet.rb
+--- pcap~/lib/pcaplet.rb 2000-08-13 01:22:14.000000000 -0400
++++ pcap/lib/pcaplet.rb 2007-12-20 09:24:15.000000000 -0500
+@@ -1,5 +1,5 @@
+ require 'pcap'
+-require 'getopts'
++require 'optparse'
+
+ def pcaplet_usage()
+ $stderr.print <<END
+@@ -24,15 +24,25 @@
+ if args
+ ARGV[0,0] = args.split(/\s+/)
+ end
+- usage(1) unless getopts("dnv", "i:", "r:", "c:-1", "s:68")
+- $DEBUG |= $OPT_d
+- $VERBOSE |= $OPT_v
++ @device = nil
++ @rfile = nil
++ @count = -1
++ @snaplen = 68
++ opts = OptionParser.new do |opts|
++ opts.on('-d') {$DEBUG = true}
++ opts.on('-v') {$VERBOSE = true}
++ opts.on('-n') {Pcap.convert = false}
++ opts.on('-i IFACE') {|s| @device = s}
++ opts.on('-r FILE') {|s| @rfile = s}
++ opts.on('-c COUNT', OptionParser::DecimalInteger) {|i| @count = i}
++ opts.on('-s LEN', OptionParser::DecimalInteger) {|i| @snaplen = i}
++ end
++ begin
++ opts.parse!
++ rescue
++ usage(1)
++ end
+
+- @device = $OPT_i
+- @rfile = $OPT_r
+- Pcap.convert = !$OPT_n
+- @count = $OPT_c.to_i
+- @snaplen = $OPT_s.to_i
+ @filter = ARGV.join(' ')
+
+ # check option consistency
Added: packages/libpcap-ruby/trunk/debian/patches/03_debug_print.dpatch
===================================================================
--- packages/libpcap-ruby/trunk/debian/patches/03_debug_print.dpatch (rev 0)
+++ packages/libpcap-ruby/trunk/debian/patches/03_debug_print.dpatch 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_debug_print.dpatch by <bdefreese at bddebian1>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Loop through stderr on DEBUG_PRINT
+
+ at DPATCH@
+diff -urNad pcap~/ruby_pcap.h pcap/ruby_pcap.h
+--- pcap~/ruby_pcap.h 2000-08-13 02:56:15.000000000 -0400
++++ pcap/ruby_pcap.h 2007-12-20 09:30:38.000000000 -0500
+@@ -29,11 +29,12 @@
+ #include <netdb.h>
+
+ #ifdef DEBUG
+-# define DEBUG_PRINT(x) \
++# define DEBUG_PRINT(x) do {\
+ ((RTEST(ruby_debug) && RTEST(ruby_verbose))?\
+- (fprintf(stderr, "%s\n", x),fflush(stderr)) : 0)
++ (fprintf(stderr, "%s\n", x),fflush(stderr)) : 0)\
++} while (0)
+ #else
+-# define DEBUG_PRINT(x) (0)
++# define DEBUG_PRINT(x) do {} while (0)
+ #endif
+
+ #define UINT32_2_NUM(i) rb_uint2inum(i)
Added: packages/libpcap-ruby/trunk/debian/patches/04_findalldevs.dpatch
===================================================================
--- packages/libpcap-ruby/trunk/debian/patches/04_findalldevs.dpatch (rev 0)
+++ packages/libpcap-ruby/trunk/debian/patches/04_findalldevs.dpatch 2007-12-24 16:06:27 UTC (rev 2364)
@@ -0,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_findalldevs.dpatch by <bdefreese at bddebian1>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add support for the findalldevs function of libpcap.
+
+ at DPATCH@
+diff -urNad pcap~/Pcap.c pcap/Pcap.c
+--- pcap~/Pcap.c 2000-08-13 01:56:31.000000000 -0400
++++ pcap/Pcap.c 2007-12-20 09:53:39.000000000 -0500
+@@ -54,6 +54,29 @@
+ }
+
+ static VALUE
++pcap_s_findalldevs(self)
++ VALUE self;
++{
++ pcap_if_t *alldevsp;
++ VALUE return_ary;
++ char pcap_errbuf[PCAP_ERRBUF_SIZE];
++
++ return_ary = rb_ary_new();
++
++ pcap_findalldevs(&alldevsp, pcap_errbuf);
++
++ if (alldevsp == NULL) // List is empty, probably an error
++ rb_raise(ePcapError, "%s", pcap_errbuf);
++
++ for (; alldevsp->next != NULL; alldevsp = alldevsp->next)
++ rb_ary_push(return_ary, rb_str_new2(alldevsp->name));
++
++ pcap_freealldevs(alldevsp);
++
++ return return_ary;
++}
++
++static VALUE
+ pcap_s_lookupnet(self, dev)
+ VALUE self;
+ VALUE dev;
+@@ -723,6 +746,7 @@
+ /* define module Pcap */
+ mPcap = rb_define_module("Pcap");
+ rb_define_module_function(mPcap, "lookupdev", pcap_s_lookupdev, 0);
++ rb_define_module_function(mPcap, "findalldevs", pcap_s_findalldevs, 0);
+ rb_define_module_function(mPcap, "lookupnet", pcap_s_lookupnet, 1);
+ rb_global_variable(&rbpcap_convert);
+ rb_define_singleton_method(mPcap, "convert?", pcap_s_convert, 0);
+@@ -780,11 +804,7 @@
+ /*rb_define_method(cFilter, "&", filter_and, 1);*/
+
+ /* define class PcapStat */
+- cPcapStat = rb_funcall(rb_cStruct, rb_intern("new"), 4,
+- Qnil,
+- INT2NUM(rb_intern("recv")),
+- INT2NUM(rb_intern("drop")),
+- INT2NUM(rb_intern("ifdrop")));
++ cPcapStat = rb_struct_define(NULL, "recv", "drop", "ifdrop", NULL);
+ rb_define_const(mPcap, "Stat", cPcapStat);
+
+ /* define exception classes */
Modified: packages/libpcap-ruby/trunk/debian/rules
===================================================================
--- packages/libpcap-ruby/trunk/debian/rules 2007-12-24 15:45:08 UTC (rev 2363)
+++ packages/libpcap-ruby/trunk/debian/rules 2007-12-24 16:06:27 UTC (rev 2364)
@@ -1,75 +1,8 @@
#!/usr/bin/make -f
# -*- mode: makefile; -*-
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-#export DH_COMPAT=3
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+include /usr/share/ruby-pkg-tools/1/class/ruby-extconf-rb.mk
-build: build-stamp
-build-stamp:
- dh_testdir
-
- -rm -rf build-tree-1.8
- mkdir build-tree-1.8
-
- ruby1.8 -C build-tree-1.8 ../extconf.rb
- $(MAKE) -C build-tree-1.8
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- -rm -rf build-tree-1.8
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- $(MAKE) -C build-tree-1.8 sitelibdir=$(CURDIR)/debian/libpcap-ruby1.8$(shell ruby1.8 -rrbconfig -e 'print Config::CONFIG["rubylibdir"]') install
-
- touch install-stamp
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs -A README* doc doc-ja
- dh_installexamples -A examples/*
-# dh_install
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_installinit
-# dh_installcron
-# dh_installinfo
-# dh_undocumented
- dh_installman
- dh_link
- dh_strip
- dh_compress -X.rb -X.pl -X.py -X.scm -X.awk -X.dat
- dh_fixperms
-# dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+DEB_RUBY_INSTALL_ARGS = sitelibdir=$(CURDIR)/debian/libpcap-ruby1.8$(shell ruby1.8 -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
Modified: packages/libpcap-ruby/trunk/debian/watch
===================================================================
--- packages/libpcap-ruby/trunk/debian/watch 2007-12-24 15:45:08 UTC (rev 2363)
+++ packages/libpcap-ruby/trunk/debian/watch 2007-12-24 16:06:27 UTC (rev 2364)
@@ -1,2 +1,5 @@
version=3
+
+http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html ruby-pcap-([\d.]+)\.tar\.gz
+version=3
http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html ruby-pcap-(.*).tar.gz
\ No newline at end of file
More information about the Pkg-ruby-extras-commits
mailing list