#!/usr/bin/make -f

export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

%:
	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
	rm -Rf x2goclient_*.qm
	rm -f 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
