summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2021-09-07 15:05:31 +0200
committerPicca Frédéric-Emmanuel <picca@debian.org>2021-09-07 16:17:40 +0200
commite3a873a39b2b43f25ca9f9e427bf5fb8c09401a4 (patch)
tree1dd0d8b40c212c84810ac1ffa38149a99c0dc0dd /debian
parentcb77e64952c93a5b52cef5ef9d1244456c85f2c5 (diff)
d/control: Used execute_[before|after]
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules35
1 files changed, 14 insertions, 21 deletions
diff --git a/debian/rules b/debian/rules
index 016479a..cdf6902 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,8 +11,6 @@ export PYBUILD_NAME=silx
export SPECFILE_USE_GNU_SOURCE=1
export SILX_FULL_INSTALL_REQUIRES=1
-DOPACKAGES=$(shell dh_listpackages)
-
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# Make does not offer a recursive wildcard function, so here's one:
@@ -28,8 +26,7 @@ PY3VER := $(shell py3versions -dv)
%:
dh $@ --buildsystem=pybuild
-override_dh_clean:
- dh_clean
+execute_after_dh_clean:
# remove the cython generated file to force rebuild
rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX})
rm -f $(patsubst %.pyx,%.c,${ALL_PYX})
@@ -38,12 +35,17 @@ override_dh_clean:
rm -rf build/man
rm -rf *.egg-info
-override_dh_auto_build:
- dh_auto_build
+execute_after_dh_auto_build-arch:
# build man pages
dh_auto_build -- -s custom --build-args="env PYTHONPATH={build_dir} {interpreter} setup.py build_man"
-override_dh_install:
+execute_after_dh_auto_build-indep:
+ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
+ mkdir -p -m 700 $(XDG_RUNTIME_DIR)
+ pybuild --build -s custom -p $(PY3VER) --build-args="cd doc && env PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} -m sphinx -N -bhtml source build/html"
+endif
+
+execute_before_dh_install:
# install scripts into silx
python3 setup.py install_scripts -d debian/silx/usr/bin
dh_install -p silx package/desktop/*.desktop usr/share/applications
@@ -54,12 +56,6 @@ override_dh_install:
# install the qtdesigner files only for the python3 package
dh_install -p python3-silx qtdesigner_plugins/*.py /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/designer/python
- dh_install
-
-override_dh_python3:
- dh_python3
- dh_python3 -p python3-silx /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/designer/python
-
# WITH_QT_TEST=False to disable graphical tests
# SILX_OPENCL=False to disable OpenCL tests
# SILX_TEST_LOW_MEM=True to disable tests taking large amount of memory
@@ -69,14 +65,11 @@ override_dh_auto_test:
mkdir -p $(POCL_CACHE_DIR) # create POCL cachedir in order to avoid an FTBFS in sbuild
dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} GPU=False WITH_QT_TEST=False SILX_OPENCL=False SILX_TEST_LAW_MEM=True xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} run_tests.py -vv --installed"
+execute_after_dh_installdocs:
+ dh_installdocs -p python-silx-doc "doc/build/html" --doc-main-package=python3-silx
+
override_dh_installman:
dh_installman -p silx build/man/*.1
-override_dh_sphinxdoc:
-ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
- #mkdir -p $(POCL_CACHE_DIR) # create POCL cachedir in order to avoid an FTBFS in sbuild
- mkdir -p -m 700 $(XDG_RUNTIME_DIR)
- pybuild --build -s custom -p $(PY3VER) --build-args="cd doc && env PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} -m sphinx -N -bhtml source build/html"
- dh_installdocs "doc/build/html" -p python-silx-doc --doc-main-package=python3-silx
- dh_sphinxdoc -O--buildsystem=pybuild
-endif
+execute_after_dh_python3:
+ dh_python3 -p python3-silx /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/designer/python