#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --parallel --with apache2

override_dh_auto_configure:
	cp ChangeLog txt/changelog
	dh_auto_configure

override_dh_auto_clean:
	dh_auto_clean
	# clean stray .qm files that are not handled by clean rule in upstream Makefile
	mkdir -p txt/
	rm -Rf res/i18n/x2goclient_*.qm
	rm -f  res/txt/changelog

override_dh_strip:
	dh_strip -p x2goclient --dbg-package=x2goclient-dbg
	dh_strip -p x2goplugin --dbg-package=x2goplugin-dbg

override_dh_apache2:
	dh_apache2 --noscripts

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
