4 # Part of Debian ‘xkcdpass’ package.
6 # Copyright © 2010–2016 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 ‘LICENSE.BSD’ 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 MAIN_PYTHON_PACKAGE
= xkcdpass
23 export PYBUILD_NAME
= ${MAIN_PYTHON_PACKAGE}
25 # Send HTTP traffic to the “discard” service during packaging actions.
26 export http_proxy
= http
://127.0.1.1:9/
27 export https_proxy
= ${http_proxy}
35 dh
$@
--with bash-completion
,python3
--buildsystem
=pybuild
41 $(RST2MAN
) $< > $@
${TEMPFILE_SUFFIX}
42 cat debian
/manpage_encoding_declaration.UTF-8
$@
${TEMPFILE_SUFFIX} > $@
45 .PHONY
: override_dh_auto_clean
46 override_dh_auto_clean
:
48 $(RM
) -r
${GENERATED_FILES}
51 .PHONY
: get-packaged-orig-source
52 get-packaged-orig-source
:
53 $(uscan-download-source
) --download-current-version
55 # Policy §4.9 strongly recommends the ‘get-orig-source’ target:
56 # “This target is optional, but providing it if possible is a good idea.”
58 # This target is an anomaly: per Policy §4.9, it fetches the *latest*
59 # upstream source, regardless of this package's version. To fetch the
60 # upstream source corresponding to this package's *declared* version
61 # in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
62 .PHONY
: get-orig-source
64 $(uscan-download-source
)
66 get-orig-source get-packaged-orig-source
: http_proxy
=
67 get-orig-source get-packaged-orig-source
: makefile_dir
= $(abspath
$(dir $(firstword ${MAKEFILE_LIST})))
68 get-orig-source get-packaged-orig-source
: package_dir
= $(abspath
$(dir ${makefile_dir}))
70 define uscan-download-source
71 uscan
--noconf
--verbose \
75 --check-dirname-level
=0 ${package_dir}
76 endef # uscan-download-source
83 # vim: fileencoding=utf-8 filetype=make :