Debian Codegraph @

debian/rules

raw
1 #! /usr/bin/make -f
2 #
3 # debian/rules
4 # Part of Debian ‘dput’ package.
5 #
6 # This is free software, and you are welcome to redistribute it under
7 # certain conditions; see the end of this file for copyright
8 # information, grant of license, and disclaimer of warranty.
9
10 PACKAGE_NAME = dput
11
12 export LC_ALL := C.UTF-8
13 export PYTHONIOENCODING := utf-8
14
15 export PYBUILD_SYSTEM := pyproject
16 export PYBUILD_TEST_CUSTOM := make test --verbose
17
18 package_share_dir = usr/share/${PACKAGE_NAME}
19
20 INSTALL ?= install
21 MV ?= mv
22
23
24 %:
25 dh $@ --with=bash-completion,python3 --buildsystem=pybuild
26
27
28 override_dh_clean:
29 dh_clean
30 make clean
31
32 # Python packaging tools apparently don't allow specifying correct paths
33 # where to install these files. We move them afterward as a work-around.
34 export PYBUILD_AFTER_INSTALL = \
35 $(INSTALL) --mode=u=rwx,go=rx --directory \
36 "{destdir}/${package_share_dir}" ; \
37 $(MV) "{destdir}"/usr/lib/python*/dist-packages/dput \
38 "{destdir}/${package_share_dir}"/. ; \
39 $(MV) "{destdir}"/usr/bin/* \
40 "{destdir}/${package_share_dir}"/.
41
42 override_dh_auto_test:
43 dh_auto_test -O--buildsystem=makefile
44
45 override_dh_installman:
46 dh_installman --language=C
47
48
49 # Copyright © 2015–2026 Ben Finney <[email protected]>
50 #
51 # This is free software: you may copy, modify, and/or distribute this work
52 # under the terms of the GNU General Public License as published by the
53 # Free Software Foundation; version 3 of that license or any later version.
54 # No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details.
55
56
57 # Local variables:
58 # coding: utf-8
59 # mode: makefile
60 # End:
61 # vim: fileencoding=utf-8 filetype=make :