#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
ifneq ($(DEB_HOST_ARCH_OS),linux)
CONFIGURE_ARGS += -DWITH_ALSA=OFF
endif

%:
	dh $@ --with kde

override_dh_auto_configure:
	dh_auto_configure --buildsystem=kde -- $(CONFIGURE_ARGS)

override_dh_auto_install:
	dh_auto_install --buildsystem=kde
	# remove useless documentation shipped upstream
	rm -f \
	    $(CURDIR)/debian/kradio4/usr/share/doc/kradio4/COPYING \
	    $(CURDIR)/debian/kradio4/usr/share/doc/kradio4/INSTALL
	# remove changelog installed by upstream, dh_installchangelogs will do it
	rm -f $(CURDIR)/debian/kradio4/usr/share/doc/kradio4/ChangeLog

.PHONY: override_dh_auto_test
