Convert notmuch-vim to Vim addon policy 2.0

The new Vim addon policy relies on Vim's native package functionality,
rather than the Debian-specific vim-addons tool.  This allows the addon
to be immediately available when the package is installed, rather than
requiring extra setup by the user.

* Install notmuch-vim to its own /usr/share/notmuch-vim directory, so
  the files are self-contained.
* Remove vim-addon-manager from notmuch-vim Depends
* Add ${vim-addon:Depends} to notmuch-vim Depends to ensure it has the
  required relationships on Vim/Neovim.
* Build-Depend on dh-sequence-vim-addon to automatically setup the
  required symlinks for Vim and Neovim to see the addon.

Signed-off-by: James McCoy <jamessan@debian.org>
This commit is contained in:
James McCoy 2024-08-03 14:56:06 -04:00 committed by David Bremner
parent 5a3e90d02f
commit 0aac2ae67e
6 changed files with 6 additions and 9 deletions

3
debian/control vendored
View file

@ -14,6 +14,7 @@ Build-Depends: dpkg-dev (>= 1.22.5),
debhelper-compat (= 13), debhelper-compat (= 13),
dh-elpa (>= 1.3), dh-elpa (>= 1.3),
dh-python, dh-python,
dh-sequence-vim-addon,
desktop-file-utils, desktop-file-utils,
doxygen, doxygen,
dpkg-dev (>= 1.17.14), dpkg-dev (>= 1.17.14),
@ -211,9 +212,9 @@ Replaces:
Depends: Depends:
notmuch, notmuch,
ruby-notmuch, ruby-notmuch,
vim-addon-manager,
vim-ruby, vim-ruby,
${misc:Depends}, ${misc:Depends},
${vim-addon:Depends},
Recommends: Recommends:
ruby-mail, ruby-mail,
Description: thread-based email index, search and tagging (vim interface) Description: thread-based email index, search and tagging (vim interface)

View file

@ -1,4 +0,0 @@
usr/share/vim/addons/doc
usr/share/vim/addons/plugin
usr/share/vim/addons/syntax
usr/share/vim/registry

View file

@ -1,4 +1 @@
vim/notmuch.txt usr/share/vim/addons/doc /usr/share/notmuch-vim
vim/notmuch.vim usr/share/vim/addons/plugin
vim/notmuch.yaml usr/share/vim/registry
vim/syntax/notmuch-*.vim usr/share/vim/addons/syntax

1
debian/notmuch-vim.neovim-addon vendored Symbolic link
View file

@ -0,0 +1 @@
notmuch-vim.vim-addon

1
debian/notmuch-vim.vim-addon vendored Normal file
View file

@ -0,0 +1 @@
/usr/share/notmuch-vim notmuch

1
debian/rules vendored
View file

@ -37,4 +37,5 @@ override_dh_auto_install:
PYBUILD_NAME=notmuch dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python PYBUILD_NAME=notmuch dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python
PYBUILD_NAME=notmuch2 dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python-cffi PYBUILD_NAME=notmuch2 dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python-cffi
$(MAKE) -C contrib/notmuch-mutt DESTDIR=$(CURDIR)/debian/tmp install $(MAKE) -C contrib/notmuch-mutt DESTDIR=$(CURDIR)/debian/tmp install
$(MAKE) -C vim prefix=/usr/share/notmuch-vim DESTDIR=$(CURDIR)/debian/tmp install
dh_auto_install --sourcedirectory bindings/ruby dh_auto_install --sourcedirectory bindings/ruby