summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:37:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:37:48 +0000
commitde85f20e859fad79dc95aaca554c4fa09e920374 (patch)
treed658ca6f0c6446d5bb248240d0fc1876d04d5f0b /debian/rules
parentMerging upstream version 13.3. (diff)
downloadbase-files-debian.tar.xz
base-files-debian.zip
Adding debian version 13.3.debian/13.3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules28
1 files changed, 27 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 05dfb39..17ad36f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/architecture.mk
+
OSNAME = "GNU/`uname | sed -e 's/GNU\///'`"
ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
OSNAME=GNU/Linux
@@ -11,6 +13,14 @@ endif
VENDORFILE = debian
DESTDIR = debian/base-files
+ifneq (,$(filter $(DEB_HOST_ARCH),amd64 loong64 mips64el ppc64 ppc64el sparc64))
+ USR_MERGE_RTLDLIB = lib64
+else ifneq (,$(filter $(DEB_HOST_ARCH),x32))
+ USR_MERGE_RTLDLIB = libx32
+endif
+USR_MERGE = bin lib sbin $(USR_MERGE_RTLDLIB)
+USR_MERGE_MULTILIB = $(filter-out $(USR_MERGE),lib32 lib64 libo32 libx32)
+
%:
dh $@
@@ -19,6 +29,15 @@ execute_after_dh_clean:
override_dh_auto_build:
sh debian/check-md5sum-etc profile
+ set -e; { \
+ echo "# Triggers for creating multilib aliasing symlinks on demand"; \
+ for d in $(USR_MERGE_MULTILIB); do \
+ echo "interest-noawait /usr/$$d"; \
+ done; \
+ } > debian/triggers
+
+execute_after_dh_installdirs:
+ dh_installdirs $(foreach d,$(USR_MERGE),usr/$(d))
override_dh_auto_install:
install -p -m 644 etc/* $(DESTDIR)/etc
@@ -42,6 +61,10 @@ override_dh_installchangelogs:
override_dh_link:
dh_link -X os-release
+ # We want these links to be relative, so we cannot use dh_link.
+ set -e; for d in $(USR_MERGE); do \
+ ln -s usr/$$d debian/base-files/$$d; \
+ done
override_dh_compress:
dh_compress -X README
@@ -55,4 +78,7 @@ override_dh_fixperms:
cd debian/base-files && chmod 700 root
override_dh_installdeb:
- dh_installdeb -DVENDORFILE=$(VENDORFILE)
+ dh_installdeb \
+ '-DVENDORFILE=$(VENDORFILE)' \
+ '-DUSR_MERGE_MULTILIB=$(USR_MERGE_MULTILIB)' \
+ '-DUSR_MERGE_RTLDLIB=$(USR_MERGE_RTLDLIB)'