4 # Part of Debian ‘xkcdpass’ package.
6 # Copyright © 2010–2015 Ben Finney <ben+debian@benfinney.id.au>
7 # This is free software; you may copy, modify and/or distribute this work
8 # under the terms of the BSD 3-clause license.
9 # No warranty expressed or implied.
10 # See the file ‘xkcdpass/xkcd_password.py’ for details.
12 DOCUMENTATION_DIR
= debian
14 TEMPFILE_SUFFIX
= .tmp
15 manpage_names
= xkcdpass
16 .INTERMEDIATE
: ${DOCUMENTATION_DIR}/*${MANPAGE_SUFFIX}${TEMPFILE_SUFFIX}
18 manpage_paths
= $(addprefix ${DOCUMENTATION_DIR}/,${manpage_names})
19 manpages
= $(addsuffix ${MANPAGE_SUFFIX},${manpage_paths})
20 GENERATED_FILES
+= ${DOCUMENTATION_DIR}/*${MANPAGE_SUFFIX}
24 # Send HTTP traffic to the “discard” service during packaging actions.
25 export http_proxy
= http
://127.0.1.1:9/
26 export https_proxy
= ${http_proxy}
34 build
: build-arch build-indep
36 dh
$@
--with python3
--buildsystem
=pybuild
40 dh
$@
--with python3
--buildsystem
=pybuild
44 dh
$@
--with python3
--buildsystem
=pybuild
48 $(RST2MAN
) $< > $@
${TEMPFILE_SUFFIX}
49 cat debian
/manpage_encoding_declaration.UTF-8
$@
${TEMPFILE_SUFFIX} > $@
54 dh
$@
--with python3
--buildsystem
=pybuild
56 .PHONY
: override_dh_auto_clean
57 override_dh_auto_clean
:
59 $(RM
) -r
${GENERATED_FILES}
62 .PHONY
: get-packaged-orig-source
63 get-packaged-orig-source
:
64 $(uscan-download-source
) --download-current-version
66 # Policy §4.9 strongly recommends the ‘get-orig-source’ target:
67 # “This target is optional, but providing it if possible is a good idea.”
69 # This target is an anomaly: per Policy §4.9, it fetches the *latest*
70 # upstream source, regardless of this package's version. To fetch the
71 # upstream source corresponding to this package's *declared* version
72 # in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
73 .PHONY
: get-orig-source
75 $(uscan-download-source
)
77 get-orig-source get-packaged-orig-source
: http_proxy
=
78 get-orig-source get-packaged-orig-source
: makefile_dir
= $(abspath
$(dir $(firstword ${MAKEFILE_LIST})))
79 get-orig-source get-packaged-orig-source
: package_dir
= $(abspath
$(dir ${makefile_dir}))
81 define uscan-download-source
82 uscan
--noconf
--verbose \
86 --check-dirname-level
=0 ${package_dir}
87 endef # uscan-download-source
92 dh
$@
--with python3
--buildsystem
=pybuild
96 binary-indep
: build
install
97 dh
$@
--with python3
--buildsystem
=pybuild
100 binary-arch
: build
install
103 binary
: build binary-indep binary-arch
110 # vim: filetype=make fileencoding=utf-8 :