diff options
author | Dmitry Bogatov <KAction@debian.org> | 2018-12-05 14:49:42 +0000 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2018-12-05 15:45:46 +0000 |
commit | 126e981d5748c2ab1b0f0c50eb0b9b0de3afab01 (patch) | |
tree | 4155c806459af5fb06f684b97c7c25e6387c2176 | |
parent | cd18cb5c5732720f663d1ee2333fa43427fd0d3b (diff) |
Do not include build path into resulting scripts (Closes: #915511)
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/0004-respect-DESTDIR-variable.patch | 26 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 15 |
4 files changed, 41 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 32489d6..888230a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ucspi-tcp (1:0.88-5) UNRELEASED; urgency=medium + + * Do not include build path into resulting scripts (Closes: #915511) + + Make upstream build system respect $(DESTDIR) variable + + -- Dmitry Bogatov <KAction@debian.org> Wed, 05 Dec 2018 14:48:37 +0000 + ucspi-tcp (1:0.88-4) unstable; urgency=medium * New maintainer (Closes: #907094) diff --git a/debian/patches/0004-respect-DESTDIR-variable.patch b/debian/patches/0004-respect-DESTDIR-variable.patch new file mode 100644 index 0000000..614ff6b --- /dev/null +++ b/debian/patches/0004-respect-DESTDIR-variable.patch @@ -0,0 +1,26 @@ +Description: Make upstream build system respect $(DESTDIR) + Upstream build system does not make difference between installation + prefix (named HOME by upstream), embedded in compiled software, and + installation root $(DESTDIR), making staged install, employed by most + package managers impossible. + . + This patch adjust upstream Makefile to respect $(DESTDIR) variable. To + configure prefix, use `conf-home' file. +Author: Dmitry Bogatov <KAction@debian.org> +Forwarded: no +Last-Update: 2018-12-05 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: ucspi-tcp/Makefile +=================================================================== +--- ucspi-tcp.orig/Makefile ++++ ucspi-tcp/Makefile +@@ -38,7 +38,7 @@ compile auto-str.c buffer.h readwrite.h + + auto_home.c: \ + auto-str conf-home +- ./auto-str auto_home `head -1 conf-home` > auto_home.c ++ ./auto-str auto_home $(DESTDIR)/`head -1 conf-home` > auto_home.c + + auto_home.o: \ + compile auto_home.c diff --git a/debian/patches/series b/debian/patches/series index fa68b20..e8da398 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-error.h-include-errno.h-instead-of-extern-int.diff 0002-rblsmtpd.c-don-t-use-a-the-default-rbl.maps.vix.com.diff 0003-Makefile-target-choose-do-not-depend-on-conf-home.diff +0004-respect-DESTDIR-variable.patch diff --git a/debian/rules b/debian/rules index 41ef77c..d257207 100755 --- a/debian/rules +++ b/debian/rules @@ -5,33 +5,32 @@ include /usr/share/dpkg/default.mk export CFLAGS += $(shell getconf LFS_CFLAGS) export LDFLAGS += $(shell getconf LFS_LDFLAGS) -PREFIX_IPV4 = $(CURDIR)/debian/ucspi-tcp/usr -PREFIX_IPV6 = $(CURDIR)/debian/ucspi-tcp-ipv6/usr +PREFIX_IPV4 = $(CURDIR)/debian/ucspi-tcp +PREFIX_IPV6 = $(CURDIR)/debian/ucspi-tcp-ipv6 %: dh $@ override_dh_auto_configure: - echo $(PREFIX_IPV4) > conf-home mkdir ipv6 xargs install -t ipv6 < FILES cd ipv6 && patch -p1 < ../debian/ipv6-support.patch - echo $(PREFIX_IPV6) > ipv6/conf-home + echo '/usr' | tee conf-home ipv6/conf-home echo '$(CC) $(CFLAGS) $(CPPFLAGS)' | tee ipv6/conf-cc conf-cc echo '$(CC) $(LDFLAGS)' | tee ipv6/conf-ld conf-ld override_dh_auto_build: - $(MAKE) - $(MAKE) -C ipv6 + $(MAKE) DESTDIR=$(PREFIX_IPV4) + $(MAKE) -C ipv6 DESTDIR=$(PREFIX_IPV6) override_dh_auto_install: - mkdir -p $(PREFIX_IPV4) $(PREFIX_IPV6) + mkdir -p $(PREFIX_IPV4)/usr $(PREFIX_IPV6)/usr ./install ./instcheck cd ipv6 && ./install && ./instcheck # ./install incorrectly install manpages under /usr/man, not # /usr/share/man. - rm -r $(PREFIX_IPV6)/man + rm -r $(PREFIX_IPV6)/usr/man # Upstream does strange thing -- its test suite assumes that programs # are already installed. Normally, checks are performed between `build' |