aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-02-05 20:42:52 -0800
committerGitHub <[email protected]>2018-02-05 20:42:52 -0800
commit3d25488afbc2eeaa92b12f7f8b6d686e7ef342eb (patch)
treee1f1d9dcdbe87bfca5e660f9259dfd302b065243
parent2b84817f66468da11d5c4373602a0044af46b572 (diff)
Fix default libdir for Debian/Ubuntu
The distribution provided architecture specific RPM macro files for x86_64 and other architectures on Debian/Ubuntu specify the wrong default libdir install location. When building deb packages override _lib with the correct location. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: loli10K <[email protected]> Reviewed by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7083 Closes #7101
-rw-r--r--config/zfs-build.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index adc99edf5..603dad36d 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -192,6 +192,19 @@ AC_DEFUN([ZFS_AC_RPM], [
RPM_DEFINE_UTIL+=' $(DEFINE_INITRAMFS)'
RPM_DEFINE_UTIL+=' $(DEFINE_SYSTEMD)'
+ dnl # Override default lib directory on Debian/Ubuntu systems. The provided
+ dnl # /usr/lib/rpm/platform/<arch>/macros files do not specify the correct
+ dnl # path for multiarch systems as described by the packaging guidelines.
+ dnl #
+ dnl # https://wiki.ubuntu.com/MultiarchSpec
+ dnl # https://wiki.debian.org/Multiarch/Implementation
+ dnl #
+ AS_IF([test "$DEFAULT_PACKAGE" = "deb"], [
+ MULTIARCH_LIBDIR="lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
+ RPM_DEFINE_UTIL+=' --define "_lib $(MULTIARCH_LIBDIR)"'
+ AC_SUBST(MULTIARCH_LIBDIR)
+ ])
+
RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
RPM_DEFINE_KMOD+=' --define "require_spldir $(SPL)"'
RPM_DEFINE_KMOD+=' --define "require_splobj $(SPL_OBJ)"'