#!/usr/bin/make -f

ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

# Read in architecture-specific variables of importance.
include debian/scripts/vars.$(ARCH)

%:
	dh $@ --parallel

override_dh_auto_clean:
	$(MAKE) -C xsf-docs clean

override_dh_auto_build:
	$(MAKE) -C xsf-docs

override_dh_install:
	$(MAKE) -C xsf-docs install DESTDIR=$(CURDIR)/debian/xserver-xorg/usr/share/doc/xorg
	dh_install

override_dh_installinit:
	dh_installinit -px11-common -u'start 70 S .'

override_dh_fixperms:
	dh_fixperms
	chown root:root debian/x11-common/etc/X11/Xreset
	chmod 755 debian/x11-common/etc/X11/Xreset
	chown root:root debian/x11-common/etc/X11/Xsession
	chmod 755 debian/x11-common/etc/X11/Xsession

override_dh_gencontrol:
	dh_gencontrol -- -VF:XServer-Xorg-Video-Depends=$(XSERVER_XORG_VIDEO_DEPENDS) \
	                 -VF:XServer-Xorg-Input-Depends=$(XSERVER_XORG_INPUT_DEPENDS) \
	                 -VF:XServer-Xorg-Video-Recommends=$(XSERVER_XORG_VIDEO_RECOMMENDS) \
	                 -VF:XServer-Xorg-Input-Recommends=$(XSERVER_XORG_INPUT_RECOMMENDS)

# vim:set noet ai sts=8 sw=8 tw=0:
