blob: f97260ca7bb19f63c466fc634481139e4a8ccb03 (
plain)
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
|
#!/usr/bin/make -f
export PYBUILD_NAME=fabio
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --buildsystem=pybuild
execute_before_dh_clean:
# remove the cython generated files distributed by upstream
rm -f $(patsubst %.pyx,%.c,$(wildcard fabio/ext/*.pyx))
rm -rf doc/build/html
rm -rf build/man
rm -rf *.egg-info
override_dh_auto_build-arch:
PYBUILD_BUILD_ARGS="-Ccompile-args=--verbose" dh_auto_build
override_dh_auto_build-indep: override_dh_auto_build-arch
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
env PYTHONPATH=$(shell pybuild --build -i python3 -s custom --build-args 'echo {build_dir}') \
SPHINXBUILD="python3 -m sphinx" \
SPHINXOPTS="-D mathjax_path=MathJax.js" \
$(MAKE) -C doc html
endif
override_dh_auto_test:
PYBUILD_SYSTEM=custom \
PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' FABIO_TESTIMAGES=testimages xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} ./run_tests.py" dh_auto_test
execute_after_dh_auto_install:
# install scripts into fabio-viewer
mkdir -p debian/fabio-viewer/usr/bin
cp debian/python3-fabio/usr/bin/* debian/fabio-viewer/usr/bin
rm -rf debian/python3-fabio/usr/bin
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
dh_installdocs -p python-fabio-doc "doc/build/html" --doc-main-package=python3-fabio
dh_sphinxdoc -p python-fabio-doc -XMathJax.js
endif
execute_before_dh_fixperms:
# hack until the 1/1/1970 issue is solved by upstream
-find debian/fabio-viewer -type f | xargs touch -d@${SOURCE_DATE_EPOCH}
-find debian/python3-fabio -type f | xargs touch -d@${SOURCE_DATE_EPOCH}
-find debian/python-fabio-doc -type f | xargs touch -d@${SOURCE_DATE_EPOCH}
|