2024-10-27 14:59:34 +01:00
|
|
|
#!/usr/bin/make -f
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
|
|
ENABLE_TESTS=ON
|
|
|
|
else
|
|
|
|
ENABLE_TESTS=OFF
|
|
|
|
endif
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
ifneq (,$(filter $(DEB_HOST_ARCH), armel mipsel powerpc))
|
|
|
|
export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
|
|
|
|
endif
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
%:
|
|
|
|
dh $@
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
override_dh_auto_configure-arch:
|
|
|
|
dh_auto_configure -- -DBUILD_CODE_GEN=ON -DBUILD_TESTS=$(ENABLE_TESTS)
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
override_dh_auto_test-arch:
|
|
|
|
-kill -9 $$(cat /tmp/sdbuscpp.pid)
|
|
|
|
-rm -v /tmp/dbus.conf /tmp/sdbuscpp_bus /tmp/sdbuscpp.pid
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
sed 's|CURDIR|$(CURDIR)|g' debian/dbus.conf.tpl > /tmp/dbus.conf
|
|
|
|
dbus-daemon --config-file /tmp/dbus.conf --fork
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/sdbuscpp_bus dh_auto_test --no-parallel
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
-kill -9 $$(cat /tmp/sdbuscpp.pid)
|
|
|
|
-rm -v /tmp/dbus.conf /tmp/sdbuscpp_bus /tmp/sdbuscpp.pid
|
2024-10-27 14:51:21 +01:00
|
|
|
|
2024-10-27 14:59:34 +01:00
|
|
|
override_dh_auto_configure-indep:
|
|
|
|
dh_auto_configure -- -DBUILD_DOXYGEN_DOC=ON
|
|
|
|
|
|
|
|
override_dh_auto_build-indep:
|
|
|
|
dh_auto_build -- doc
|
|
|
|
|
|
|
|
override_dh_auto_install-indep:
|
|
|
|
dh_auto_install -- -C docs
|
|
|
|
|
|
|
|
override_dh_auto_test-indep:
|