RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)" --define "require_spldir $(SPL)" --define "require_splobj $(SPL_OBJ)" --define "ksrc $(LINUX)" --define "kobj $(LINUX_OBJ)"'
RPM_DEFINE_DKMS=
+ 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)
+ ])
+
SRPM_DEFINE_COMMON='--define "build_src_rpm 1"'
SRPM_DEFINE_UTIL=
SRPM_DEFINE_KMOD=