Hi all, I am working on #757464 "ruby-gnome2: Please provide rubygem meta-information".
As first step, I converted from debian/build to dh_ruby (see attached patch). AFAICS it builds same packages compared with using debian/build, but I think that "export make" and override_dh_auto_install are bit dirty trick. Any idea to clean up this? Then, it does not generate gemspecs yet. Because upstream tarball does not provide any gemspecs. * Request upstream to provide gemspecs. * Generate gemspecs by some own scripts. Which approach I should do? -- Regards, dai GPG Fingerprint = 0B29 D88E 42E6 B765 B8D8 EA50 7839 619D D439 668E
diff --git a/debian/build b/debian/build deleted file mode 100755 index 9046ada..0000000 --- a/debian/build +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -set -e -set -x - -if [ $# -ne 1 ]; then - echo "usage: $0 RUBY" - exit 1 -fi - -ruby="$1" - -libdir=$($ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendordir"]') -archdir=$($ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"]') -curdir=$(pwd) -pkgdir="$curdir/debian/tmp" - -echo "I: Building with $ruby" -echo "I: libdir = $libdir" -echo "I: archdir = $archdir" -echo "I: DESTDIR = $pkgdir" - -RUBYOPT='-Ku' $ruby extconf.rb - -make V=1 - -if [ "$ruby" = 'ruby2.0' ]; then - make install DESTDIR="$pkgdir" \ - sitelibdir="$libdir" sitearchdir="$archdir" -else - make install DESTDIR="$pkgdir" \ - sitelibdir='$(DESTDIR)'"$libdir" sitearchdir='$(DESTDIR)'"$archdir" -fi - -make distclean diff --git a/debian/control b/debian/control index 9785389..350ad67 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Uploaders: Arnaud Cornet <acor...@debian.org>, Michael Schutte <m.schutte...@gmail.com>, Antonio Terceiro <terce...@debian.org> Build-Depends: debhelper (>= 9.20151219), - gem2deb, + gem2deb (>= 0.4.1~), libgirepository1.0-dev, libgstreamer-plugins-base1.0-dev, libgstreamer1.0-dev, @@ -25,10 +25,26 @@ Standards-Version: 4.0.0 Homepage: http://ruby-gnome2.osdn.jp/ Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-gnome2.git Vcs-Git: https://anonscm.debian.org/git/pkg-ruby-extras/ruby-gnome2.git +XS-Ruby-Versions: all Testsuite: autopkgtest-pkg-ruby +Package: ruby-glib2 +Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: glib2 +Depends: ruby | ruby-interpreter, + ${misc:Depends}, + ${shlibs:Depends} +Multi-Arch: same +Description: GLib 2 bindings for the Ruby language + GLib is a useful general-purpose C library, notably used by GTK+ and GNOME. + This package contains libraries for using GLib 2 with the Ruby programming + language. It is most likely useful in conjunction with Ruby bindings for + other libraries such as GTK+. + Package: ruby-atk Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Depends: gir1.2-atk-1.0, ruby | ruby-interpreter, ruby-gobject-introspection (>= ${source:Version}), @@ -44,6 +60,8 @@ Description: ATK bindings for the Ruby language Package: ruby-cairo-gobject Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: cairo-gobject Depends: ruby | ruby-interpreter, ruby-cairo, ruby-glib2 (= ${binary:Version}), @@ -59,6 +77,7 @@ Description: CairoGObject bindings for the Ruby language Package: ruby-clutter Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Priority: extra Depends: gir1.2-clutter-1.0, ruby | ruby-interpreter, @@ -77,6 +96,7 @@ Description: Clutter bindings for the Ruby language Package: ruby-clutter-gdk Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Priority: extra Depends: gir1.2-clutter-1.0, ruby | ruby-interpreter, @@ -90,6 +110,7 @@ Description: Clutter-Gdk bindings for the Ruby language Package: ruby-clutter-gtk Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Priority: extra Depends: gir1.2-gtkclutter-1.0, ruby | ruby-interpreter, @@ -108,6 +129,7 @@ Description: Clutter-Gtk bindings for the Ruby language Package: ruby-gdk-pixbuf2 Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, gir1.2-gdkpixbuf-2.0, ruby-gobject-introspection (>= ${source:Version}), @@ -120,6 +142,7 @@ Description: Gdk-Pixbuf 2 bindings for the Ruby language Package: ruby-gdk3 Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, ruby-atk (>= ${source:Version}), ruby-cairo-gobject (>= ${source:Version}), @@ -137,6 +160,8 @@ Description: GDK 3 bindings for the Ruby language Package: ruby-gio2 Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: gio2 Depends: gir1.2-glib-2.0, ruby-glib2 (= ${binary:Version}), ruby-gobject-introspection (= ${binary:Version}), @@ -147,20 +172,9 @@ Description: GIO bindings for the Ruby language GIO is a I/O stack for GLIB/GTK+ applications. This package provides GIO bindings to be used in Ruby programs. -Package: ruby-glib2 -Architecture: any -Depends: ruby | ruby-interpreter, - ${misc:Depends}, - ${shlibs:Depends} -Multi-Arch: same -Description: GLib 2 bindings for the Ruby language - GLib is a useful general-purpose C library, notably used by GTK+ and GNOME. - This package contains libraries for using GLib 2 with the Ruby programming - language. It is most likely useful in conjunction with Ruby bindings for - other libraries such as GTK+. - Package: ruby-gnome2 Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Depends: ruby-atk, ruby-cairo-gobject, ruby-gdk-pixbuf2, @@ -199,6 +213,8 @@ Description: GNOME-related bindings for the Ruby language (development files) Package: ruby-gobject-introspection Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: gobject-introspection Depends: ruby | ruby-interpreter, ruby-glib2 (= ${binary:Version}), ${misc:Depends}, @@ -214,6 +230,8 @@ Description: GObject Introspection bindings for the Ruby language Package: ruby-gstreamer Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: gstreamer Depends: gir1.2-gstreamer-1.0, ruby-atk (>= ${source:Version}), ruby-gdk-pixbuf2 (>= ${source:Version}), @@ -230,6 +248,8 @@ Description: GStreamer bindings for the Ruby language Package: ruby-gtk2 Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: gtk2 Depends: ruby-atk (>= ${source:Version}), ruby-gdk-pixbuf2 (>= ${source:Version}), ruby-pango (= ${binary:Version}), @@ -242,6 +262,8 @@ Description: GTK+ 2 bindings for the Ruby language Package: ruby-gtk3 Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: gtk3 Depends: ruby | ruby-interpreter, ruby-atk (>= ${source:Version}), ruby-gdk3 (>= ${source:Version}), @@ -254,6 +276,8 @@ Description: GTK+ 3 bindings for the Ruby language Package: ruby-gtksourceview2 Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: gtksourceview2 Depends: ruby-gtk2 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} @@ -266,6 +290,7 @@ Description: GtkSourceView2 bindings for the Ruby language Package: ruby-gtksourceview3 Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, gir1.2-gtksource-3.0, ruby-gtk3 (>= ${source:Version}), @@ -279,6 +304,8 @@ Description: GtkSourceView3 bindings for the Ruby language Package: ruby-pango Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: pango Depends: ruby-cairo, ruby-glib2 (= ${binary:Version}), ${misc:Depends}, @@ -291,6 +318,8 @@ Description: Pango bindings for the Ruby language Package: ruby-poppler Architecture: any +XB-Ruby-Versions: ${ruby:Versions} +X-DhRuby-Root: poppler Depends: ruby | ruby-interpreter, ${misc:Depends}, ${shlibs:Depends} @@ -301,6 +330,7 @@ Description: Ruby bindings for the libpoppler-glib library Package: ruby-rsvg2 Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Depends: gir1.2-rsvg-2.0, ruby | ruby-interpreter, ruby-glib2 (>= ${source:Version}), @@ -316,6 +346,7 @@ Description: RSVG renderer bindings for the Ruby language Package: ruby-webkit2-gtk Architecture: all +XB-Ruby-Versions: ${ruby:Versions} Priority: extra Depends: gir1.2-webkit2-4.0, ruby | ruby-interpreter, diff --git a/debian/rules b/debian/rules index cff336b..5f375e1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,21 +1,26 @@ #!/usr/bin/make -f -%: - dh $@ - -override_dh_auto_configure: - #debian/check-upstream-versus-debian - dh_auto_configure -- $(shell dpkg-buildflags --export=configure) +export DESTDIR=$(CURDIR)/debian/tmp +export make=make V=1 DESTDIR='$(DESTDIR)' \ + sitelibdir='$(DESTDIR)$$(vendordir)' \ + sitearchdir='$(DESTDIR)$$(vendorarchdir)' -ruby_versions = $(shell dh_ruby --print-supported) +%: + dh $@ --buildsystem=ruby --with ruby -.PHONY: $(ruby_versions) +export VENDORDIR=usr/lib/ruby/vendor_ruby -override_dh_auto_install: $(ruby_versions) +override_dh_auto_install: dh_auto_install + -rm -fr $(CURDIR)/debian/ruby-glib2/$(VENDORDIR)/gnome2/ + -rm -f $(CURDIR)/debian/ruby-glib2/$(VENDORDIR)/glib-mkenums.rb + -rm -f $(CURDIR)/debian/ruby-glib2/$(VENDORDIR)/gnome2-raketask.rb + -rm -f $(CURDIR)/debian/ruby-glib2/$(VENDORDIR)/mkmf-gnome2.rb + -rm -f $(CURDIR)/debian/ruby-gobject-introspection/$(VENDORDIR)/gi.rb + -rm -f $(CURDIR)/debian/ruby-gstreamer/$(VENDORDIR)/gstreamer.rb -$(ruby_versions): - debian/build $@ +override_dh_installdocs: + dh_installdocs -XTODO override_dh_strip: for i in cairo-gobject gio2 glib2 gobject-introspection gstreamer gtk2 gtk3 gtksourceview2 pango poppler ; do \ @@ -32,7 +37,3 @@ override_dh_fixperms-arch: override_dh_compress: dh_compress -X.rb - -override_dh_shlibdeps: - dh_shlibdeps - dh_ruby_fixdepends
signature.asc
Description: PGP signature