[SCM] ruby-netcdf branch, master, updated. upstream/0.6.5-13-g3e8f19e

Youhei SASAKI uwabami at gfd-dennou.org
Thu Apr 28 12:20:59 UTC 2011


The following commit has been merged in the master branch:
commit 3e8f19ed8ed3912bdd71936e34cb5253892c0213
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Thu Apr 28 21:18:49 2011 +0900

    migrate for RubyInWheezy

diff --git a/debian/changelog b/debian/changelog
index e03ec8e..4cbbca2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+ruby-netcdf (0.6.5-2) unstable; urgency=low
+
+  * Bump standard-version: 3.9.2
+  * Update with files generated by dh-make-ruby:
+    - debian/rules
+    - debian/watch
+  * Updating the package as for the new Ruby practices
+    - Renaming binary package to ruby-netcdf, ruby-netcdf-dbg
+    - Migrate to gem2deb
+      - removed build dependency on cdbs and ruby-pkg-tools
+    - Added XS-Ruby-Versions field to debian/control
+  * debian/source/format: using '3.0 (quilt)'
+  * Added transitional packages in debian/control to allow smooth upgrades
+    from Squeeze.
+    - ruby-netcdf Provides, Replaces and Conflicts with past packages
+      - netcdf-ruby, netcdf-ruby1.8, netcdf-ruby1.9.1
+        netcdf-ruby1.8-dbg, netcdf-ruby1.9.1-dbg
+
+ -- Youhei SASAKI <uwabami at gfd-dennou.org>  Thu, 28 Apr 2011 20:57:04 +0900
+
 ruby-netcdf (0.6.5-1) unstable; urgency=low
 
   * Initial Release (Closes: #542144)
diff --git a/debian/control b/debian/control
index 3c58f24..cb4fa1c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,84 +3,81 @@ Section: ruby
 Priority: optional
 Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
 Uploaders: Youhei SASAKI <uwabami at gfd-dennou.org>
-Build-Depends: cdbs, debhelper (>= 7.0.50~ ), quilt,
-  ruby-pkg-tools, graphviz, 
-  libnetcdf-dev, 
-  libnarray-ruby1.8, libnarray-miss-ruby1.8, ruby1.8-dev, 
-  libnarray-ruby1.9.1, libnarray-miss-ruby1.9.1, ruby1.9.1-dev
-Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7.0.50~ ), gem2deb, libnetcdf-dev,  
+  libnarray-ruby1.8 | ruby-narray, libnarray-ruby1.9.1 | ruby-narray, 
+  libnarray-miss-ruby1.8 | ruby-narray-miss, libnarray-miss-ruby1.9.1 | ruby-narray-miss
+Standards-Version: 3.9.2
 DM-Upload-Allowed: yes
+XS-Ruby-Versions: all
 Vcs-Git: git://git.debian.org/pkg-grass/ruby-netcdf.git
 Vcs-Browser: http://git.debian.org/?p=pkg-grass/ruby-netcdf.git
 Homepage: http://ruby.gfd-dennou.org/products/ruby-netcdf
 
-Package: netcdf-ruby
+Package: ruby-netcdf
 Architecture: any
-Depends: netcdf-ruby1.8, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ruby-interpreter | ruby1.8
+Replaces: netcdf-ruby (<< 0.6.5-2~), netcdf-ruby1.8 (<< 0.6.5-2~), netcdf-ruby1.9.1 (<< 0.6.5-2~)
+Conflicts: netcdf-ruby (<< 0.6.5-2~), netcdf-ruby1.8 (<< 0.6.5-2~), netcdf-ruby1.9.1 (<< 0.6.5-2~)
+Provides: netcdf-ruby, netcdf-ruby1.8, netcdf-ruby1.9.1
 Description: Ruby interface of netCDF library
  RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
  which is an efficient multi-dimensional numeric array class for Ruby.
- .
- This package is dependency package, which depends on Debian's default
- Ruby version(currently 1.8.x).
 
-Package: netcdf-ruby1.8
+Package: ruby-netcdf-dbg
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libnarray-miss-ruby1.8
-Suggests: netcdf-bin
-Description: Ruby interface of netCDF library
- RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
- which is an efficient multi-dimensional numeric array class for Ruby.
- .
- This package is built for Ruby 1.8.
-
-Package: netcdf-ruby1.8-dbg
 Section: debug
 Priority: extra
-Architecture: any
-Depends: netcdf-ruby1.8 (=${binary:Version}), ${misc:Depends}
+Depends: ruby-netcdf ( =${binary:Version}), ${misc:Depends}
+Replaces: netcdf-ruby1.8-dbg (<< 0.6.5-2~), netcdf-ruby1.9.1-dbg (<< 0.6.5-2~)
+Conflicts: netcdf-ruby1.8-dbg (<< 0.6.5-2~), netcdf-ruby1.9.1-dbg (<< 0.6.5-2~)
+Provides: netcdf-ruby, netcdf-ruby1.8, netcdf-ruby1.9.1
 Description: Ruby interface of netCDF library
  RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
  which is an efficient multi-dimensional numeric array class for Ruby.
  .
- This package is built for Ruby 1.8.
- .
  This package is provided primarily to provide a backtrace with names
  in a debugger, this makes it somewhat easier to interpret core
  dumps.  Most people will not need this package.
 
+Package: netcdf-ruby
+Architecture: all
+Section: oldlibs
+Depends: ruby-netcdf, ${misc:Depends}
+Description: Ruby interface of netCDF library
+ This is a transitional package to ease upgrades to the ruby-netcdf
+ package. It can safely be removed.
+
+Package: netcdf-ruby1.8
+Architecture: all
+Section: oldlibs
+Depends: ruby-netcdf, ${misc:Depends}
+Description: Ruby interface of netCDF library
+ This is a transitional package to ease upgrades to the ruby-netcdf
+ package. It can safely be removed.
+
+Package: netcdf-ruby1.8-dbg
+Architecture: all
+Section: oldlibs
+Priority: extra
+Depends: ruby-netcdf-dbg, ${misc:Depends}
+Description: Ruby interface of netCDF library
+ This is a transitional package to ease upgrades to the ruby-netcdf
+ package. It can safely be removed.
+
 Package: netcdf-ruby1.9.1
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, 
- ruby1.9.1, libnarray-miss-ruby1.9.1
-Suggests: netcdf-bin
+Architecture: all
+Section: oldlibs
+Depends: ruby-netcdf, ${misc:Depends}
 Description: Ruby interface of netCDF library
- RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
- which is an efficient multi-dimensional numeric array class for Ruby.
- .
- This package is built for Ruby 1.9.1
+ This is a transitional package to ease upgrades to the ruby-netcdf
+ package. It can safely be removed.
 
 Package: netcdf-ruby1.9.1-dbg
-Section: debug
+Architecture: all
+Section: oldlibs
 Priority: extra
-Architecture: any
-Depends: netcdf-ruby1.9.1 ( =${binary:Version}), ${misc:Depends}
+Depends: ruby-netcdf-dbg, ${misc:Depends}
 Description: Ruby interface of netCDF library
- RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
- which is an efficient multi-dimensional numeric array class for Ruby.
- .
- This package is built for Ruby 1.9.1
- .
- This package is provided primarily to provide a backtrace with names
- in a debugger, this makes it somewhat easier to interpret core
- dumps.  Most people will not need this package.
+ This is a transitional package to ease upgrades to the ruby-netcdf
+ package. It can safely be removed.
 
-Package: netcdf-ruby-doc
-Section: doc
-Architecture: all
-Depends: ${misc:Depends}
-Description: Documents and example scripts of netcdf-ruby
- RubyNetCDF is a Ruby interface of netCDF library built on the NArray library,
- which is an efficient multi-dimensional numeric array class for Ruby.
- .
- This package provides all API documents and example scripts 
diff --git a/debian/patches/ChangeTestPath b/debian/patches/ChangeTestPath
index 169eb9b..b887c40 100644
--- a/debian/patches/ChangeTestPath
+++ b/debian/patches/ChangeTestPath
@@ -1,15 +1,35 @@
---- ruby-netcdf.orig/extconf.rb
-+++ ruby-netcdf/extconf.rb
-@@ -111,9 +111,9 @@
+--- ruby-netcdf-0.6.5.orig/extconf.rb
++++ ruby-netcdf-0.6.5/extconf.rb
+@@ -108,12 +108,11 @@ oldmkfl.each_line{ |line|
+    case(line)
+    when /^distclean:/
+       newmkfl.puts(line)
++      newmkfl.puts("\t\t@$(RM) -fr test-lib")
        newmkfl.puts("\t\t@$(RM) *.nc demo/*.nc demo/*~ lib/*~ doc/*~ test/*.nc test/*~ Makefile.orig")
     when /^all:/
        newmkfl.puts(line)
 -      newmkfl.puts("")         
 -      newmkfl.puts("test: all")            # insert the "test" target
 -      newmkfl.puts("\t\t at cd test && ruby test.rb && echo 'test did not fail :-p (please ignore the warnings)' && cd ..") 
-+      newmkfl.puts("\t\t -@( [ ! -d lib/numru ] && (mkdir -p lib/numru && cd lib/numru && ln -s ../../netcdfraw.so )) ")
-+      newmkfl.puts("\t\t @(cd test && /usr/bin/ruby$(CDBS_RUBY_VER) -I../lib test.rb 1>/dev/null )")
-+      newmkfl.puts("\t\t -@( rm -rf lib/numru )")
++      newmkfl.puts("\t\t-@( [ ! -d test-lib ] && (mkdir -p test-lib/numru && cd test-lib/numru && ln -s ../../netcdfraw.so && ln -s ../../lib/*.rb . ))")
     when /lib\/netcdf/
        line = line.chomp! + "/"
        newmkfl.puts(line)
+--- ruby-netcdf-0.6.5.orig/test/test.rb
++++ ruby-netcdf-0.6.5/test/test.rb
+@@ -1,13 +1,9 @@
+-##require 'numru/netcdf' 
+-## // to test before make install -->
+ require 'narray'
+-require '../netcdfraw'  
+-require '../lib/netcdf'
+-## <-- to test before make install //
++require 'numru/netcdf'
+ 
+ include NumRu
+ 
+-filename = "test.nc"
++filename = "test/test.nc"
+ print "creating ",filename,"...\n"
+ file=NetCDF.create(filename,false,false)
+ 
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
new file mode 100644
index 0000000..6b205e4
--- /dev/null
+++ b/debian/ruby-tests.rb
@@ -0,0 +1 @@
+system("#{ENV['RUBY_TEST_BIN']} -Itest-lib test/test.rb 1>/dev/null")
diff --git a/debian/rules b/debian/rules
index 5c4e5bc..f6aec6f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,33 +1,29 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-include /usr/share/ruby-pkg-tools/1/class/ruby-common.mk
 
+%:
+	dh $@ --buildsystem ruby --with ruby
 
-NETCDF_RUBY_VERSIONS= 1.8 1.9.1
-LIB_PACKAGE_FILTER = %-ruby $(patsubst %,\%-ruby%,$(NETCDF_RUBY_VERSIONS))
-DEB_AUTO_CLEANUP_RCS := yes
-DEB_RUBY_SETUP_CMD = extconf.rb
-DEB_INSTALL_CHANGELOGS_ALL := ChangeLog
-DEB_INSTALL_DOCS_ruby-netcdf-doc :=  doc/*.rd
-cdbs_pkgdir = $(CURDIR)/debian/$(cdbs_curpkg)
-cdbs_ruby_libdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_LIBDIR)
-cdbs_ruby_archdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_ARCHDIR)
-DEB_RUBY_INSTALL_ARGS = DESTDIR=$(cdbs_pkgdir) \
-	sitelibdir=$(cdbs_ruby_libdir_ver) \
-        sitearchdir=$(cdbs_ruby_archdir_ver)
+override_dh_strip:
+	dh_strip --dbg-package=ruby-netcdf-dbg
 
-$(patsubst %,install/%,$(DEB_RUBY_REAL_LIB_PACKAGES)) :: install/% :
-	cd $(DEB_SRCDIR) 
-	[ ! -f Makefile ] || $(MAKE) distclean
-	/usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_RUBY_ARGS) $(DEB_RUBY_SETUP_CMD) $(DEB_RUBY_SETUP_ARGS)
-	CDBS_RUBY_VER=$(cdbs_ruby_ver) $(MAKE)
-	$(MAKE) install $(DEB_RUBY_INSTALL_ARGS)
+override_dh_installchangelogs:
+	dh_installchangelogs -A ChangeLog
 
-
-clean::
-	-[ ! -f Makefile ] || $(MAKE) distclean
-	-[ ! -f test/test.nc ] || rm -f test/test.nc
-	-[ ! -d lib/numru ] || rm -rf lib/numru
-	-rm -f debian/*.log
+# NETCDF_RUBY_VERSIONS= 1.8 1.9.1
+# LIB_PACKAGE_FILTER = %-ruby $(patsubst %,\%-ruby%,$(NETCDF_RUBY_VERSIONS))
+# DEB_AUTO_CLEANUP_RCS := yes
+# DEB_RUBY_SETUP_CMD = extconf.rb
+# DEB_INSTALL_CHANGELOGS_ALL := ChangeLog
+# DEB_INSTALL_DOCS_ruby-netcdf-doc :=  doc/*.rd
+# cdbs_pkgdir = $(CURDIR)/debian/$(cdbs_curpkg)
+# cdbs_ruby_libdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_LIBDIR)
+# cdbs_ruby_archdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_ARCHDIR)
+# DEB_RUBY_INSTALL_ARGS = DESTDIR=$(cdbs_pkgdir) \
+# 	sitelibdir=$(cdbs_ruby_libdir_ver) \
+#         sitearchdir=$(cdbs_ruby_archdir_ver)
+# clean::
+# 	-[ ! -f Makefile ] || $(MAKE) distclean
+# 	-[ ! -f test/test.nc ] || rm -f test/test.nc
+# 	-[ ! -d lib/numru ] || rm -rf lib/numru
+# 	-rm -f debian/*.log
diff --git a/extconf.rb b/extconf.rb
index da90b7c..eb27744 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -1,7 +1,7 @@
 require "mkmf"
 
-dir_config('narray',$sitearchdir,$sitearchdir)
-dir_config('netcdf','/usr/local')
+dir_config('narray',$archdir,$archdir)
+dir_config('netcdf','/usr/')
 
 if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
 print <<EOS
@@ -108,12 +108,11 @@ oldmkfl.each_line{ |line|
    case(line)
    when /^distclean:/
       newmkfl.puts(line)
+      newmkfl.puts("\t\t@$(RM) -fr test-lib")
       newmkfl.puts("\t\t@$(RM) *.nc demo/*.nc demo/*~ lib/*~ doc/*~ test/*.nc test/*~ Makefile.orig")
    when /^all:/
       newmkfl.puts(line)
-      newmkfl.puts("")         
-      newmkfl.puts("test: all")            # insert the "test" target
-      newmkfl.puts("\t\t at cd test && ruby test.rb && echo 'test did not fail :-p (please ignore the warnings)' && cd ..") 
+      newmkfl.puts("\t\t-@( [ ! -d test-lib ] && (mkdir -p test-lib/numru && cd test-lib/numru && ln -s ../../netcdfraw.so && ln -s ../../lib/*.rb . ))")
    when /lib\/netcdf/
       line = line.chomp! + "/"
       newmkfl.puts(line)
diff --git a/test/test.rb b/test/test.rb
index 7ec59c6..a95f73b 100644
--- a/test/test.rb
+++ b/test/test.rb
@@ -1,13 +1,9 @@
-##require 'numru/netcdf' 
-## // to test before make install -->
 require 'narray'
-require '../netcdfraw'  
-require '../lib/netcdf'
-## <-- to test before make install //
+require 'numru/netcdf'
 
 include NumRu
 
-filename = "test.nc"
+filename = "test/test.nc"
 print "creating ",filename,"...\n"
 file=NetCDF.create(filename,false,false)
 

-- 
Ruby interface of NetCDF library



More information about the Pkg-grass-devel mailing list