#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake --builddirectory=build

override_dh_auto_configure: debian/awesome.xpm
	dh_auto_configure -- -DSYSCONFDIR=/etc

debian/awesome.xpm: icons/awesome32.png
	convert $< $@

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# run unit tests here.
	# the generic check target also runs integration tests,
	# which are better suited as autopkgtest.
	$(MAKE) -C build check-unit
endif

override_dh_installchangelogs:
	install -D -T docs/89-NEWS.md debian/awesome/usr/share/doc/awesome/NEWS
	dh_installchangelogs
