#!/usr/bin/make -f

version := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')

%:
	dh $@ --parallel --dbg-package=kubuntu-notification-helper-dbg --with kf5

override_dh_auto_configure:
	dh_auto_configure -- \
		-DVERSION_STRING=$(version) \
		-DSTART_TIMEOUT="3*60*1000" \
		-DCMAKE_BUILD_TYPE=Debian \
		-DCMAKE_USE_RELATIVE_PATHS=ON \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DKDE_INSTALL_USE_QT_SYS_PATHS=ON

kubuntu_rake:
	rm -rf .kubuntu-rake
	if [ -e .git ]; then \
		git clone kde:scratch/sitter/kubuntu-rake .kubuntu-rake; \
		cp .kubuntu-rake/Rakefile .; \
	fi
	if [ -e Rakefile ]; then rake; fi

override_dh_auto_clean: kubuntu_rake
	dh_auto_clean
