From 0eb4213766e051328da88203da44e7377a774807 Mon Sep 17 00:00:00 2001
From: David Bremner <bremner@debian.org>
Date: Sun, 28 Jul 2013 13:48:02 -0300
Subject: [PATCH] debian: build notmuch-vim again

Based on id:1370220299-14722-1-git-send-email-felipe.contreras@gmail.com

Hacked rather extensively by db. The most important changes:

       - bring back notmuch.yaml for the (debian specific?) vim-addons
         tool.
       - depend on vim-ruby, so we get a version of vim with ruby installed.
---
 debian/NEWS.Debian         |  4 ++--
 debian/changelog           |  1 +
 debian/control             | 16 ++++++++++++++++
 debian/notmuch-vim.install |  2 +-
 vim/notmuch.yaml           |  9 +++++++++
 5 files changed, 29 insertions(+), 3 deletions(-)
 create mode 100644 vim/notmuch.yaml

diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
index 1dd9e0d0..e57b4d41 100644
--- a/debian/NEWS.Debian
+++ b/debian/NEWS.Debian
@@ -1,7 +1,7 @@
 notmuch (0.16-1) unstable; urgency=low
 
-  * The vim interface is no longer provided as a Debian package, due
-    to upstream deprecation.
+  * The vim interface has been rewritten from scratch. In particular
+    it requires a version of vim with ruby support.
 
  -- David Bremner <bremner@debian.org>  Sat, 16 Feb 2013 08:12:02 -0400
 
diff --git a/debian/changelog b/debian/changelog
index f97c6d10..659879c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ notmuch (0.16-1) unstable; urgency=low
 
   * New upstream feature release
     - 'notmuch insert' command replaces notmuch-deliver (Closes: #692889).
+    - New ruby based vim interface (Closes: 616692, 636707).
   * Provide a notmuch-dbg package, thanks to Daniel Kahn Gillmor
     (Closes: #717339).
   * Include alot to the list of recommended interfaces, thanks to
diff --git a/debian/control b/debian/control
index 7a87b740..4fd8e0d5 100644
--- a/debian/control
+++ b/debian/control
@@ -120,6 +120,22 @@ Description: thread-based email index, search and tagging (emacs interface)
  This package provides an emacs based mail user agent based on
  notmuch.
 
+Package: notmuch-vim
+Architecture: all
+Section: mail
+Breaks: notmuch (<<0.6~254~)
+Replaces: notmuch (<<0.6~254~)
+Depends: ${misc:Depends}, notmuch, vim-addon-manager, vim-ruby, notmuch-ruby
+Recommends: ruby-mail
+Description: thread-based email index, search and tagging (vim interface)
+ 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 vim based mail user agent based on
+ notmuch.
+
 Package: notmuch-mutt
 Architecture: all
 Depends:
diff --git a/debian/notmuch-vim.install b/debian/notmuch-vim.install
index 95ab07bb..d444fef7 100644
--- a/debian/notmuch-vim.install
+++ b/debian/notmuch-vim.install
@@ -1,3 +1,3 @@
-vim/plugin/notmuch.vim usr/share/vim/addons/plugin
+vim/notmuch.vim usr/share/vim/addons/plugin
 vim/syntax/notmuch-*.vim usr/share/vim/addons/syntax
 vim/notmuch.yaml usr/share/vim/registry
diff --git a/vim/notmuch.yaml b/vim/notmuch.yaml
new file mode 100644
index 00000000..6d368105
--- /dev/null
+++ b/vim/notmuch.yaml
@@ -0,0 +1,9 @@
+addon: notmuch
+description: "notmuch mail user interface"
+files:
+  - plugin/notmuch.vim
+  - syntax/notmuch-compose.vim
+  - syntax/notmuch-folders.vim
+  - syntax/notmuch-git-diff.vim
+  - syntax/notmuch-search.vim
+  - syntax/notmuch-show.vim
-- 
2.45.2