#!/usr/bin/make -f # Debian rules file for xfree86 source package # Originally by Stephen Early # Modified by Mark W. Eichin # Modified by Adam Heath # Modified by Branden Robinson # Modified by Fabio Massimo Di Nitto # Modified by Daniel Stone # Modified by David Nusinow # Copyright 1996--2005 Software in the Public Interest, Inc. # Licensed under the GNU General Public License, version 2. See the file # /usr/share/common-licenses/GPL or . # Acknowledgements to Stephen Early, Mark Eichin, and Manoj Srivastava. DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CC=$(DEB_HOST_GNU_TYPE)-gcc else CC ?=gcc endif CFLAGS = \ -Wall \ $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS) CPPFLAGS = \ $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS) LDFLAGS = \ $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS) # debhelper export DH_OPTIONS include debian/xsfbs/xsfbs.mk DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) # Read in architecture-specific variables of importance. include debian/scripts/vars.$(ARCH) clean: cleanscripts dh_testdir dh_clean debian/local/X debian/po/pothead $(MAKE) -C xsf-docs clean -rm -rf stampdir -debconf-updatepo SCRIPTS=$(shell ls debian/*.config.in debian/*.postinst.in debian/*.postrm.in debian/*.preinst.in debian/*.prerm.in) scripts: scripts-stamp scripts-stamp: genscripts touch $@ build: build-stamp build-stamp: scripts-stamp dh_testdir # build Debian's X server wrapper $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o debian/local/X debian/local/xserver-wrapper.c $(MAKE) -C xsf-docs touch $@ build-arch-only: build build-all: install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot dh_prep $(MAKE) -C xsf-docs install DESTDIR=$(CURDIR)/debian/xserver-xorg/usr/share/doc/xorg touch $@ binary-indep: DH_OPTIONS=-i binary-indep: build install dh_testdir dh_testroot dh_install dh_installdebconf dh_installdirs dh_installdocs dh_installchangelogs dh_installinit -px11-common -u'start 70 S .' dh_installman dh_lintian dh_link dh_compress set -e ;\ for p in $$(dh_listpackages -i); do \ ( \ echo "# Undo doc-dir symlinking. Leave this to pkgbinarymangler"; \ echo "# This can be removed after the next LTS" ; \ echo 'if [ "$$1" = upgrade ] && [ -L /usr/share/doc/'$$p' ]; then'; \ echo " rm -f /usr/share/doc/$$p"; \ echo "fi"; \ ) >> debian/$$p.preinst.debhelper; \ done 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 dh_installdeb dh_gencontrol dh_md5sums dh_builddeb touch $@-stamp binary-arch: DH_OPTIONS=-s binary-arch: build install dh_testdir dh_testroot dh_install ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) install -d debian/xserver-xorg/usr/lib/hal install -d debian/xserver-xorg/usr/share/hal/fdi/policy/10osvendor install -m 755 debian/local/debian-setup-keyboard debian/xserver-xorg/usr/lib/hal install -m 644 debian/local/debian-x11-keymap.fdi debian/xserver-xorg/usr/share/hal/fdi/policy/10osvendor endif dh_installdebconf dh_installdirs dh_installdocs dh_installexamples dh_installman dh_installchangelogs dh_lintian dh_link dh_strip dh_compress set -e ;\ for p in $$(dh_listpackages -a); do \ ( \ echo "# Undo doc-dir symlinking. Leave this to pkgbinarymangler."; \ echo "# This can be removed after the next LTS" ; \ echo 'if [ "$$1" = upgrade ] && [ -L /usr/share/doc/'$$p' ]; then'; \ echo " rm -f /usr/share/doc/$$p"; \ echo "fi"; \ ) >> debian/$$p.preinst.debhelper; \ done dh_fixperms chown root:root debian/xserver-xorg/usr/bin/X chmod ug+s debian/xserver-xorg/usr/bin/X dh_installdeb dh_shlibdeps 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) dh_md5sums dh_builddeb touch $@-stamp binary: binary-indep binary-arch .PHONY: default .PHONY: genscripts cleanscripts scripts .PHONY: updatepo .PHONY: clean configure install .PHONY: build build-arch-only build-all .PHONY: binary binary-arch binary-indep .PHONY: environment # vim:set noet ai sts=8 sw=8 tw=0: