File: rules

package info (click to toggle)
borgbackup 1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,572 kB
  • ctags: 5,885
  • sloc: python: 11,127; ansic: 628; makefile: 129; sh: 70
file content (71 lines) | stat: -rwxr-xr-x 2,201 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/make -f

#export DH_VERBOSE=1

# The command 'sphinx-build' refers to the python2 version;
# currently there is no easier way to refer to the python3 version.
SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build

# Use buildflags for the Cython sources
# FIXME: Using hardeninge=+pie breaks the build.
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk


# pybuild: use pytest instead of auto-detection
#
# The autodetection failed on jessie, resulting in a failed
# build, since unittest does not support pytest's command
# line switches
export PYBUILD_TEST_PYTEST=1

# Command line arguments to pytest
#
# Until pytest-benchmark is packaged, we must prevent the
# benchmarks from loading, or they will fail with unknown
# fixtures.
#
# Also, we cannot rely on the buildds allowing fuse to be
# used, so we disable the fuse-mount tests.
export PYBUILD_TEST_ARGS=\
	-k 'not benchmark and not fuse_mount and not test_fuse' \
	--pyargs borg.testsuite

# To display coverage information, add the following
# switches to PYBUILD_TEST_ARGS (Upstream does this)
#
# Note that this currently breaks unittests on jessie,
# because borg will trip over the unexpected coverage
# files.  Since this failure does not occur in stretch,
# this is likely due to an outdated version in jessie.
#
# --cov=borg --cov-config=../.coveragerc

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_installdocs:
	python3 setup.py build_ext --inplace
	$(MAKE) -C docs html SPHINXBUILD=$(SPHINXBUILD)
	dh_installdocs

override_dh_installman:
	python3 setup.py build_ext --inplace
	$(MAKE) -C docs man SPHINXBUILD=$(SPHINXBUILD)
	cp docs/_build/man/borg.1 debian/
	dh_installman

# Run dh_auto_test in a fakeroot environment, this will
# disable some feature tests from upstream that are not
# guaranteed to work on a buildd anyway, like acls.
#
# Also, make sure the compiled cython files are present
# in-place, to allow the tests to find them.
override_dh_auto_test:
	python3 setup.py build_ext --inplace
	fakeroot dh_auto_test

# Do not compress .ico file (affects html documentation)
override_dh_compress:
	dh_compress -X.ico