#!/usr/bin/make -f ifeq (,$(filter terse,${DEB_BUILD_OPTIONS})) export DH_VERBOSE=1 export V=1 export VERBOSE=1 endif LC_ALL:=C.UTF-8 export LC_ALL shellescape='$(subst ','\'',$(1))' shellexport=$(1)=$(call shellescape,${$(1)}) OUR_CPPFLAGS:= OUR_CFLAGS:= OUR_LDFLAGS:= -Wl,--as-needed include /usr/share/dpkg/buildtools.mk dpkgbuildflagsmkescape=$(subst \,\\\,$(1)) export DEB_BUILD_MAINT_OPTIONS:=hardening=+all export DEB_CPPFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CPPFLAGS}) export DEB_CFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CFLAGS}) export DEB_LDFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_LDFLAGS}) DPKG_EXPORT_BUILDFLAGS:=1 include /usr/share/dpkg/default.mk export PKG_CONFIG_PATH=${CURDIR}/pkgconfig # this is precisely what dh_auto_configure does CONFIGURE_ARGS:= --build=${DEB_BUILD_GNU_TYPE} \ --prefix=/usr \ --includedir=\$${prefix}/include \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-silent-rules \ --libdir=\$${prefix}/lib/${DEB_HOST_MULTIARCH} \ --libexecdir=\$${prefix}/lib/${DEB_HOST_MULTIARCH} \ --disable-maintainer-mode \ --disable-dependency-tracking \ ifneq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE}) CONFIGURE_ARGS+= --host=${DEB_HOST_GNU_TYPE} endif ifeq (x32,${DEB_HOST_ARCH}) # autodetection fails on x32 (wrongly recognised as amd64) CONFIGURE_ARGS+= --without-simd endif %: dh $@ override_dh_auto_configure: ./bootstrap ./configure \ --enable-glamor \ ${CONFIGURE_ARGS} find . -name Makefile -print0 | \ xargs -0 perl -pi -e 's!XRDP_PID_PATH.*?/run!$$&/xrdp!g' -- override_dh_install: dh_install # these are not normally shipped with X server modules bash -c 'rm -f debian/*/usr/lib/xorg/modules/{,*/}*.{a,la}' override_dh_shlibdeps: # That's a plugin, use appropriate warning level: dh_shlibdeps -- --warnings=6 override_dh_gencontrol: echo >>debian/xorgxrdp.substvars "xdriver:Depends=$$( \ (cd /usr/share/xserver-xorg && cat videodrvdep xinputdep) | \ sed 's/, /\n/g' | sort -u | \ perl -0e 'print join(", ", split(/\n/, <>));')" dh_gencontrol override_dh_clean: dh_clean chmod +x tests/xorg-test-run.sh