[DRE-commits] r2141 - in packages/libdb4.2-ruby/trunk: . debian debian/.template src

lucas at alioth.debian.org lucas at alioth.debian.org
Sat Dec 8 12:00:04 UTC 2007


Author: lucas
Date: 2007-12-08 12:00:04 +0000 (Sat, 08 Dec 2007)
New Revision: 2141

Added:
   packages/libdb4.2-ruby/trunk/debian/
   packages/libdb4.2-ruby/trunk/debian/.template/
   packages/libdb4.2-ruby/trunk/debian/.template/changelog
   packages/libdb4.2-ruby/trunk/debian/.template/config.rb
   packages/libdb4.2-ruby/trunk/debian/.template/control.erb
   packages/libdb4.2-ruby/trunk/debian/.template/in.README.Debian.erb
   packages/libdb4.2-ruby/trunk/debian/.template/in.doc-base.erb
   packages/libdb4.2-ruby/trunk/debian/.template/in.postinst.erb
   packages/libdb4.2-ruby/trunk/debian/.template/in.prerm.erb
   packages/libdb4.2-ruby/trunk/debian/.template/rules.erb
   packages/libdb4.2-ruby/trunk/debian/.template/update.rb
   packages/libdb4.2-ruby/trunk/debian/changelog
   packages/libdb4.2-ruby/trunk/debian/compat
   packages/libdb4.2-ruby/trunk/debian/control
   packages/libdb4.2-ruby/trunk/debian/copyright
   packages/libdb4.2-ruby/trunk/debian/in.README.Debian
   packages/libdb4.2-ruby/trunk/debian/in.doc-base
   packages/libdb4.2-ruby/trunk/debian/in.postinst
   packages/libdb4.2-ruby/trunk/debian/in.prerm
   packages/libdb4.2-ruby/trunk/debian/postinst.debhelper
   packages/libdb4.2-ruby/trunk/debian/prerm.debhelper
   packages/libdb4.2-ruby/trunk/debian/rules
Modified:
   packages/libdb4.2-ruby/trunk/src/common.c
   packages/libdb4.2-ruby/trunk/src/recnum.c
   packages/libdb4.2-ruby/trunk/src/sequence.c
Log:
[svn-inject] Applying Debian modifications to trunk


Property changes on: packages/libdb4.2-ruby/trunk/debian
___________________________________________________________________
Name: mergeWithUpstream
   + 1

Added: packages/libdb4.2-ruby/trunk/debian/.template/changelog
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/changelog	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/changelog	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,182 @@
+libdb4.3-ruby (0.5.8-1) unstable; urgency=low
+
+  * New upstream release
+  * dropped ruby1.6 support. (Closes: #367920)
+  * fixed: implicitly converted pointer (Closes: #323103)
+
+ -- akira yamada <akira at debian.org>  Mon,  5 Jun 2006 11:56:49 +0900
+
+libdb4.2-ruby (0.5.8-1) unstable; urgency=low
+
+  * New upstream release
+  * dropped ruby1.6 support. (Closes: #367921)
+  * fixed: implicitly converted pointer (Closes: #323103)
+
+ -- akira yamada <akira at debian.org>  Mon,  5 Jun 2006 11:56:49 +0900
+
+libdb3-ruby (0.5.8-1) unstable; urgency=low
+
+  * New upstream release
+  * dropped ruby1.6 support. (Closes: #367922)
+
+ -- akira yamada <akira at debian.org>  Mon,  5 Jun 2006 11:56:49 +0900
+
+libdb4.3-ruby (0.5.6-1) unstable; urgency=low
+
+  * new upstream version.
+  * added libdb4.3-ruby1.9.
+
+ -- akira yamada <akira at debian.org>  Fri, 12 Aug 2005 13:55:53 +0900
+
+libdb4.2-ruby (0.5.6-1) unstable; urgency=low
+
+  * new upstream version.
+  * added libdb4.2-ruby1.9.
+
+ -- akira yamada <akira at debian.org>  Fri, 12 Aug 2005 13:55:53 +0900
+
+libdb3-ruby (0.5.6-1) unstable; urgency=low
+
+  * new upstream version.
+  * added libdb3-ruby1.9.
+
+ -- akira yamada <akira at debian.org>  Fri, 12 Aug 2005 13:55:53 +0900
+
+libdb4.3-ruby (0.5.3-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- akira yamada <akira at debian.org>  Mon,  6 Dec 2004 21:03:08 +0900
+
+libdb4.2-ruby (0.5.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Mon,  6 Dec 2004 21:03:08 +0900
+
+libdb4.1-ruby (0.5.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Mon,  6 Dec 2004 21:03:08 +0900
+
+libdb3-ruby (0.5.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Mon,  6 Dec 2004 21:03:08 +0900
+
+libdb2-ruby (0.5.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Mon,  6 Dec 2004 21:03:08 +0900
+
+libdb2-ruby (0.5.1-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Wed, 11 Aug 2004 10:32:55 +0900
+
+libdb3-ruby (0.5.1-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Wed, 11 Aug 2004 10:32:55 +0900
+
+libdb4.1-ruby (0.5.1-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Wed, 11 Aug 2004 10:32:55 +0900
+
+libdb4.2-ruby (0.5.1-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- akira yamada <akira at debian.org>  Wed, 11 Aug 2004 10:32:55 +0900
+
+libdb4.1-ruby (0.4.8-1) unstable; urgency=low
+
+  * new upstream version.
+  * new sub-package libdb4.1-ruby1.6.
+      - renamed to libdb4.1-ruby1.6 from libdb4.1-ruby.  Conflicts/Replaces:
+        libdb4.1-ruby.
+      - it provides alternatives 'bdb-1.6.rb' for /usr/lib/ruby/1.6/bdb.rb.
+  * new sub-package libdb4.1-ruby1.8.
+      - it provides alternatives 'bdb-1.8.rb' for /usr/lib/ruby/1.8/bdb.rb.
+
+ -- akira yamada <akira at debian.org>  Wed, 10 Sep 2003 12:13:36 +0900
+
+libdb3-ruby (0.4.8-1) unstable; urgency=low
+
+  * new upstream version.
+  * new sub-package libdb3-ruby1.6.
+      - renamed to libdb3-ruby1.6 from libdb3-ruby.  Conflicts/Replaces:
+        libdb3-ruby.
+      - it provides alternatives 'bdb-1.6.rb' for /usr/lib/ruby/1.6/bdb.rb.
+  * new sub-package libdb3-ruby1.8.
+      - it provides alternatives 'bdb-1.8.rb' for /usr/lib/ruby/1.8/bdb.rb.
+
+ -- akira yamada <akira at debian.org>  Wed, 10 Sep 2003 12:13:36 +0900
+
+libdb2-ruby (0.4.8-1) unstable; urgency=low
+
+  * new upstream version.
+  * new sub-package libdb2-ruby1.6.
+      - renamed to libdb2-ruby1.6 from libdb2-ruby.  Conflicts/Replaces:
+        libdb2-ruby.
+      - it provides alternatives 'bdb-1.6.rb' for /usr/lib/ruby/1.6/bdb.rb.
+  * new sub-package libdb2-ruby1.8.
+      - it provides alternatives 'bdb-1.8.rb' for /usr/lib/ruby/1.8/bdb.rb.
+
+ -- akira yamada <akira at debian.org>  Wed, 10 Sep 2003 12:13:36 +0900
+
+libdb2-ruby (0.4.5-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Fri, 25 Jul 2003 21:03:06 +0900
+
+libdb3-ruby (0.4.5-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Fri, 25 Jul 2003 21:03:06 +0900
+
+libdb4.1-ruby (0.4.5-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Fri, 25 Jul 2003 21:03:06 +0900
+
+libdb2-ruby (0.4.1-1) unstable; urgency=low
+
+  * upload to Debian, closes: #189141.
+
+ -- akira yamada <akira at debian.org>  Sat, 26 Apr 2003 16:47:25 +0900
+
+libdb3-ruby (0.4.1-1) unstable; urgency=low
+
+  * upload to Debian, closes: #189375.
+
+ -- akira yamada <akira at debian.org>  Sat, 26 Apr 2003 16:42:33 +0900
+
+libdb4.1-ruby (0.4.1-1) unstable; urgency=low
+
+  * upload to Debian, closes: #189143.
+
+ -- akira yamada <akira at debian.org>  Sat, 26 Apr 2003 16:36:07 +0900
+
+libdb-ruby (0.4.1-0.2) unstable; urgency=low
+
+  * Conflicts/Replaces with libdb-ruby.
+
+ -- akira yamada <akira at debian.org>  Wed, 23 Apr 2003 20:15:21 +0900
+
+libdb-ruby (0.4.1-0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- akira yamada <akira at debian.org>  Thu, 17 Apr 2003 18:14:47 +0900
+

Added: packages/libdb4.2-ruby/trunk/debian/.template/config.rb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/config.rb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/config.rb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,27 @@
+require 'rbconfig'
+
+DebBdbConfig = Struct.new('DebBdbConfig_', :priority, :extconf_opt)
+table = {
+  # sfx => config
+  '2'   => DebBdbConfig.new(15, '--with-db-version=2'),
+  '3'   => DebBdbConfig.new(20, '--with-db-version=-3'),
+  '4.1' => DebBdbConfig.new(15, '--with-db-version=-4.1'),
+  '4.2' => DebBdbConfig.new(30, '--with-db-version=-4.2'),
+  '4.3' => DebBdbConfig.new(40, '--with-db-version=-4.3'),
+}
+
+base_dir = File.basename(File.dirname(File.dirname(Dir.pwd)))
+
+$bdb_version = base_dir.gsub(/^libdb|-ruby-[^-]+$/, '')
+raise "ERROR: $bdb_version = #{$bdb_version}" unless /^[.\d]+$/ =~ $bdb_version
+
+$bdb_priority = table[$bdb_version].priority
+raise "ERROR: $bdb_priority = nil" unless $bdb_priority
+
+$so_postfix = $bdb_version.gsub(/\./, '')
+raise "ERROR: $so_postfix = #{$so_postfix}" unless /^\d+$/ =~ $so_postfix
+
+$extconf_opt = table[$bdb_version].extconf_opt
+raise "ERROR: $extconf_opt = nil" unless $extconf_opt
+
+$ruby_libdir = Config::CONFIG['rubylibdir']

Added: packages/libdb4.2-ruby/trunk/debian/.template/control.erb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/control.erb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/control.erb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,24 @@
+<% require './config' %>Source: libdb<%= $bdb_version %>-ruby
+Section: interpreters
+Priority: optional
+Maintainer: akira yamada <akira at debian.org>
+Build-Depends: debhelper (>> 4.0.0), libdb<%= $bdb_version %>-dev, ruby1.8, ruby1.8-dev, ruby1.9, ruby1.9-dev
+Standards-Version: 3.6.2
+
+Package: libdb<%= $bdb_version %>-ruby1.8
+Architecture: any
+Depends: ${shlibs:Depends} ${misc:Depends}
+Description: Interface to Berkeley DB for Ruby 1.8
+ BDB is an interface to Berkeley DB, distributed by Sleepycat
+ (http://www.sleepycat.com/).
+ .
+ This package provides BDB linked to libdb<%= $bdb_version %>.
+
+Package: libdb<%= $bdb_version %>-ruby1.9
+Architecture: any
+Depends: ${shlibs:Depends} ${misc:Depends}
+Description: Interface to Berkeley DB for Ruby 1.9
+ BDB is an interface to Berkeley DB, distributed by Sleepycat
+ (http://www.sleepycat.com/).
+ .
+ This package provides BDB linked to libdb<%= $bdb_version %>.

Added: packages/libdb4.2-ruby/trunk/debian/.template/in.README.Debian.erb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/in.README.Debian.erb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/in.README.Debian.erb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,28 @@
+Ruby/BDB for Debian
+-------------------
+
+Debian Specific Changes:
+
+libdb3-ruby@@ver@@, libdb4.2-ruby@@ver@@ and libdb4.3-ruby@@ver@@ provides
+Ruby/BDB. 
+
+Ruby/BDB originally provides bdb.so, but these Debian packages provide
+bdb3.so, bdb42.so or bdb43.so.  These packages also provides bdb3.rb,
+bdb42.rb or bdb43.rb. These ".rb" files contains "require 'bdbX.so'".  (here
+X is 3, 42 or 43.)  And bdb.rb are also provided as symbolic link that
+points to the ".rb" file.  You can configure the symbolic link by
+update-alternatives command.
+
+  # update-alternatives --config bdb-@@ver@@.rb
+
+And Then you can use Ruby/BDB by follows:
+
+  require 'bdb'
+
+If you want to load bdb that links to specific version of Berkelay DB, then:
+
+  require 'bdbX' # X is 3, 42 or 43.
+
+Note: You can not load a bdb with any other version of bdb.
+
+ -- akira yamada <akira at debian.org>  Fri, 12 Aug 2005 13:55:53 +0900

Added: packages/libdb4.2-ruby/trunk/debian/.template/in.doc-base.erb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/in.doc-base.erb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/in.doc-base.erb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,12 @@
+<% require './config' %>Document: libdb<%= $bdb_version %>-ruby@@ver@@
+Title: Debian libdb<%= $bdb_version %>-ruby@@ver@@ Manual
+Author: Guy Decoux
+Abstract: This manual describes what libdb<%= $bdb_version %>-ruby@@ver@@ is
+ and how it can be used to.
+Section: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/libdb<%= $bdb_version %>-ruby@@ver@@/bdb.html
+Files: /usr/share/doc/libdb<%= $bdb_version %>-ruby@@ver@@/*.html
+
+  

Added: packages/libdb4.2-ruby/trunk/debian/.template/in.postinst.erb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/in.postinst.erb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/in.postinst.erb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,6 @@
+<% require './config' %>#!/bin/sh -e
+
+update-alternatives \
+  --install @@libdir@@/bdb.rb bdb-@@ver@@.rb @@libdir@@/bdb<%= $so_postfix %>.rb <%= $bdb_priority %>
+
+#DEBHELPER#

Added: packages/libdb4.2-ruby/trunk/debian/.template/in.prerm.erb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/in.prerm.erb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/in.prerm.erb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,9 @@
+<% require './config' %>#!/bin/sh -e
+
+if [ "$1" = remove ] || [ "$1" = deconfigure ]
+then
+  update-alternatives \
+    --remove bdb-@@ver@@.rb @@libdir@@/bdb<%= $so_postfix %>.rb
+fi
+
+#DEBHELPER#

Added: packages/libdb4.2-ruby/trunk/debian/.template/rules.erb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/rules.erb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/rules.erb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,134 @@
+<% require './config' %>#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+#export DH_VERBOSE=1
+#export DH_COMPAT=4
+
+src_name    = $(shell dpkg-parsechangelog | sed -ne '/^Source:/s/.*:[ 	]*//p')
+bdb_version = $(patsubst libdb%-ruby,%,$(src_name))
+
+so_base     = bdb
+so_postfix  = $(subst .,,$(bdb_version))
+so_mkflag   = CC="gcc -DInit_$(so_base)=Init_$(so_base)$(so_postfix)"
+
+dest_dir    = $(CURDIR)/debian/libdb$(bdb_version)-ruby
+
+rb18_libdir = $(shell ruby1.8 -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
+rb18_archdir= $(shell ruby1.8 -rrbconfig -e 'print Config::CONFIG["archdir"]')
+rb19_libdir = $(shell ruby1.9 -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
+rb19_archdir= $(shell ruby1.9 -rrbconfig -e 'print Config::CONFIG["archdir"]')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+
+	-rm -rf build-tree-{1.8,1.9}
+	tar -zcf debian/src.tgz $(filter-out debian,$(wildcard *))
+
+	mkdir build-tree-{1.8,1.9}
+
+	tar -C build-tree-1.8 -zxf debian/src.tgz
+	tar -C build-tree-1.9 -zxf debian/src.tgz
+
+	ruby1.8 -C build-tree-1.8 extconf.rb <%= $extconf_opt %>
+	ruby1.9 -C build-tree-1.9 extconf.rb <%= $extconf_opt %>
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-stamp: configure-stamp 
+	dh_testdir
+
+	$(MAKE) -C build-tree-1.8 $(so_mkflag)
+	$(MAKE) -C build-tree-1.9 $(so_mkflag)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	-rm -rf build-tree-{1.8,1.9}
+	-rm -f debian/bdb.html debian/bdb.rd
+	-rm -f debian/libdb$(bdb_version)-ruby*.{postinst,prerm,doc-base,README.Debian}
+	-rm -f debian/src.tgz
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/libdb4.1-ruby.
+	$(MAKE) -C build-tree-1.8 install RUBYARCHDIR=$(dest_dir)1.8$(rb18_archdir)
+	$(MAKE) -C build-tree-1.9 install RUBYARCHDIR=$(dest_dir)1.9$(rb19_archdir)
+
+	cd $(dest_dir)1.8$(rb18_archdir) && \
+	  mv -f $(so_base).so $(so_base)$(so_postfix).so
+	cd $(dest_dir)1.9$(rb19_archdir) && \
+	  mv -f $(so_base).so $(so_base)$(so_postfix).so
+
+	(echo "# This file is hack only for Debian System."; \
+	 echo "require '$(so_base)$(so_postfix).so'") \
+	> $(dest_dir)1.8$(rb18_libdir)/$(so_base)$(so_postfix).rb
+	(echo "# This file is hack only for Debian System."; \
+	 echo "require '$(so_base)$(so_postfix).so'") \
+	> $(dest_dir)1.9$(rb19_libdir)/$(so_base)$(so_postfix).rb
+
+	for f in debian/in.*; \
+	do \
+	  sed -e 's!@@ver@@!1.8!g' \
+	      -e 's!@@libdir@@!$(rb18_libdir)!g' \
+	  < $$f > debian/libdb$(bdb_version)-ruby1.8.`basename $$f | sed -e 's!^in\.!!'`; \
+	  sed -e 's!@@ver@@!1.9!g' \
+	      -e 's!@@libdir@@!$(rb19_libdir)!g' \
+	  < $$f > debian/libdb$(bdb_version)-ruby1.9.`basename $$f | sed -e 's!^in\.!!'`; \
+	done
+
+	sed -e 's/\(((<.*|URL:\)docs\/\(.*\.html.*>))\)/\1\2/g' \
+	  < bdb.rd > debian/bdb.rd
+	sed -e 's/\(<a href="\)docs\/\(.*\.html.*">\)/\1\2/g' \
+	  < bdb.html > debian/bdb.html
+
+# 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 Changes
+	dh_installdocs -A README* debian/bdb.html debian/bdb.rd docs/*
+	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_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	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 configure

Added: packages/libdb4.2-ruby/trunk/debian/.template/update.rb
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/.template/update.rb	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/.template/update.rb	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,33 @@
+#!/usr/bin/ruby
+Dir.chdir(File.dirname($0))
+require './config'
+require 'eruby'
+
+# generate control files.
+compiler = ERuby::Compiler.new
+Dir['*.erb'].each do |file|
+  target = File.join('..', file.sub(/\.erb$/, ''))
+
+  code = open(file, 'r') do |i|
+    compiler.compile_file(i)
+  end
+  open(target, 'w') do |o|
+    eval(code, o.instance_eval {binding})
+  end
+end
+
+# fixed package name in chagnelog
+newlog = ''
+open('changelog', 'r') do |io|
+  log = io.read
+  log.scan(/^(libdb)([.\d]*)(-ruby\s+)(.*?)(?=^\S|\z)/m) do
+    if $2 && $2 == $bdb_version
+      newlog << $&
+    elsif (!$2 or $2.empty?) && ['2', '3', '4.1'].include?($bdb_version)
+      newlog << $1 + $bdb_version + $3 + $4
+    end
+  end
+end
+open(File.join('..', 'changelog'), 'w') do |io|
+  io.print newlog
+end

Added: packages/libdb4.2-ruby/trunk/debian/changelog
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/changelog	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/changelog	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,27 @@
+libdb4.2-ruby (0.5.8-1) unstable; urgency=low
+
+  * New upstream release
+  * dropped ruby1.6 support. (Closes: #367921)
+  * fixed: implicitly converted pointer (Closes: #323103)
+
+ -- akira yamada <akira at debian.org>  Mon,  5 Jun 2006 11:56:49 +0900
+
+libdb4.2-ruby (0.5.6-1) unstable; urgency=low
+
+  * new upstream version.
+  * added libdb4.2-ruby1.9.
+
+ -- akira yamada <akira at debian.org>  Fri, 12 Aug 2005 13:55:53 +0900
+
+libdb4.2-ruby (0.5.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- akira yamada <akira at debian.org>  Mon,  6 Dec 2004 21:03:08 +0900
+
+libdb4.2-ruby (0.5.1-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- akira yamada <akira at debian.org>  Wed, 11 Aug 2004 10:32:55 +0900
+

Added: packages/libdb4.2-ruby/trunk/debian/compat
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/compat	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/compat	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1 @@
+4

Added: packages/libdb4.2-ruby/trunk/debian/control
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/control	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/control	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,24 @@
+Source: libdb4.2-ruby
+Section: interpreters
+Priority: optional
+Maintainer: akira yamada <akira at debian.org>
+Build-Depends: debhelper (>> 4.0.0), libdb4.2-dev, ruby1.8, ruby1.8-dev, ruby1.9, ruby1.9-dev
+Standards-Version: 3.6.2
+
+Package: libdb4.2-ruby1.8
+Architecture: any
+Depends: ${shlibs:Depends} ${misc:Depends}
+Description: Interface to Berkeley DB for Ruby 1.8
+ BDB is an interface to Berkeley DB, distributed by Sleepycat
+ (http://www.sleepycat.com/).
+ .
+ This package provides BDB linked to libdb4.2.
+
+Package: libdb4.2-ruby1.9
+Architecture: any
+Depends: ${shlibs:Depends} ${misc:Depends}
+Description: Interface to Berkeley DB for Ruby 1.9
+ BDB is an interface to Berkeley DB, distributed by Sleepycat
+ (http://www.sleepycat.com/).
+ .
+ This package provides BDB linked to libdb4.2.

Added: packages/libdb4.2-ruby/trunk/debian/copyright
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/copyright	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/copyright	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,75 @@
+This package was debianized by akira yamada <akira at debian.org> on
+Thu, 17 Apr 2003 18:14:47 +0900.
+
+It was downloaded from <URL:ftp://moulon.inra.fr/pub/ruby/>
+
+Upstream Author: Guy Decoux <ts at moulon.inra.fr>
+
+Copyright:
+
+Ruby's.
+
+Ruby's License:
+
+Ruby is copyrighted free software by Yukihiro Matsumoto <matz at netlab.jp>.
+You can redistribute it and/or modify it under either the terms of the GPL
+(see the file GPL), or the conditions below:
+
+  1. You may make and give away verbatim copies of the source form of the
+     software without restriction, provided that you duplicate all of the
+     original copyright notices and associated disclaimers.
+
+  2. You may modify your copy of the software in any way, provided that
+     you do at least ONE of the following:
+
+       a) place your modifications in the Public Domain or otherwise
+          make them Freely Available, such as by posting said
+	  modifications to Usenet or an equivalent medium, or by allowing
+	  the author to include your modifications in the software.
+
+       b) use the modified software only within your corporation or
+          organization.
+
+       c) give non-standard binaries non-standard names, with
+          instructions on where to get the original software distribution.
+
+       d) make other distribution arrangements with the author.
+
+  3. You may distribute the software in object code or binary form,
+     provided that you do at least ONE of the following:
+
+       a) distribute the binaries and library files of the software,
+	  together with instructions (in the manual page or equivalent)
+	  on where to get the original distribution.
+
+       b) accompany the distribution with the machine-readable source of
+	  the software.
+
+       c) give non-standard binaries non-standard names, with
+          instructions on where to get the original software distribution.
+
+       d) make other distribution arrangements with the author.
+
+  4. You may modify and include the part of the software into any other
+     software (possibly commercial).  But some files in the distribution
+     are not written by the author, so that they are not under these terms.
+
+     For the list of those files and their copying conditions, see the
+     file LEGAL.
+
+  5. The scripts and library files supplied as input to or produced as 
+     output from the software do not automatically fall under the
+     copyright of the software, but belong to whomever generated them, 
+     and may be sold commercially, and may be aggregated with this
+     software.
+
+  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+     PURPOSE.
+
+GNU General Public License:
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+

Added: packages/libdb4.2-ruby/trunk/debian/in.README.Debian
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/in.README.Debian	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/in.README.Debian	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,28 @@
+Ruby/BDB for Debian
+-------------------
+
+Debian Specific Changes:
+
+libdb3-ruby@@ver@@, libdb4.2-ruby@@ver@@ and libdb4.3-ruby@@ver@@ provides
+Ruby/BDB. 
+
+Ruby/BDB originally provides bdb.so, but these Debian packages provide
+bdb3.so, bdb42.so or bdb43.so.  These packages also provides bdb3.rb,
+bdb42.rb or bdb43.rb. These ".rb" files contains "require 'bdbX.so'".  (here
+X is 3, 42 or 43.)  And bdb.rb are also provided as symbolic link that
+points to the ".rb" file.  You can configure the symbolic link by
+update-alternatives command.
+
+  # update-alternatives --config bdb-@@ver@@.rb
+
+And Then you can use Ruby/BDB by follows:
+
+  require 'bdb'
+
+If you want to load bdb that links to specific version of Berkelay DB, then:
+
+  require 'bdbX' # X is 3, 42 or 43.
+
+Note: You can not load a bdb with any other version of bdb.
+
+ -- akira yamada <akira at debian.org>  Fri, 12 Aug 2005 13:55:53 +0900

Added: packages/libdb4.2-ruby/trunk/debian/in.doc-base
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/in.doc-base	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/in.doc-base	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,12 @@
+Document: libdb4.2-ruby@@ver@@
+Title: Debian libdb4.2-ruby@@ver@@ Manual
+Author: Guy Decoux
+Abstract: This manual describes what libdb4.2-ruby@@ver@@ is
+ and how it can be used to.
+Section: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/libdb4.2-ruby@@ver@@/bdb.html
+Files: /usr/share/doc/libdb4.2-ruby@@ver@@/*.html
+
+  

Added: packages/libdb4.2-ruby/trunk/debian/in.postinst
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/in.postinst	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/in.postinst	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+update-alternatives \
+  --install @@libdir@@/bdb.rb bdb-@@ver@@.rb @@libdir@@/bdb42.rb 30
+
+#DEBHELPER#

Added: packages/libdb4.2-ruby/trunk/debian/in.prerm
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/in.prerm	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/in.prerm	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if [ "$1" = remove ] || [ "$1" = deconfigure ]
+then
+  update-alternatives \
+    --remove bdb-@@ver@@.rb @@libdir@@/bdb42.rb
+fi
+
+#DEBHELPER#

Added: packages/libdb4.2-ruby/trunk/debian/postinst.debhelper
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/postinst.debhelper	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/postinst.debhelper	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,5 @@
+# Automatically added by dh_installdocs
+if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then
+	install-docs -i /usr/share/doc-base/libdb3-ruby1.8
+fi
+# End automatically added section

Added: packages/libdb4.2-ruby/trunk/debian/prerm.debhelper
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/prerm.debhelper	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/prerm.debhelper	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,6 @@
+# Automatically added by dh_installdocs
+if [ "$1" = remove ] || [ "$1" = upgrade ] && \
+   which install-docs >/dev/null 2>&1; then
+	install-docs -r libdb3-ruby1.8
+fi
+# End automatically added section

Added: packages/libdb4.2-ruby/trunk/debian/rules
===================================================================
--- packages/libdb4.2-ruby/trunk/debian/rules	                        (rev 0)
+++ packages/libdb4.2-ruby/trunk/debian/rules	2007-12-08 12:00:04 UTC (rev 2141)
@@ -0,0 +1,134 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+#export DH_VERBOSE=1
+#export DH_COMPAT=4
+
+src_name    = $(shell dpkg-parsechangelog | sed -ne '/^Source:/s/.*:[ 	]*//p')
+bdb_version = $(patsubst libdb%-ruby,%,$(src_name))
+
+so_base     = bdb
+so_postfix  = $(subst .,,$(bdb_version))
+so_mkflag   = CC="gcc -DInit_$(so_base)=Init_$(so_base)$(so_postfix)"
+
+dest_dir    = $(CURDIR)/debian/libdb$(bdb_version)-ruby
+
+rb18_libdir = $(shell ruby1.8 -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
+rb18_archdir= $(shell ruby1.8 -rrbconfig -e 'print Config::CONFIG["archdir"]')
+rb19_libdir = $(shell ruby1.9 -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
+rb19_archdir= $(shell ruby1.9 -rrbconfig -e 'print Config::CONFIG["archdir"]')
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+
+	-rm -rf build-tree-{1.8,1.9}
+	tar -zcf debian/src.tgz $(filter-out debian,$(wildcard *))
+
+	mkdir build-tree-{1.8,1.9}
+
+	tar -C build-tree-1.8 -zxf debian/src.tgz
+	tar -C build-tree-1.9 -zxf debian/src.tgz
+
+	ruby1.8 -C build-tree-1.8 extconf.rb --with-db-version=-4.2
+	ruby1.9 -C build-tree-1.9 extconf.rb --with-db-version=-4.2
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-stamp: configure-stamp 
+	dh_testdir
+
+	$(MAKE) -C build-tree-1.8 $(so_mkflag)
+	$(MAKE) -C build-tree-1.9 $(so_mkflag)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	-rm -rf build-tree-{1.8,1.9}
+	-rm -f debian/bdb.html debian/bdb.rd
+	-rm -f debian/libdb$(bdb_version)-ruby*.{postinst,prerm,doc-base,README.Debian}
+	-rm -f debian/src.tgz
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/libdb4.1-ruby.
+	$(MAKE) -C build-tree-1.8 install RUBYARCHDIR=$(dest_dir)1.8$(rb18_archdir)
+	$(MAKE) -C build-tree-1.9 install RUBYARCHDIR=$(dest_dir)1.9$(rb19_archdir)
+
+	cd $(dest_dir)1.8$(rb18_archdir) && \
+	  mv -f $(so_base).so $(so_base)$(so_postfix).so
+	cd $(dest_dir)1.9$(rb19_archdir) && \
+	  mv -f $(so_base).so $(so_base)$(so_postfix).so
+
+	(echo "# This file is hack only for Debian System."; \
+	 echo "require '$(so_base)$(so_postfix).so'") \
+	> $(dest_dir)1.8$(rb18_libdir)/$(so_base)$(so_postfix).rb
+	(echo "# This file is hack only for Debian System."; \
+	 echo "require '$(so_base)$(so_postfix).so'") \
+	> $(dest_dir)1.9$(rb19_libdir)/$(so_base)$(so_postfix).rb
+
+	for f in debian/in.*; \
+	do \
+	  sed -e 's!@@ver@@!1.8!g' \
+	      -e 's!@@libdir@@!$(rb18_libdir)!g' \
+	  < $$f > debian/libdb$(bdb_version)-ruby1.8.`basename $$f | sed -e 's!^in\.!!'`; \
+	  sed -e 's!@@ver@@!1.9!g' \
+	      -e 's!@@libdir@@!$(rb19_libdir)!g' \
+	  < $$f > debian/libdb$(bdb_version)-ruby1.9.`basename $$f | sed -e 's!^in\.!!'`; \
+	done
+
+	sed -e 's/\(((<.*|URL:\)docs\/\(.*\.html.*>))\)/\1\2/g' \
+	  < bdb.rd > debian/bdb.rd
+	sed -e 's/\(<a href="\)docs\/\(.*\.html.*">\)/\1\2/g' \
+	  < bdb.html > debian/bdb.html
+
+# 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 Changes
+	dh_installdocs -A README* debian/bdb.html debian/bdb.rd docs/*
+	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_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	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 configure


Property changes on: packages/libdb4.2-ruby/trunk/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/libdb4.2-ruby/trunk/src/common.c
===================================================================
--- packages/libdb4.2-ruby/trunk/src/common.c	2007-12-08 11:59:57 UTC (rev 2140)
+++ packages/libdb4.2-ruby/trunk/src/common.c	2007-12-08 12:00:04 UTC (rev 2141)
@@ -1826,7 +1826,7 @@
     if (val == Qundef) {
 	if (rb_block_given_p()) {
 	    if (argc > 1) {
-		rb_raise(rb_eArgError, "wrong # of arguments", argc);
+		rb_raise(rb_eArgError, "wrong # of arguments");
 	    }
 	    return rb_yield(key);
 	}
@@ -3109,8 +3109,12 @@
 
 #if RUBY_VERSION_CODE >= 172
     rb_warn("Common#%s is deprecated; use Common#values_at",
+#if RUBY_VERSION_CODE >= 190
+	    rb_id2name(rb_frame_this_func()));
+#else
 	    rb_id2name(rb_frame_last_func()));
 #endif
+#endif
     indexes = rb_ary_new2(argc);
     for (i = 0; i < argc; i++) {
 	RARRAY(indexes)->ptr[i] = bdb_get(1, &argv[i], obj);
@@ -3600,7 +3604,7 @@
 
 	for (dbs = dbcarr, i = 0; i < RARRAY(a)->len; i++, dbs++) {
 	    if (!rb_obj_is_kind_of(RARRAY(a)->ptr[i], bdb_cCursor)) {
-		rb_raise(bdb_eFatal, "element %d is not a cursor");
+		rb_raise(bdb_eFatal, "element %d is not a cursor", i);
 	    }
 	    GetCursorDB(RARRAY(a)->ptr[i], dbcst, tmp);
 	    *dbs = dbcst->dbc;
@@ -3800,7 +3804,11 @@
 	    iov = rb_convert_type(iov, T_FILE, "IO", "to_io");
 	    GetOpenFile(iov, fptr);
 	    rb_io_check_writable(fptr);
+#if RUBY_VERSION_CODE >= 190
+	    io = rb_io_stdio_file(fptr);
+#else
 	    io = GetWriteFile(fptr);
+#endif
 	}
 	break;
     case 0:

Modified: packages/libdb4.2-ruby/trunk/src/recnum.c
===================================================================
--- packages/libdb4.2-ruby/trunk/src/recnum.c	2007-12-08 11:59:57 UTC (rev 2140)
+++ packages/libdb4.2-ruby/trunk/src/recnum.c	2007-12-08 12:00:04 UTC (rev 2141)
@@ -148,13 +148,13 @@
     bdb_DB *dbst;
 
     GetDB(obj, dbst);
-    if (len < 0) rb_raise(rb_eIndexError, "negative length %d", len);
+    if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
     if (beg < 0) {
 	beg += dbst->len;
     }
     if (beg < 0) {
 	beg -= dbst->len;
-	rb_raise(rb_eIndexError, "index %d out of array", beg);
+	rb_raise(rb_eIndexError, "index %ld out of array", beg);
     }
     if (beg + len > dbst->len) {
 	len = dbst->len - beg;
@@ -241,7 +241,7 @@
     if (beg < 0) {
 	beg += dbst->len;
 	if (beg < 0) {
-	    rb_raise(rb_eIndexError, "index %d out of array",
+	    rb_raise(rb_eIndexError, "index %ld out of array",
 		     beg - dbst->len);
 	}
     }
@@ -581,8 +581,12 @@
 {
 #if RUBY_VERSION_CODE >= 172
     rb_warn("Recnum#%s is deprecated; use Recnum#values_at",
+#if RUBY_VERSION_CODE >= 190
+	    rb_id2name(rb_frame_this_func()));
+#else
 	    rb_id2name(rb_frame_last_func()));
 #endif
+#endif
     return bdb_sary_values_at(argc, argv, obj);
 }
 

Modified: packages/libdb4.2-ruby/trunk/src/sequence.c
===================================================================
--- packages/libdb4.2-ruby/trunk/src/sequence.c	2007-12-08 11:59:57 UTC (rev 2140)
+++ packages/libdb4.2-ruby/trunk/src/sequence.c	2007-12-08 12:00:04 UTC (rev 2141)
@@ -100,7 +100,7 @@
                                    NUM2LONG(RARRAY(value)->ptr[0]),
                                    NUM2LONG(RARRAY(value)->ptr[1]))) {
             seqst->seqp->remove(seqst->seqp, 0, 0);
-            rb_raise(rb_eArgError, "Invalid value (%d, %d) for set_range",
+            rb_raise(rb_eArgError, "Invalid value (%ld, %ld) for set_range",
                      NUM2LONG(RARRAY(value)->ptr[0]),
                      NUM2LONG(RARRAY(value)->ptr[1]));
         }




More information about the Pkg-ruby-extras-commits mailing list