~ubuntu-branches/debian/sid/pyrlp/sid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Ben Finney
  • Date: 2017-07-15 05:25:42 UTC
  • Revision ID: package-import@ubuntu.com-20170715052542-wvm6yh0gaf0k33u3
Tags: 0.5.1-1
* The “Zuhair Kutbi” release.
* Initial release.
  Closes: bug#866168.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/make -f
 
2
 
 
3
# debian/rules
 
4
# Part of Debian ‘pyrlp’ package.
 
5
#
 
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.
 
11
 
 
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}
 
15
 
 
16
export PYBUILD_NAME = rlp
 
17
 
 
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}
 
22
 
 
23
SPHINX = sphinx-build
 
24
SPHINX_OPTS = -N
 
25
 
 
26
 
 
27
%:
 
28
        dh $@ --with python3,python2,sphinxdoc --buildsystem=pybuild
 
29
 
 
30
 
 
31
.PHONY: get-packaged-orig-source
 
32
get-packaged-orig-source:
 
33
        $(uscan-download-source) --download-current-version
 
34
 
 
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.”
 
37
#
 
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
 
43
get-orig-source:
 
44
        $(uscan-download-source)
 
45
 
 
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}))
 
49
 
 
50
define uscan-download-source
 
51
        uscan --noconf --verbose \
 
52
            --force-download \
 
53
            --rename \
 
54
            --destdir=$(CURDIR) \
 
55
            --check-dirname-level=0 ${package_dir}
 
56
endef # uscan-download-source
 
57
 
 
58
 
 
59
override_dh_auto_clean:
 
60
        dh_auto_clean
 
61
        $(RM) -r ${GENERATED_FILES}
 
62
 
 
63
override_dh_auto_build:
 
64
        dh_auto_build
 
65
        $(SPHINX) ${SPHINX_OPTS} -bhtml ${DOCUMENTATION_DIR}/ \
 
66
                ${DOCUMENTATION_BUILD_HTML_DIR}/
 
67
 
 
68
 
 
69
# Local variables:
 
70
# mode: makefile
 
71
# coding: utf-8
 
72
# End:
 
73
# vim: filetype=make fileencoding=utf-8 :