Usage:

rpmbuild --rebuild \
  -D 'kversion KERNEL_VERSION' \
  -D 'kflavors FLAVORS TO BUILD' \
  openvswitch-kmod-VERSION-RELEASE.src.rpm

Signed-off-by: Alexey I. Froloff <ra...@altlinux.org>
---
 INSTALL.RHEL                        |   11 ++++++++++-
 rhel/openvswitch-kmod-rhel6.spec.in |   12 ++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/INSTALL.RHEL b/INSTALL.RHEL
index 3558948..b452383 100644
--- a/INSTALL.RHEL
+++ b/INSTALL.RHEL
@@ -53,7 +53,16 @@ RHEL.  On RHEL 5, the default RPM source directory is
 
        rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
 
-    This produces an "kmod-openvswitch" RPM.
+    You might have to specify a kernel version and/or variants, e.g.:
+
+       rpmbuild -bb \
+               -D "kversion 2.6.32-131.6.1.el6.x86_64" \
+               -D "kflavors default debug kdump" \
+               rhel/openvswitch-kmod-rhel6.spec
+
+    This produces an "kmod-openvswitch" RPM for each kernel variant,
+    in this example: "kmod-openvswitch", "kmod-openvswitch-debug", and
+    "kmod-openvswitch-kdump".
 
 Reporting Bugs
 --------------
diff --git a/rhel/openvswitch-kmod-rhel6.spec.in 
b/rhel/openvswitch-kmod-rhel6.spec.in
index 3a1102d..443ddc5 100644
--- a/rhel/openvswitch-kmod-rhel6.spec.in
+++ b/rhel/openvswitch-kmod-rhel6.spec.in
@@ -26,11 +26,15 @@ BuildRequires:  %kernel_module_package_buildreqs
 # conflicts with the openvswitch-debuginfo package for OVS userspace).
 %undefine _enable_debug_packages
 
-# Uncomment to build "debug" packages
-#kernel_module_package default debug
+# Use -D 'kversion 2.6.32-131.6.1.el6.x86_64' to build package
+# for specified kernel version.
+%{?kversion:%define kernel_version %kversion}
 
-# Build only for standard kernel variant(s)
-%kernel_module_package -n %{oname} default
+# Use -D 'kflavors default debug kdump' to build packages for
+# specified kernel variants.
+%{!?kflavors:%define kflavors default}
+
+%kernel_module_package -n %{oname} %kflavors
 
 %description
 Open vSwitch Linux kernel module.
-- 
1.7.3.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to