debian: Add packaging for python3-notmuch2

Ship a new debian package for the notmuch2 CFFI-based Python interface
to notmuch.

Unlike the notmuch python module, the new notmuch2 module is no longer
arch-independent, because it builds and ships a shared object in
addition to the python code.

This patch encourages new downstream development to rely on notmuch2
instead of on notmuch, to get the benefits of the new module.

I welcome any suggested improvements to this packaging, but it appears
to me to be sufficient to get "import notmuch2" to work and do some
basic tests.
This commit is contained in:
Daniel Kahn Gillmor 2019-12-23 17:17:22 -05:00 committed by David Bremner
parent bd0b5abd5d
commit 5bf5aa1cff
2 changed files with 29 additions and 6 deletions

24
debian/control vendored
View file

@ -98,6 +98,25 @@ Depends:
libnotmuch5 (>= ${source:Version}), libnotmuch5 (>= ${source:Version}),
${misc:Depends}, ${misc:Depends},
${python3:Depends}, ${python3:Depends},
Description: Python 3 legacy 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 legacy Python 3 interface to the notmuch
functionality, directly interfacing with a shared notmuch library.
.
New projects are encouraged to use python3-notmuch2 instead.
Package: python3-notmuch2
Architecture: any
Section: python
Depends:
libnotmuch5 (>= ${source:Version}),
${misc:Depends},
${python3:Depends},
${shlibs:Depends},
Description: Python 3 interface to the notmuch mail search and index library Description: Python 3 interface to the notmuch mail search and index library
Notmuch is a system for indexing, searching, reading, and tagging Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses large collections of email messages in maildir or mh format. It uses
@ -105,7 +124,10 @@ Description: Python 3 interface to the notmuch mail search and index library
convenient search syntax. convenient search syntax.
. .
This package provides a Python 3 interface to the notmuch This package provides a Python 3 interface to the notmuch
functionality, directly interfacing with a shared notmuch library. functionality using CFFI bindings, which interface with a shared
notmuch library.
.
This is the preferred way to use notmuch via Python.
Package: ruby-notmuch Package: ruby-notmuch
Architecture: any Architecture: any

11
debian/rules vendored
View file

@ -1,7 +1,5 @@
#!/usr/bin/make -f #!/usr/bin/make -f
export PYBUILD_NAME=notmuch
export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%: %:
@ -19,17 +17,20 @@ override_dh_auto_configure:
override_dh_auto_build: override_dh_auto_build:
dh_auto_build -- V=1 dh_auto_build -- V=1
dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python PYBUILD_NAME=notmuch dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python
PYBUILD_NAME=notmuch2 dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python-cffi
$(MAKE) -C contrib/notmuch-mutt $(MAKE) -C contrib/notmuch-mutt
override_dh_auto_clean: override_dh_auto_clean:
dh_auto_clean dh_auto_clean
dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python PYBUILD_NAME=notmuch dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python
PYBUILD_NAME=notmuch2 dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python-cffi
dh_auto_clean --sourcedirectory bindings/ruby dh_auto_clean --sourcedirectory bindings/ruby
$(MAKE) -C contrib/notmuch-mutt clean $(MAKE) -C contrib/notmuch-mutt clean
override_dh_auto_install: override_dh_auto_install:
dh_auto_install dh_auto_install
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
$(MAKE) -C contrib/notmuch-mutt DESTDIR=$(CURDIR)/debian/tmp install $(MAKE) -C contrib/notmuch-mutt DESTDIR=$(CURDIR)/debian/tmp install
dh_auto_install --sourcedirectory bindings/ruby dh_auto_install --sourcedirectory bindings/ruby