#!/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 \ --with-socketdir=/run/xrdp/sockdir 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 ifeq (hurd,${DEB_HOST_ARCH_OS}) # fuse_lowlevel.h is not yet usable CONFIGURE_ARGS+= --disable-fuse endif %: dh $@ override_dh_auto_configure: ./bootstrap cd librfxcodec && ./bootstrap cd libpainter && ./bootstrap ./configure \ --enable-ipv6 \ --enable-jpeg \ --enable-fuse \ --enable-rfxcodec \ --enable-opus \ --enable-painter \ --enable-vsock \ ${CONFIGURE_ARGS} cd librfxcodec && ./configure \ --disable-shared \ --enable-static \ ${CONFIGURE_ARGS} cd libpainter && ./configure \ --disable-shared \ --enable-static \ ${CONFIGURE_ARGS} find . -name Makefile -print0 | \ xargs -0 perl -pi -e 's!XRDP_PID_PATH.*?/run!$$&/xrdp!g' -- override_dh_auto_install: # prevent install-data-hook from generating these mkdir -p debian/xrdp/etc/xrdp touch debian/xrdp/etc/xrdp/rsakeys.ini touch debian/xrdp/etc/xrdp/cert.pem dh_auto_install -v --destdir=debian/xrdp # remove unused/confusing files rm -f debian/xrdp/etc/xrdp/xrdp.sh rm -f debian/xrdp/etc/xrdp/startwm.sh rm -f debian/xrdp/etc/xrdp/rsakeys.ini rm -f debian/xrdp/usr/bin/rfxcodectest rm -f debian/xrdp/etc/xrdp/cert.pem rm -f debian/xrdp/etc/xrdp/key.pem # Policy find debian/xrdp/ -name \*.la -print0 | xargs -0 rm -f -- find debian/xrdp/usr/lib/ -name \*.a -print0 | \ xargs -0 strip --strip-debug -R .comment -- override_dh_auto_test: @echo skip tests override_dh_installchangelogs: dh_installchangelogs -pxrdp -- NEWS.md dh_installchangelogs --remaining-packages override_dh_installinit: dh_installinit --no-stop-on-upgrade override_dh_installsystemd: dh_installsystemd --no-stop-on-upgrade