a915179b600717e13610d2c738fed7e61a798370
[notmuch] / debian / rules
1 #!/usr/bin/make -f
2
3 python3_all = py3versions -s | xargs -n1 | xargs -t -I {} env {}
4
5 %:
6         dh $@ --with python2,python3,elpa
7
8 override_dh_auto_configure:
9         ./configure --prefix=/usr \
10                 --libdir=/usr/lib/$$(dpkg-architecture -q DEB_TARGET_MULTIARCH) \
11                 --includedir=/usr/include \
12                 --mandir=/usr/share/man \
13                 --infodir=/usr/share/info \
14                 --sysconfdir=/etc \
15                 --localstatedir=/var
16
17 override_dh_auto_build:
18         dh_auto_build -- V=1
19         dh_auto_build --sourcedirectory bindings/python
20         cd bindings/python && $(python3_all) setup.py build
21         $(MAKE) -C contrib/notmuch-mutt
22
23 override_dh_auto_clean:
24         dh_auto_clean
25         dh_auto_clean --sourcedirectory bindings/python
26         cd bindings/python && $(python3_all) setup.py clean -a
27         dh_auto_clean --sourcedirectory bindings/ruby
28         $(MAKE) -C contrib/notmuch-mutt clean
29
30 override_dh_auto_install:
31         dh_auto_install
32         dh_auto_install --sourcedirectory bindings/python
33         cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp
34         dh_auto_install --sourcedirectory bindings/ruby
35
36 override_dh_strip:
37         dh_strip --dbg-package notmuch-dbg