#!/usr/bin/make -f

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --with autoreconf

ifneq ($(DEB_HOST_ARCH_OS), linux)
override_dh_auto_configure:
	dh_auto_configure -- --with-consolekit
endif

get-orig-source:
	uscan --verbose --force-download --no-symlink
	@if test -e ../wmshutdown-*.download ; then \
		rename -f -v "s/wmshutdown-(.+)\.download/wmshutdown_\1\.orig\.tar\.gz/" \
			../wmshutdown-*.download; \
	fi
