1 # Spec file for Open vSwitch kernel modules on Red Hat Enterprise
4 # Copyright (C) 2011 Nicira Networks, Inc.
6 # Copying and distribution of this file, with or without modification,
7 # are permitted in any medium without royalty provided the copyright
8 # notice and this notice are preserved. This file is offered as-is,
9 # without warranty of any kind.
14 Summary: Open vSwitch kernel module
18 URL: http://openvswitch.org/
19 Source0: %{name}-%{version}.tar.gz
20 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
21 BuildRequires: %kernel_module_package_buildreqs
23 # Without this we get an empty openvswitch-debuginfo package (whose name
24 # conflicts with the openvswitch-debuginfo package for OVS userspace).
25 %undefine _enable_debug_packages
27 # Uncomment to build "debug" packages
28 #kernel_module_package default debug
30 # Build only for standard kernel variant(s)
31 %kernel_module_package default
34 Open vSwitch Linux kernel module.
41 for flavor in %flavors_to_build; do
43 (cd _$flavor && ../configure --with-linux="%{kernel_source $flavor}")
44 %{__make} -C _$flavor/datapath/linux-2.6 %{?_smp_mflags}
48 export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
49 export INSTALL_MOD_DIR=extra/%{name}
50 for flavor in %flavors_to_build ; do
51 make -C %{kernel_source $flavor} modules_install \
52 M=$PWD/_$flavor/datapath/linux-2.6
56 rm -rf $RPM_BUILD_ROOT