--- /dev/null
+Return-Path: <felipe.contreras@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id B5262431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 3 Apr 2013 16:28:57 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id qkhHsHY734hT for <notmuch@notmuchmail.org>;\r
+ Wed, 3 Apr 2013 16:28:57 -0700 (PDT)\r
+Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com\r
+ [209.85.223.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 3C562431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 3 Apr 2013 16:28:57 -0700 (PDT)\r
+Received: by mail-ie0-f173.google.com with SMTP id 9so2398294iec.4\r
+ for <notmuch@notmuchmail.org>; Wed, 03 Apr 2013 16:28:54 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=x-received:from:to:cc:subject:date:message-id:x-mailer;\r
+ bh=DHka+rAlPne4mnJV1NrH2935Y0WIR0hLQ5S3sybxJjU=;\r
+ b=nAKN8igY/jY2qj+X3sDhfYjzukT7zXDWeHHBqm0kJYcvtsoLgavXJfLKdGpTu5pUKn\r
+ soaP1xMqPt4e3isfNLzbuF9p6pdHKbBQtYe2YRPWsdNRVQYFqh5HJiFapCHXHiTk7bFD\r
+ Awatj6rOwx11rNx4MkUyhEfbAl6fBDZPY5DL6N/sxtSDgzSqMZdRPp6nFsOVPjnI9rU0\r
+ aXguCB6vq+yeGoDxuxiKh1vaDUEoEBnZK49NZfGXijsaDh4C6Po9tx3kjxUAmNaxt1ia\r
+ x0FPT+uF3H59H7o9C25FY6peW0VHCBdO88b5MQbGLOxnONlu0vAkl7621czFe9XRnsFu\r
+ LVag==\r
+X-Received: by 10.50.46.133 with SMTP id v5mr8362075igm.94.1365031734748;\r
+ Wed, 03 Apr 2013 16:28:54 -0700 (PDT)\r
+Received: from localhost (187-163-100-70.static.axtel.net. [187.163.100.70])\r
+ by mx.google.com with ESMTPS id wn10sm10903633igb.2.2013.04.03.16.28.52\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Wed, 03 Apr 2013 16:28:53 -0700 (PDT)\r
+From: Felipe Contreras <felipe.contreras@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] debian: package ruby bindings\r
+Date: Wed, 3 Apr 2013 17:27:58 -0600\r
+Message-Id: <1365031678-25188-1-git-send-email-felipe.contreras@gmail.com>\r
+X-Mailer: git-send-email 1.8.2\r
+Cc: Stefano Zacchiroli <zack@upsilon.cc>, David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 03 Apr 2013 23:28:57 -0000\r
+\r
+Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
+---\r
+ debian/control | 14 ++++++++++++++\r
+ debian/notmuch-ruby.install | 1 +\r
+ debian/rules | 9 +++++++++\r
+ 3 files changed, 24 insertions(+)\r
+ create mode 100644 debian/notmuch-ruby.install\r
+\r
+diff --git a/debian/control b/debian/control\r
+index 854a32a..620c5ce 100644\r
+--- a/debian/control\r
++++ b/debian/control\r
+@@ -15,6 +15,7 @@ Build-Depends:\r
+ libz-dev,\r
+ python-all (>= 2.6.6-3~),\r
+ python3-all (>= 3.1.2-7~),\r
++ ruby-dev,\r
+ emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |\r
+ emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),\r
+ gdb,\r
+@@ -89,6 +90,19 @@ Description: Python 3 interface to the notmuch mail search and index library\r
+ This package provides a Python 3 interface to the notmuch\r
+ functionality, directly interfacing with a shared notmuch library.\r
+ \r
++Package: notmuch-ruby\r
++Architecture: any\r
++Section: ruby\r
++Depends: ${shlibs:Depends}, ${misc:Depends}\r
++Description: Ruby interface to the notmuch mail search and index library\r
++ Notmuch is a system for indexing, searching, reading, and tagging\r
++ large collections of email messages in maildir or mh format. It uses\r
++ the Xapian library to provide fast, full-text search with a very\r
++ convenient search syntax.\r
++ .\r
++ This package provides a Ruby interface to the notmuch\r
++ functionality, directly interfacing with a shared notmuch library.\r
++\r
+ Package: notmuch-emacs\r
+ Architecture: all\r
+ Section: mail\r
+diff --git a/debian/notmuch-ruby.install b/debian/notmuch-ruby.install\r
+new file mode 100644\r
+index 0000000..f92f09c\r
+--- /dev/null\r
++++ b/debian/notmuch-ruby.install\r
+@@ -0,0 +1 @@\r
++usr/local/lib/site_ruby/*/*/notmuch.so\r
+diff --git a/debian/rules b/debian/rules\r
+index c4e3930..7c7247a 100755\r
+--- a/debian/rules\r
++++ b/debian/rules\r
+@@ -12,15 +12,24 @@ override_dh_auto_build:\r
+ dh_auto_build\r
+ dh_auto_build --sourcedirectory bindings/python\r
+ cd bindings/python && $(python3_all) setup.py build\r
++ dh_auto_build --sourcedirectory bindings/ruby\r
++ cd bindings/ruby && ruby extconf.rb && make\r
+ $(MAKE) -C contrib/notmuch-mutt\r
+ \r
+ override_dh_auto_clean:\r
+ dh_auto_clean\r
+ dh_auto_clean --sourcedirectory bindings/python\r
+ cd bindings/python && $(python3_all) setup.py clean -a\r
++ dh_auto_build --sourcedirectory bindings/ruby\r
++ cd bindings/ruby && test -f Makefile && make clean || true\r
+ $(MAKE) -C contrib/notmuch-mutt clean\r
+ \r
+ override_dh_auto_install:\r
+ dh_auto_install\r
+ dh_auto_install --sourcedirectory bindings/python\r
+ cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp\r
++ dh_auto_build --sourcedirectory bindings/ruby\r
++ cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp\r
++\r
++# ruby's site is configured in /usr/local\r
++override_dh_usrlocal:\r
+-- \r
+1.8.2\r
+\r