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.
11 %define oname openvswitch
16 Summary: Open vSwitch kernel module
20 URL: http://openvswitch.org/
21 Source0: %{oname}-%{version}.tar.gz
22 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
23 BuildRequires: %kernel_module_package_buildreqs
25 # Without this we get an empty openvswitch-debuginfo package (whose name
26 # conflicts with the openvswitch-debuginfo package for OVS userspace).
27 %undefine _enable_debug_packages
29 # Uncomment to build "debug" packages
30 #kernel_module_package default debug
32 # Build only for standard kernel variant(s)
33 %kernel_module_package -n %{oname} default
36 Open vSwitch Linux kernel module.
40 %setup -n %{oname}-%{version}
43 for flavor in %flavors_to_build; do
45 (cd _$flavor && ../configure --with-linux="%{kernel_source $flavor}")
46 %{__make} -C _$flavor/datapath/linux %{?_smp_mflags}
50 export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
51 export INSTALL_MOD_DIR=extra/%{oname}
52 for flavor in %flavors_to_build ; do
53 make -C %{kernel_source $flavor} modules_install \
54 M=$PWD/_$flavor/datapath/linux
58 rm -rf $RPM_BUILD_ROOT