4
# Part of Debian ‘pyrlp’ package.
6
# Copyright © 2009–2017 Ben Finney <bignose@debian.org>
7
# This is free software: you may copy, modify, and/or distribute this work
8
# under the terms of the GNU General Public License as published by the
9
# Free Software Foundation; version 3 of that license or any later version.
10
# No warranty expressed or implied.
12
# Send HTTP traffic to the “discard” service during packaging actions.
13
export http_proxy = http://127.0.1.1:9/
14
export https_proxy = ${http_proxy}
16
export PYBUILD_NAME = rlp
18
DOCUMENTATION_DIR = docs
19
DOCUMENTATION_BUILD_DIR = ${DOCUMENTATION_DIR}/_build
20
DOCUMENTATION_BUILD_HTML_DIR = ${DOCUMENTATION_BUILD_DIR}/html
21
GENERATED_FILES += ${DOCUMENTATION_BUILD_DIR}
28
dh $@ --with python3,python2,sphinxdoc --buildsystem=pybuild
31
.PHONY: get-packaged-orig-source
32
get-packaged-orig-source:
33
$(uscan-download-source) --download-current-version
35
# Policy §4.9 strongly recommends the ‘get-orig-source’ target:
36
# “This target is optional, but providing it if possible is a good idea.”
38
# This target is an anomaly: per Policy §4.9, it fetches the *latest*
39
# upstream source, regardless of this package's version. To fetch the
40
# upstream source corresponding to this package's *declared* version
41
# in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
42
.PHONY: get-orig-source
44
$(uscan-download-source)
46
get-orig-source get-packaged-orig-source: http_proxy =
47
get-orig-source get-packaged-orig-source: makefile_dir = $(abspath $(dir $(firstword ${MAKEFILE_LIST})))
48
get-orig-source get-packaged-orig-source: package_dir = $(abspath $(dir ${makefile_dir}))
50
define uscan-download-source
51
uscan --noconf --verbose \
55
--check-dirname-level=0 ${package_dir}
56
endef # uscan-download-source
59
override_dh_auto_clean:
61
$(RM) -r ${GENERATED_FILES}
63
override_dh_auto_build:
65
$(SPHINX) ${SPHINX_OPTS} -bhtml ${DOCUMENTATION_DIR}/ \
66
${DOCUMENTATION_BUILD_HTML_DIR}/
73
# vim: filetype=make fileencoding=utf-8 :