+ RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
+ RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_ZFS) 1"'
+ RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
+ RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"'
+ RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"'
+
+ RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
+
+ dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
+ dnl # their values may not be set when running:
+ dnl #
+ dnl # ./configure --with-config=srpm
+ dnl #
+ AS_IF([test -n "$dracutdir" ], [
+ RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
+ ])
+ AS_IF([test -n "$udevdir" ], [
+ RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
+ ])
+ AS_IF([test -n "$udevruledir" ], [
+ RPM_DEFINE_UTIL+=' --define "_udevdir $(udevruledir)"'
+ ])
+ RPM_DEFINE_UTIL+=' $(DEFINE_INITRAMFS)'
+ RPM_DEFINE_UTIL+=' $(DEFINE_SYSTEMD)'
+ RPM_DEFINE_UTIL+=' $(DEFINE_PYZFS)'
+ RPM_DEFINE_UTIL+=' $(DEFINE_PYTHON_VERSION)'
+ RPM_DEFINE_UTIL+=' $(DEFINE_PYTHON_PKG_VERSION)'
+
+ dnl # Override default lib directory on Debian/Ubuntu systems. The
+ dnl # provided /usr/lib/rpm/platform/<arch>/macros files do not
+ dnl # specify the correct path for multiarch systems as described
+ dnl # 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 "ksrc $(LINUX)"'
+ RPM_DEFINE_KMOD+=' --define "kobj $(LINUX_OBJ)"'
+ RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"'
+
+ RPM_DEFINE_DKMS=''