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 51 52 53 54 55 56 57 58 59
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto abi=+time64
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
%:
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
dh $@ --with python3 --exclude=.la
else
dh $@ --exclude=.la
endif
override_dh_auto_configure:
dh_auto_configure -- \
--enable-tools=yes \
--enable-bindings-cxx \
$(NULL)
if ! echo "$(DEB_BUILD_PROFILES)" | grep -q "nopython"; then \
pybuild --configure -d bindings/python/; \
fi
override_dh_auto_build:
dh_auto_build
if ! echo "$(DEB_BUILD_PROFILES)" | grep -q "nopython"; then \
CFLAGS="$(shell dpkg-buildflags --get CFLAGS) -I $(CURDIR)/include -I $(CURDIR)/tests/gpiosim/" \
LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS) -L $(CURDIR)/lib/.libs/ -L $(CURDIR)/tests/gpiosim/.libs/" \
pybuild --build -s pyproject -d bindings/python/; \
fi
if ! echo "$(DEB_BUILD_OPTIONS)" | grep -q "nodoc"; then \
if command -v doxygen >/dev/null; then \
cd docs && doxygen Doxyfile; \
else \
echo "Warning: doxygen not found. Skipping documentation build."; \
fi; \
fi
# Architecture: all only: build the doxygen documentation
override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
dh_auto_build -- doc
endif
# doxygen documentation is installed using dh_installdocs
override_dh_auto_install-indep:
override_dh_auto_install:
dh_auto_install
if ! echo "$(DEB_BUILD_PROFILES)" | grep -q "nopython"; then \
pybuild --install -s pyproject -d bindings/python/; \
fi
override_dh_installdocs:
# fix lintian useless-autogenerated-doxygen-file
dh_installdocs -X.md5
override_dh_clean:
dh_clean
rm -rf confdefs.h
rm -rf doc/*
|