#!/usr/bin/make -f

ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
  export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif

%:
	dh $@

override_dh_auto_install:
	rm -f example/logs/.gitignore
	dh_auto_install
	rm debian/libspdlog-dev/usr/include/spdlog/fmt/bundled/LICENSE.rst
	find debian -name .gitignore -delete

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd tests && ${MAKE} tests clean
	dh_auto_test
endif