unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v2] debian: package ruby bindings
@ 2013-04-16 19:08 Felipe Contreras
  2013-05-16 13:51 ` David Bremner
  2013-05-23 11:44 ` David Bremner
  0 siblings, 2 replies; 7+ messages in thread
From: Felipe Contreras @ 2013-04-16 19:08 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 debian/control              | 14 ++++++++++++++
 debian/notmuch-ruby.install |  1 +
 debian/rules                |  3 +++
 3 files changed, 18 insertions(+)
 create mode 100644 debian/notmuch-ruby.install

diff --git a/debian/control b/debian/control
index 854a32a..c59d3ea 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, ruby-dev,
  emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |
  emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
  gdb,
@@ -89,6 +90,19 @@ Description: Python 3 interface to the notmuch mail search and index library
  This package provides a Python 3 interface to the notmuch
  functionality, directly interfacing with a shared notmuch library.
 
+Package: notmuch-ruby
+Architecture: any
+Section: ruby
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Ruby interface to the notmuch mail search and index library
+ Notmuch is a system for indexing, searching, reading, and tagging
+ large collections of email messages in maildir or mh format. It uses
+ the Xapian library to provide fast, full-text search with a very
+ convenient search syntax.
+ .
+ This package provides a Ruby interface to the notmuch
+ functionality, directly interfacing with a shared notmuch library.
+
 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..98e7050
--- /dev/null
+++ b/debian/notmuch-ruby.install
@@ -0,0 +1 @@
+usr/lib/ruby/vendor_ruby/*/*/notmuch.so
diff --git a/debian/rules b/debian/rules
index c4e3930..71a5602 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,15 +12,18 @@ 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 --vendor && make
 	$(MAKE) -C contrib/notmuch-mutt
 
 override_dh_auto_clean:
 	dh_auto_clean
 	dh_auto_clean --sourcedirectory bindings/python
 	cd bindings/python && $(python3_all) setup.py clean -a
+	dh_auto_clean --sourcedirectory bindings/ruby
 	$(MAKE) -C contrib/notmuch-mutt clean
 
 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_install --sourcedirectory bindings/ruby
-- 
1.8.2.1.679.g509521a

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] debian: package ruby bindings
  2013-04-16 19:08 [PATCH v2] debian: package ruby bindings Felipe Contreras
@ 2013-05-16 13:51 ` David Bremner
  2013-05-16 14:24   ` Felipe Contreras
  2013-05-23 11:44 ` David Bremner
  1 sibling, 1 reply; 7+ messages in thread
From: David Bremner @ 2013-05-16 13:51 UTC (permalink / raw)
  To: Felipe Contreras, notmuch

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  debian/control              | 14 ++++++++++++++
>  debian/notmuch-ruby.install |  1 +
>  debian/rules                |  3 +++
>  3 files changed, 18 insertions(+)
>  create mode 100644 debian/notmuch-ruby.install
>

I get a build failure here; I installed ruby-dev and ran the usual 
"make debian-snapshot".

Does it work for you in a clean with only the declared build-depends
installed?


cd bindings/ruby && ruby extconf.rb --vendor && make
checking for notmuch.h in ../../lib... yes
checking for notmuch_database_create() in -lnotmuch... yes
creating Makefile
make[2]: Entering directory `/home/bremner/software/upstream/notmuch/bindings/ruby'
compiling status.c
status.c: In function ‘notmuch_rb_status_raise’:
status.c:46:10: error: ‘NOTMUCH_STATUS_UNBALANCED_ATOMIC’ undeclared (first use in this function)
status.c:46:10: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [status.o] Error 1
make[2]: Leaving directory `/home/bremner/software/upstream/notmuch/bindings/ruby'
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/home/bremner/software/upstream/notmuch'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1357:
dpkg-buildpackage -rfakeroot -D -us -uc -i failed

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] debian: package ruby bindings
  2013-05-16 13:51 ` David Bremner
@ 2013-05-16 14:24   ` Felipe Contreras
  2013-05-16 14:31     ` David Bremner
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2013-05-16 14:24 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

On Thu, May 16, 2013 at 8:51 AM, David Bremner <bremner@debian.org> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  debian/control              | 14 ++++++++++++++
>>  debian/notmuch-ruby.install |  1 +
>>  debian/rules                |  3 +++
>>  3 files changed, 18 insertions(+)
>>  create mode 100644 debian/notmuch-ruby.install
>>
>
> I get a build failure here; I installed ruby-dev and ran the usual
> "make debian-snapshot".
>
> Does it work for you in a clean with only the declared build-depends
> installed?

Yes. Do you have an old version of notmuch installed?

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] debian: package ruby bindings
  2013-05-16 14:24   ` Felipe Contreras
@ 2013-05-16 14:31     ` David Bremner
  2013-05-16 14:49       ` Ali Polatel
  2013-05-16 14:55       ` Felipe Contreras
  0 siblings, 2 replies; 7+ messages in thread
From: David Bremner @ 2013-05-16 14:31 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: notmuch

Felipe Contreras <felipe.contreras@gmail.com> writes:
>
> Yes. Do you have an old version of notmuch installed?
>

Yes I do. Hmm. It still seems like a bug to me; shouldn't the include
paths be ordered to find the right include files first?

d

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] debian: package ruby bindings
  2013-05-16 14:31     ` David Bremner
@ 2013-05-16 14:49       ` Ali Polatel
  2013-05-16 14:55       ` Felipe Contreras
  1 sibling, 0 replies; 7+ messages in thread
From: Ali Polatel @ 2013-05-16 14:49 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

2013/5/16 David Bremner <bremner@debian.org>:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>> Yes. Do you have an old version of notmuch installed?
>>
>
> Yes I do. Hmm. It still seems like a bug to me; shouldn't the include
> paths be ordered to find the right include files first?
>
> d

Well I must accept I haven't spent much time on thinking how to make
extconf.rb perfect.
Excerpt from extconf.rb from bindings/ruby:

find_header('notmuch.h', '../../lib')
find_library('notmuch', 'notmuch_database_create', '../../lib')

Two problems here:
1. The library must be built before the bindings are built otherwise
the installed version is used.
    However the installed version should never be used (or must be
made a non-default option somehow)
2. The library must be built in the source tree. Out-of-source tree
builds will cause extconf.rb to look for the installed version too.
    Not sure whether this is a major concern because I don't know
whether out-of-tree builds are supported by the build system.

Having said that, I will try to have a look at solving these issues
this weekend.
Unfortunately I can't make promises because real-life is killing all
my time lately.

        -alip

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] debian: package ruby bindings
  2013-05-16 14:31     ` David Bremner
  2013-05-16 14:49       ` Ali Polatel
@ 2013-05-16 14:55       ` Felipe Contreras
  1 sibling, 0 replies; 7+ messages in thread
From: Felipe Contreras @ 2013-05-16 14:55 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

On Thu, May 16, 2013 at 9:31 AM, David Bremner <bremner@debian.org> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>> Yes. Do you have an old version of notmuch installed?
>>
>
> Yes I do. Hmm. It still seems like a bug to me; shouldn't the include
> paths be ordered to find the right include files first?

Yes, it is a bug. And there were attempts to fix it, but it broke the
normal build AFAICR.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] debian: package ruby bindings
  2013-04-16 19:08 [PATCH v2] debian: package ruby bindings Felipe Contreras
  2013-05-16 13:51 ` David Bremner
@ 2013-05-23 11:44 ` David Bremner
  1 sibling, 0 replies; 7+ messages in thread
From: David Bremner @ 2013-05-23 11:44 UTC (permalink / raw)
  To: Felipe Contreras, notmuch

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  debian/control              | 14 ++++++++++++++
>  debian/notmuch-ruby.install |  1 +
>  debian/rules                |  3 +++
>  3 files changed, 18 insertions(+)
>  create mode 100644 debian/notmuch-ruby.install

pushed.

d

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-23 11:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16 19:08 [PATCH v2] debian: package ruby bindings Felipe Contreras
2013-05-16 13:51 ` David Bremner
2013-05-16 14:24   ` Felipe Contreras
2013-05-16 14:31     ` David Bremner
2013-05-16 14:49       ` Ali Polatel
2013-05-16 14:55       ` Felipe Contreras
2013-05-23 11:44 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).