#!/usr/bin/make -f

%:
	dh $@ 

override_dh_auto_configure-indep: docflags = --enable-specs --with-xmlto
override_dh_auto_configure-arch: docflags = --disable-specs

override_dh_auto_configure-indep override_dh_auto_configure-arch:
	dh_auto_configure -- \
		$(docflags) \
		--without-fop

override_dh_installdocs:
	dh_installdocs NEWS

override_dh_install:
	# Kill *.xml files, we don't need them:
	find debian/tmp -name '*.xml' -delete
	find debian/tmp -name 'XKBgeom.h' -delete
	dh_install -plibx11-dev \
	           --exclude=usr/include/X11/Xlib-xcb.h
	dh_install -plibx11-doc \
	           --exclude=usr/include/X11/Xlib-xcb.h \
	           --exclude=usr/share/man/man3/XGetXCBConnection.3 \
	           --exclude=usr/share/man/man3/XSetEventQueueOwner.3
	dh_install --remaining-packages

override_dh_makeshlibs:
	dh_makeshlibs -s -plibx11-6 -V'libx11-6 (>= 2:1.6.0)' --add-udeb=libx11-6-udeb -- -c4
	dh_makeshlibs -s -Nlibx11-6 -- -c4
