From 834207290c5d8c8061a61e41c3984ed13cff47f0 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 15 Apr 2013 10:52:40 +2100 Subject: [PATCH] Re: [PATCH] debian: package ruby bindings --- f5/0a1512cc8fa055777c349025b1ff6d6ffcc6f3 | 133 ++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 f5/0a1512cc8fa055777c349025b1ff6d6ffcc6f3 diff --git a/f5/0a1512cc8fa055777c349025b1ff6d6ffcc6f3 b/f5/0a1512cc8fa055777c349025b1ff6d6ffcc6f3 new file mode 100644 index 000000000..bd5f055de --- /dev/null +++ b/f5/0a1512cc8fa055777c349025b1ff6d6ffcc6f3 @@ -0,0 +1,133 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 338D9431FB6 + for ; Sun, 14 Apr 2013 06:53:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id HTNm4+xScrY9 for ; + Sun, 14 Apr 2013 06:53:20 -0700 (PDT) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id EEAF8431FAF + for ; Sun, 14 Apr 2013 06:53:19 -0700 (PDT) +Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net + ([156.34.82.78] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) + (envelope-from ) + id 1URNMq-0005hn-D1; Sun, 14 Apr 2013 10:53:16 -0300 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1URNMG-0005Ze-Md; Sun, 14 Apr 2013 10:52:40 -0300 +From: David Bremner +To: Felipe Contreras , notmuch@notmuchmail.org +Subject: Re: [PATCH] debian: package ruby bindings +In-Reply-To: <1365031678-25188-1-git-send-email-felipe.contreras@gmail.com> +References: <1365031678-25188-1-git-send-email-felipe.contreras@gmail.com> +User-Agent: Notmuch/0.15.2+73~g1c450ec (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-pc-linux-gnu) +Date: Sun, 14 Apr 2013 10:52:40 -0300 +Message-ID: <87y5clte1j.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-Spam_bar: - +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 14 Apr 2013 13:53:21 -0000 + +Felipe Contreras 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 + + -- 2.26.2