#!/usr/bin/make -f

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=RelWithDebInfo
else
	CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Debug
endif


override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_OPTIONS)

override_dh_auto_install-arch:
	dh_auto_configure -- $(CMAKE_OPTIONS) -DLOCAL:bool=off
	dh_auto_install
	chrpath --delete $(CURDIR)/debian/tmp/usr/bin/cupt

override_dh_auto_install-indep:
	install -m644 scripts/logrotate $(CURDIR)/debian/libcupt-common/etc/logrotate.d/cupt

override_dh_strip:
	dh_strip --dbg-package=cupt-dbg

%:
	dh --parallel $@ --with bash-completion
