#!/usr/bin/make -f # debian/rules for the Debian xdm package. # Copyright © 2004 Scott James Remnant # Copyright © 2005 Daniel Stone # Copyright © 2005 David Nusinow # Copyright © 2006 Eugene Konev # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # set this to the name of the main shlib's binary package PACKAGE = xdm include debian/xsfbs/xsfbs.mk export deb_systemdsystemunitdir := $(shell pkgconf --variable=systemdsystemunitdir systemd | sed s,^/,,) confflags += \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --with-pam \ --with-xdmconfigdir=/etc/X11/xdm \ --with-xdmscriptdir=\$${xdmconfigdir} \ --with-authdir=/var/lib/xdm \ --with-pixmapdir=/usr/share/X11/xdm/pixmaps \ --with-color-pixmap=debian.xpm \ --with-bw-pixmap=debianbw.xpm \ --with-systemdsystemunitdir \ --disable-xdm-auth \ --with-xft \ --disable-silent-rules \ $(NULL) # Temp fix for https://bugs.debian.org/1075656 configure_vars = $(shell DEB_BUILD_MAINT_OPTIONS="hardening=+pie,+bindnow" DEB_CFLAGS_MAINT_APPEND="-Wall -fpermissive" dpkg-buildflags --export=configure) ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build=$(DEB_HOST_GNU_TYPE) else confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) endif ifeq ($(DEB_BUILD_ARCH_OS), linux) confflags += --with-selinux endif ifneq ($(DEB_BUILD_ARCH_OS), hurd) confflags += --with-default-vt=vt7 endif BUILD_DIR := build stampdir_targets+=config config: $(STAMP_DIR)/config $(STAMP_DIR)/config: $(STAMP_DIR)/patch dh_testdir autoreconf -vfi >$@ build-arch: build stampdir_targets+=build build: $(STAMP_DIR)/build $(STAMP_DIR)/build: $(STAMP_DIR)/prepare $(STAMP_DIR)/config dh_testdir mkdir -p $(BUILD_DIR) cd $(BUILD_DIR) && \ ../configure \ $(confflags) \ $(configure_vars) \ APP_MAN_SUFFIX=1 \ DEF_USER_PATH="/usr/local/bin:/usr/bin:/bin:/usr/games" \ DEF_SYSTEM_PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" cd $(BUILD_DIR) && $(MAKE) >$@ stampdir_targets+=install install: $(STAMP_DIR)/install $(STAMP_DIR)/install: $(STAMP_DIR)/build $(STAMP_DIR)/genscripts dh_testdir dh_testroot dh_prep dh_installdirs cd $(BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install install -m 755 debian/local/Xstartup \ debian/tmp/etc/X11/xdm/ install -m 755 debian/local/Xreset \ debian/tmp/etc/X11/xdm/ install -m 755 debian/local/Xsetup \ debian/tmp/etc/X11/xdm/ install -m 644 debian/local/xdm.options \ debian/tmp/etc/X11/xdm/ install -d debian/tmp/usr/share/man/man5 install -m 644 debian/local/xdm.options.5 \ debian/tmp/usr/share/man/man5/ install -m 644 debian/local/debian.xpm \ debian/tmp/usr/share/X11/xdm/pixmaps/ install -m 644 debian/local/debianbw.xpm \ debian/tmp/usr/share/X11/xdm/pixmaps/ install -d debian/tmp/etc/insserv.conf.d install -m 644 debian/xdm.insserv \ debian/tmp/etc/insserv.conf.d/xdm >$@ clean: xsfclean dh_testdir rm -rf $(BUILD_DIR) rm -f aclocal.m4 compile config.guess config.sub config.h.in configure rm -f depcomp install-sh ltmain.sh missing INSTALL rm -f m4/lt*.m4 m4/libtool.m4 rm -f $$(find -name Makefile.in) dh_clean # Build architecture-dependent files here. binary-arch: $(STAMP_DIR)/install dh_testdir dh_testroot dh_installdocs chmod +x debian/xdm.install dh_install --sourcedir=debian/tmp --list-missing dh_installchangelogs ChangeLog dh_installinit --noscripts dh_installdebconf dh_installlogrotate dh_installpam dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb # Build architecture-independent files here. binary-indep: $(STAMP_DIR)/install # Nothing to do binary: binary-indep binary-arch .PHONY: build install clean binary binary-indep binary-arch