#!/usr/bin/make -f
# -*- makefile -*-

# Use already defined upstream version as DEB_VERSION_UPSTREAM.
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-htpasswd=no \
		--with-mplayer=/usr/bin/mplayer \
		--with-mpv=/usr/bin/mpv \
		--with-pam \
		--with-pam-service-name=common-auth \
		--with-pamtester=no \
		--with-xcomposite \
		--with-xf86misc=no \
		--with-xfixes \
		--with-xft \
		--with-xkb \
		--with-xrandr \
		--with-xscreensaver=/usr/lib/xscreensaver \
		--with-xss \
		--with-xsync \
		$(NULL)

override_dh_auto_build:
	GIT_VERSION="$(DEB_VERSION_UPSTREAM)" dh_auto_build

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_install:
	dh_auto_install
	find ./debian -type f -name "LICENSE" -delete

override_dh_auto_clean:
	dh_auto_clean
	-rm version.c
