aboutsummaryrefslogtreecommitdiffstats
path: root/config/zfs-build.m4
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-02-17 12:10:17 -0800
committerBrian Behlendorf <[email protected]>2013-03-18 15:33:17 -0700
commitf3757573a677e8662e268f0bb8e5ffe750013088 (patch)
treea0001b1a30360d4b85f5b5e2a7229697eae6704f /config/zfs-build.m4
parent9b2af9a097c119b818bd584eb89ca51ba475c7f2 (diff)
Refresh RPM packaging
Refresh the existing RPM packaging to conform to the 'Fedora Packaging Guidelines'. This includes adopting the kmods2 packaging standard which is used fod kmods distributed by rpmfusion for Fedora/RHEL. http://fedoraproject.org/wiki/Packaging:Guidelines http://rpmfusion.org/Packaging/KernelModules/Kmods2 While the spec files have been entirely rewritten from a user perspective the only major changes are: * The Fedora packages now have a build dependency on the rpmfusion repositories. The generic kmod packages also have a new dependency on kmodtool-1.22 but it is bundled with the source rpm so no additional packages are needed. * The kernel binary module packages have been renamed from zfs-modules-* to kmod-zfs-* as specificed by kmods2. * The is now a common kmod-zfs-devel-* package in addition to the per-kernel devel packages. The common package contains the development headers while the per-kernel package contains kernel specific build products. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1341
Diffstat (limited to 'config/zfs-build.m4')
-rw-r--r--config/zfs-build.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index f05a4dcd0..cccd87ff2 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -109,6 +109,11 @@ dnl # Check for rpm+rpmbuild to build RPM packages. If these tools
dnl # are missing it is non-fatal but you will not be able to build
dnl # RPM packages and will be warned if you try too.
dnl #
+dnl # By default the generic spec file will be used because it requires
+dnl # minimal dependencies. Distribution specific spec files can be
+dnl # placed under the 'rpm/<distribution>' directory and enabled using
+dnl # the --with-spec=<distribution> configure option.
+dnl #
AC_DEFUN([ZFS_AC_RPM], [
RPM=rpm
RPMBUILD=rpmbuild
@@ -133,6 +138,25 @@ AC_DEFUN([ZFS_AC_RPM], [
AC_MSG_RESULT([$HAVE_RPMBUILD])
])
+ RPM_DEFINE_COMMON=
+ RPM_DEFINE_UTIL=
+ RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
+ RPM_DEFINE_DKMS=
+
+ SRPM_DEFINE_COMMON='--define "build_src_rpm 1"'
+ SRPM_DEFINE_UTIL=
+ SRPM_DEFINE_KMOD=
+ SRPM_DEFINE_DKMS=
+
+ RPM_SPEC_DIR="rpm/generic"
+ AC_ARG_WITH([spec],
+ AS_HELP_STRING([--with-spec=SPEC],
+ [Spec files 'generic|fedora']),
+ [RPM_SPEC_DIR="rpm/$withval"])
+
+ AC_MSG_CHECKING([whether spec files are available])
+ AC_MSG_RESULT([yes ($RPM_SPEC_DIR/*.spec.in)])
+
AC_SUBST(HAVE_RPM)
AC_SUBST(RPM)
AC_SUBST(RPM_VERSION)
@@ -140,6 +164,16 @@ AC_DEFUN([ZFS_AC_RPM], [
AC_SUBST(HAVE_RPMBUILD)
AC_SUBST(RPMBUILD)
AC_SUBST(RPMBUILD_VERSION)
+
+ AC_SUBST(RPM_SPEC_DIR)
+ AC_SUBST(RPM_DEFINE_UTIL)
+ AC_SUBST(RPM_DEFINE_KMOD)
+ AC_SUBST(RPM_DEFINE_DKMS)
+ AC_SUBST(RPM_DEFINE_COMMON)
+ AC_SUBST(SRPM_DEFINE_UTIL)
+ AC_SUBST(SRPM_DEFINE_KMOD)
+ AC_SUBST(SRPM_DEFINE_DKMS)
+ AC_SUBST(SRPM_DEFINE_COMMON)
])
dnl #