#!/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_install:
	dh_auto_install -- PREFIX=/usr

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 --dbgsym-migration='x2goclient-dbg (<< 4.1.0.1-1~)'
	dh_strip -p x2goplugin --dbgsym-migration='x2goplugin-dbg (<< 4.1.0.1-1~)'

override_dh_apache2:
	dh_apache2 --noscripts

override_dh_missing:
	dh_missing --fail-missing

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