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}
22 # Send HTTP traffic to the “discard” service during packaging actions.
23 export http_proxy
= http
://127.0.1.1:9/
24 export https_proxy
= ${http_proxy}
32 build
: build-arch build-indep
34 dh
$@
--with python3
--buildsystem
=pybuild
38 dh
$@
--with python3
--buildsystem
=pybuild
42 dh
$@
--with python3
--buildsystem
=pybuild
46 $(RST2MAN
) $< > $@
${TEMPFILE_SUFFIX}
47 cat debian
/manpage_encoding_declaration.UTF-8
$@
${TEMPFILE_SUFFIX} > $@
52 dh
$@
--with python3
--buildsystem
=pybuild
54 .PHONY
: override_dh_auto_clean
55 override_dh_auto_clean
:
57 $(RM
) -r
${GENERATED_FILES}
60 .PHONY
: get-packaged-orig-source
61 get-packaged-orig-source
:
62 $(uscan-download-source
) --download-current-version
64 # Policy §4.9 strongly recommends the ‘get-orig-source’ target:
65 # “This target is optional, but providing it if possible is a good idea.”
67 # This target is an anomaly: per Policy §4.9, it fetches the *latest*
68 # upstream source, regardless of this package's version. To fetch the
69 # upstream source corresponding to this package's *declared* version
70 # in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
71 .PHONY
: get-orig-source
73 $(uscan-download-source
)
75 get-orig-source get-packaged-orig-source
: http_proxy
=
76 get-orig-source get-packaged-orig-source
: makefile_dir
= $(abspath
$(dir $(firstword ${MAKEFILE_LIST})))
77 get-orig-source get-packaged-orig-source
: package_dir
= $(abspath
$(dir ${makefile_dir}))
79 define uscan-download-source
80 uscan
--noconf
--verbose \
84 --check-dirname-level
=0 ${package_dir}
85 endef # uscan-download-source
90 dh
$@
--with python3
--buildsystem
=pybuild
94 binary-indep
: build
install
95 dh
$@
--with python3
--buildsystem
=pybuild
98 binary-arch
: build
install
101 binary
: build binary-indep binary-arch
108 # vim: filetype=make fileencoding=utf-8 :