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
|
#!/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 reproducible=+fixfilepath
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
%:
dh "${@}" --buildsystem=cmake --with=python3
override_dh_auto_configure:
dh_auto_configure --sourcedirectory=libcomps/ --builddirectory=build -- \
-DPYTHON_DESIRED:STRING=3 -DLIB_INST_DIR:PATH="/usr/lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)"
override_dh_auto_build:
dh_auto_build --builddirectory=build -- all docs pydocs
override_dh_auto_install:
dh_auto_install --builddirectory=build
# Remove doctree files (redundant, conflicts with reproducible builds)
rm -rfv 'build/src/python/docs/html/.doctrees' 'build/docs/libcomps-doc/html/.doctrees'
# Use system-provided files.
rm -fv 'build/src/python/docs/html/_static/jquery.js' \
'build/src/python/docs/html/_static/underscore.js' \
'build/docs/libcomps-doc/jquery.js' \
'build/src/python/docs/html/_static/doctools.js' \
'build/src/python/docs/html/_static/language_data.js' \
'build/src/python/docs/html/_static/searchtools.js'
# replace buildpath in xml
# find 'build/docs/libcomps-doc/xml' -name "*.xml" -exec sed -i "s|$(CURDIR)|.|g" {} \;
override_dh_auto_clean:
rm -rf libcomps/docs/Doxyfile.user
dh_auto_clean --builddirectory=build
override_dh_auto_test:
dh_auto_test --builddirectory=build
override_dh_missing:
dh_missing --fail-missing
override_dh_install:
if dpkg --compare-versions "$$(dpkg-query -f='$${Version}' --show 'debhelper')" 'ge' '12'; then \
dh_install; \
else \
dh_install --fail-missing ; \
fi
|