#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie export PYBUILD_NAME=bumps export libdir=/usr/lib/bumps/ %: dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild override_dh_auto_clean: dh_auto_clean rm -rf .mplconfig doc/_build doc/api doc/dream doc/tutorial api dream .cache rm -f bumps/dream/_compiled.so override_dh_install: dh_install mv debian/python-bumps/usr/bin/bumps debian/python-bumps/usr/bin/bumps2 find debian/python3-bumps/usr -name __pycache__ -exec rm -rf {} + override_dh_auto_build-common: dh_auto_build override_dh_auto_build-indep: override_dh_auto_build-common PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/ build/html # HTML generator ln -sf /usr/share/javascript/mathjax/ build/html/_static/mathjax PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -btexinfo doc/ build/texinfo # texinfo generator override_dh_auto_build-arch: override_dh_auto_build-common (cd bumps/dream && $(CC) compiled.c \ $(shell dpkg-buildflags --get CPPFLAGS) \ $(shell dpkg-buildflags --get CFLAGS) \ $(shell dpkg-buildflags --get LDFLAGS) \ -fopenmp -shared -lm -o _compiled.so -fPIC) for pybuilddir in .pybuild/cpython*_*_bumps/build/bumps/dream; do \ cp bumps/dream/_compiled.so $$pybuilddir; \ done # bumps/dream:_compiled.so is hardwired into compiled.py, so don't rename override_dh_python2: dh_python2 --no-ext-rename override_dh_python3: dh_python3 --no-ext-rename override_dh_auto_install-arch: dh_auto_install rm debian/python*-bumps/usr/lib/python*/*packages/bumps/dream/*.so cp bumps/dream/_compiled.so \ debian/bumps-private-libs/usr/lib/bumps/random123_compiled.so override_dh_installinfo-indep: cd build/texinfo; \ for p in *.png; do mv $$p bumps-$$p; done; \ sed "s/@image{/@image{bumps-/" -i bumps.texi; \ makeinfo bumps.texi dh_installinfo override_dh_installman-indep: cp debian/bumps.1 debian/bumps2.1 dh_installman rm debian/bumps2.1 override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) LC_ALL=C.UTF-8 \ PYBUILD_TEST_ARGS_python2="-v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -edream bumps" \ PYBUILD_TEST_ARGS_python3="-v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -edream bumps" \ dh_auto_test endif