configure: Change --with-l26 to --with-linux.
[sliver-openvswitch.git] / rhel / openvswitch-kmod-rhel6.spec.in
1 # Spec file for Open vSwitch kernel modules on Red Hat Enterprise
2 # Linux 6.
3
4 # Copyright (C) 2011 Nicira Networks, Inc.
5 #
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.
10
11 Name:           openvswitch
12 Version:        @VERSION@
13 Release:        1%{?dist}
14 Summary:        Open vSwitch kernel module
15
16 Group:          System/Kernel
17 License:        GPLv2
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
22
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
26
27 # Uncomment to build "debug" packages
28 #kernel_module_package default debug
29
30 # Build only for standard kernel variant(s)
31 %kernel_module_package default
32
33 %description
34 Open vSwitch Linux kernel module.
35
36 %prep
37
38 %setup
39
40 %build
41 for flavor in %flavors_to_build; do
42         mkdir _$flavor
43         (cd _$flavor && ../configure --with-linux="%{kernel_source $flavor}")
44         %{__make} -C _$flavor/datapath/linux-2.6 %{?_smp_mflags}
45 done
46
47 %install
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
53 done
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT