Control: tags -1 + patch

On Sun, Jul 24, 2022 at 02:43:29PM +0300, guriev...@ya.ru wrote:
> The Vim team decided to declare vim-addon-manager(1) deprecated. Please
> remove the vim-addon-manager package from the Depends list. We advise to
> switch to modern dh_vim-addon(1) if you use Debhelper.

Attached patch implements this.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB
>From e036a14aea3a4da8e254779cf85a9accfe275a59 Mon Sep 17 00:00:00 2001
From: James McCoy <james...@debian.org>
Date: Wed, 8 Nov 2023 18:29:00 -0500
Subject: [PATCH] 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 <james...@debian.org>
---
 debian/control                  | 3 ++-
 debian/notmuch-vim.dirs         | 4 ----
 debian/notmuch-vim.install      | 5 +----
 debian/notmuch-vim.neovim-addon | 1 +
 debian/notmuch-vim.vim-addon    | 1 +
 debian/rules                    | 1 +
 6 files changed, 6 insertions(+), 9 deletions(-)
 delete mode 100644 debian/notmuch-vim.dirs
 create mode 120000 debian/notmuch-vim.neovim-addon
 create mode 100644 debian/notmuch-vim.vim-addon

diff --git a/debian/control b/debian/control
index 135eb7ce..1866247a 100644
--- a/debian/control
+++ b/debian/control
@@ -14,6 +14,7 @@ Build-Depends:
  debhelper-compat (= 13),
  dh-elpa (>= 1.3),
  dh-python,
+ dh-sequence-vim-addon,
  desktop-file-utils,
  doxygen,
  dpkg-dev (>= 1.17.14),
@@ -208,9 +209,9 @@ Replaces:
 Depends:
  notmuch,
  ruby-notmuch,
- vim-addon-manager,
  vim-ruby,
  ${misc:Depends},
+ ${vim-addon:Depends},
 Recommends:
  ruby-mail,
 Description: thread-based email index, search and tagging (vim interface)
diff --git a/debian/notmuch-vim.dirs b/debian/notmuch-vim.dirs
deleted file mode 100644
index 2b531314..00000000
--- a/debian/notmuch-vim.dirs
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/share/vim/addons/doc
-usr/share/vim/addons/plugin
-usr/share/vim/addons/syntax
-usr/share/vim/registry
diff --git a/debian/notmuch-vim.install b/debian/notmuch-vim.install
index cf898738..08096d37 100644
--- a/debian/notmuch-vim.install
+++ b/debian/notmuch-vim.install
@@ -1,4 +1 @@
-vim/notmuch.txt usr/share/vim/addons/doc
-vim/notmuch.vim usr/share/vim/addons/plugin
-vim/notmuch.yaml usr/share/vim/registry
-vim/syntax/notmuch-*.vim usr/share/vim/addons/syntax
+/usr/share/notmuch-vim
diff --git a/debian/notmuch-vim.neovim-addon b/debian/notmuch-vim.neovim-addon
new file mode 120000
index 00000000..a576db7c
--- /dev/null
+++ b/debian/notmuch-vim.neovim-addon
@@ -0,0 +1 @@
+notmuch-vim.vim-addon
\ No newline at end of file
diff --git a/debian/notmuch-vim.vim-addon b/debian/notmuch-vim.vim-addon
new file mode 100644
index 00000000..9c23ba18
--- /dev/null
+++ b/debian/notmuch-vim.vim-addon
@@ -0,0 +1 @@
+/usr/share/notmuch-vim notmuch
diff --git a/debian/rules b/debian/rules
index a77ffa15..ecf09abc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,4 +37,5 @@ override_dh_auto_install:
 	PYBUILD_NAME=notmuch dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python
 	PYBUILD_NAME=notmuch2 dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python-cffi
 	$(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
-- 
2.42.0

Reply via email to