Re: [PATCH] debian: package ruby bindings

Subject: Re: [PATCH] debian: package ruby bindings

Date: Tue, 16 Apr 2013 13:38:57 -0500

To: David Bremner

Cc: notmuch@notmuchmail.org

From: Felipe Contreras


On Mon, Apr 15, 2013 at 5:24 AM, David Bremner <bremner@debian.org> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>> 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.
>>
>> Tell that to debian maintainers who configure ruby that way:
>
> [ ruby config deleted ]
>
> I don't know if there is a bug in the Debian ruby package or not, but
> that does not change whether our package is allowed to install into
> /usr/local.  I suspect the argument is that those defaults are sensible
> for admins installing ruby packages on their own systems without using
> the debian package system.

I asked the debian ruby packages and looked everywhere, but there was
no guidance at all. Nonetheless I think this does the trick:

--- a/debian/notmuch-ruby.install
+++ b/debian/notmuch-ruby.install
@@ -1 +1 @@
-usr/local/lib/site_ruby/*/*/notmuch.so
+usr/lib/ruby/vendor_ruby/*/*/notmuch.so
diff --git a/debian/rules b/debian/rules
index 1dd59d2..fed680b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ override_dh_auto_build:
        dh_auto_build
        dh_auto_build --sourcedirectory bindings/python
        cd bindings/python && $(python3_all) setup.py build
-       cd bindings/ruby && ruby extconf.rb && make
+       cd bindings/ruby && ruby extconf.rb --vendor && make
        $(MAKE) -C contrib/notmuch-mutt

 override_dh_auto_clean:

Cheers.

-- 
Felipe Contreras

Thread: