#!/usr/bin/make -f export DH_VERBOSE = 1 include /usr/share/dpkg/architecture.mk ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CONFARGS = --host=$(DEB_HOST_GNU_TYPE) endif LIB_DIR = usr/lib/$(DEB_HOST_MULTIARCH) %: dh $@ --buildsystem=meson override_dh_auto_configure: dh_auto_configure --buildsystem=meson --builddirectory=build-sysv -- --libdir=/$(LIB_DIR)/libfakeroot -D ipc=sysv -D program_suffix=-sysv dh_auto_configure --buildsystem=meson --builddirectory=build-tcp -- --libdir=/$(LIB_DIR)/libfakeroot -D ipc=tcp -D program_suffix=-tcp override_dh_auto_build: dh_auto_build --buildsystem=meson --builddirectory=build-sysv dh_auto_build --buildsystem=meson --builddirectory=build-tcp ifneq ($(DEB_HOST_GNU_SYSTEM),gnu) sed 's/@FAKEROOT_SYSV_ALTPRIO@/50/;s/@FAKEROOT_TCP_ALTPRIO@/30/;' \ debian/fakeroot.postinst.in > debian/fakeroot.postinst else sed 's/@FAKEROOT_SYSV_ALTPRIO@/30/;s/@FAKEROOT_TCP_ALTPRIO@/50/;' \ debian/fakeroot.postinst.in > debian/fakeroot.postinst endif sed 's,@LIBDIR@,/$(LIB_DIR),g' \ debian/libfakeroot.links.in > debian/libfakeroot.links override_dh_auto_test: ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) ifeq (,$(findstring hurd, $(DEB_HOST_ARCH_OS))) dh_auto_test --buildsystem=meson --builddirectory=build-sysv endif dh_auto_test --buildsystem=meson --builddirectory=build-tcp endif endif override_dh_auto_install: DESTDIR="$(CURDIR)/debian/tmp" meson install -C build-tcp ls -l debian/tmp/$(LIB_DIR)/libfakeroot $(RM) debian/tmp/$(LIB_DIR)/libfakeroot/libfakeroot-tcp.so mv debian/tmp/$(LIB_DIR)/libfakeroot/libfakeroot-tcp-0.so debian/tmp/$(LIB_DIR)/libfakeroot/libfakeroot-tcp.so DESTDIR="$(CURDIR)/debian/tmp" meson install -C build-sysv $(RM) debian/tmp/$(LIB_DIR)/libfakeroot/libfakeroot-sysv.so mv debian/tmp/$(LIB_DIR)/libfakeroot/libfakeroot-sysv-0.so debian/tmp/$(LIB_DIR)/libfakeroot/libfakeroot-sysv.so mkdir -p debian/tmp/etc/ld.so.conf.d echo /$(LIB_DIR)/libfakeroot > debian/tmp/etc/ld.so.conf.d/fakeroot-$(DEB_HOST_MULTIARCH).conf override_dh_auto_clean: $(RM) -rf obj-sysv obj-tcp build-sysv build-tcp wrapdef.h wrapstruct.h $(RM) debian/fakeroot.postinst $(RM) debian/libfakeroot.links