#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DSPDLOG_BUILD_EXAMPLES=ON \
		-DSPDLOG_BUILD_BENCH=OFF \
		-DSPDLOG_BUILD_TESTS=OFF

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
