--- a/debian/rules 2020-10-15 11:05:15.531617632 +0100 --- b/debian/rules 2020-10-21 12:50:16.231618188 +0100 @@ -154,6 +154,7 @@ # store probed configuration to support cross builds for flavour in $(flavours); do \ install -D -m 644 build-$$flavour/config.sh $(configdata)/config.sh.$$flavour; \ + $(PERL_TO_USE) -pi -e 's@\Q$(CURDIR)\E@/dummy/build/dir@g' $(configdata)/config.sh.$$flavour; \ gzip -n $(configdata)/config.sh.$$flavour; \ done @@ -208,6 +209,11 @@ # fix up generated headers $(PERL_TO_USE) debian/fixheaders $(tmp)/$(lib) + # remove references to the build directory in some files + find $(tmp) \ + -path '*/CORE/config.h' -or -path '*/Config_heavy.pl' | \ + xargs -tr $(PERL_TO_USE) -pi -e 's@\Q$(CURDIR)\E@/dummy/build/dir@g' + ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) # Verify that the headers are usable for ph in `< debian/headers sed -e 's/\.h$$/.ph/'`; do \