[PATCH] debian: package ruby bindings
David Bremner
bremner at debian.org
Sun Apr 14 06:52:40 PDT 2013
Felipe Contreras <felipe.contreras at gmail.com> writes:
>
> diff --git a/debian/control b/debian/control
> index 854a32a..620c5ce 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -15,6 +15,7 @@ Build-Depends:
> libz-dev,
> python-all (>= 2.6.6-3~),
> python3-all (>= 3.1.2-7~),
> + ruby-dev,
> emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |
> emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
> gdb,
This doesn't build in a clean sid chroot, because ruby-dev does not
depend on ruby, so you need to explicitly add it.
> Package: notmuch-emacs
> Architecture: all
> Section: mail
> diff --git a/debian/notmuch-ruby.install b/debian/notmuch-ruby.install
> new file mode 100644
> index 0000000..f92f09c
> --- /dev/null
> +++ b/debian/notmuch-ruby.install
> @@ -0,0 +1 @@
> +usr/local/lib/site_ruby/*/*/notmuch.so
> diff --git a/debian/rules b/debian/rules
> index c4e3930..7c7247a 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -12,15 +12,24 @@ override_dh_auto_build:
> dh_auto_build
> dh_auto_build --sourcedirectory bindings/python
> cd bindings/python && $(python3_all) setup.py build
> + dh_auto_build --sourcedirectory bindings/ruby
> + cd bindings/ruby && ruby extconf.rb && make
Why are both these lines needed? On a related note, is the ruby build
procedure documented somewhere?
> override_dh_auto_clean:
> dh_auto_clean
> dh_auto_clean --sourcedirectory bindings/python
> cd bindings/python && $(python3_all) setup.py clean -a
> + dh_auto_build --sourcedirectory bindings/ruby
> + cd bindings/ruby && test -f Makefile && make clean || true
> $(MAKE) -C contrib/notmuch-mutt clean
This looks suspect, calling dh_auto_build from the clean target. The
clean target cannot assume that e.g. notmuch is already built.
> override_dh_auto_install:
> dh_auto_install
> dh_auto_install --sourcedirectory bindings/python
> cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp
> + dh_auto_build --sourcedirectory bindings/ruby
> + cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp
This call to dh_auto_build also confuses me. The top level sequencer
will ensure that the override_dh_auto_build is called before this one.
> +
> +# ruby's site is configured in /usr/local
> +override_dh_usrlocal:
The package is still installing files into /usr/local, which is a
violation of debian policy 9.1.2
It's a good idea to run "lintian" on the resulting debian packages;
that's how I caught the problem with /usr/local.
d
More information about the notmuch
mailing list