forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openvswitch-kmod-fedora.spec.in
72 lines (59 loc) · 2.06 KB
/
openvswitch-kmod-fedora.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Spec file for Open vSwitch.
# Copyright (C) 2009, 2010, 2015 Nicira Networks, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without warranty of any kind.
%global debug_package %{nil}
#%define kernel 3.1.5-1.fc16.x86_64
#define kernel %{kernel_source}
%{?kversion:%define kernel %kversion}
Name: openvswitch-kmod
Summary: Open vSwitch Kernel Modules
Group: System Environment/Daemons
URL: http://www.openvswitch.org/
Vendor: OpenSource Security Ralf Spenneberg <[email protected]>
Version: @VERSION@
# The entire source code is ASL 2.0 except datapath/ which is GPLv2
License: GPLv2
Release: 1%{?dist}
Source: openvswitch-%{version}.tar.gz
#Source1: openvswitch-init
Buildroot: /tmp/openvswitch-xen-rpm
%description
Open vSwitch provides standard network bridging functions augmented with
support for the OpenFlow protocol for remote per-flow control of
traffic. This package contains the kernel modules.
%prep
%setup -q -n openvswitch-%{version}
%build
%configure --with-linux=/lib/modules/%{kernel}/build --enable-ssl
make %{_smp_mflags} -C datapath/linux
%install
rm -rf $RPM_BUILD_ROOT
make INSTALL_MOD_PATH=$RPM_BUILD_ROOT -C datapath/linux modules_install
mkdir -p $RPM_BUILD_ROOT/etc/depmod.d
for module in $RPM_BUILD_ROOT/lib/modules/%{kernel}/extra/*.ko
do
modname="$(basename ${module})"
echo "override ${modname%.ko} * extra" >> \
$RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
echo "override ${modname%.ko} * weak-updates" >> \
$RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
done
%clean
rm -rf $RPM_BUILD_ROOT
%post
# Ensure that modprobe will find our modules.
depmod %{kernel}
%files
%defattr(0644,root,root)
/lib/modules/%{kernel}/extra/*.ko
/etc/depmod.d/kmod-openvswitch.conf
%exclude /lib/modules/%{kernel}/modules.*
%changelog
* Wed Sep 21 2011 Kyle Mestery <[email protected]>
- Updated for F15
* Wed Jan 12 2011 Ralf Spenneberg <[email protected]>
- First build on F14