#!/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 python3,sphinxdoc --buildsystem=pybuild execute_after_dh_auto_clean: rm -rf .mplconfig doc/_build doc/api doc/dream doc/tutorial api dream .cache rm -f bumps/dream/_compiled.so execute_after_dh_install: find debian/python3-bumps/usr -name __pycache__ -exec rm -rf {} + rm -f debian/python3-bumps/usr/lib/python3*/dist-packages/.coverage execute_after_dh_auto_build-indep: PYTHONPATH=`pybuild --print build_dir | awk '{print $$3}'` 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=`pybuild --print build_dir | awk '{print $$3}'` http_proxy='127.0.0.1:9' python3 -m sphinx -N -btexinfo doc/ build/texinfo # texinfo generator execute_after_dh_auto_build-arch: (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 --print build_dir | awk '{print $$3}'`; do \ cp bumps/dream/_compiled.so $$pybuilddir/bumps/dream; \ done # bumps/dream:_compiled.so is hardwired into compiled.py, so don't rename override_dh_python3: dh_python3 --no-ext-rename execute_after_dh_auto_install-arch: 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 execute_before_dh_installinfo-indep: cd build/texinfo; \ makeinfo bumps.texi sed "s|src=\"bumps-figures/|src=\"/usr/share/doc/python-bumps-doc/html/_images/|" -i build/texinfo/bumps.info-1