]> git.proxmox.com Git - mirror_ovs.git/blame - rhel/openvswitch-kmod-fedora.spec.in
build: Add support for building RPMs for Fedora Linux
[mirror_ovs.git] / rhel / openvswitch-kmod-fedora.spec.in
CommitLineData
d8fe0a6a
RS
1# Spec file for Open vSwitch.
2
3# Copyright (C) 2009, 2010 Nicira Networks, Inc.
4#
5# Copying and distribution of this file, with or without modification,
6# are permitted in any medium without royalty provided the copyright
7# notice and this notice are preserved. This file is offered as-is,
8# without warranty of any kind.
9
10#%define kernel 3.1.5-1.fc16.x86_64
11#define kernel %{kernel_source}
12%{?kversion:%define kernel %kversion}
13
14Name: openvswitch-kmod
15Summary: Open vSwitch Kernel Modules
16Group: System Environment/Daemons
17URL: http://www.openvswitch.org/
18Vendor: OpenSource Security Ralf Spenneberg <ralf@os-s.net>
19Version: @VERSION@
20
21# The entire source code is ASL 2.0 except datapath/ which is GPLv2
22License: GPLv2
23Release: 1%{?dist}
24Source: openvswitch-%{version}.tar.gz
25#Source1: openvswitch-init
26Buildroot: /tmp/openvswitch-xen-rpm
27
28%description
29Open vSwitch provides standard network bridging functions augmented with
30support for the OpenFlow protocol for remote per-flow control of
31traffic. This package contains the kernel modules.
32
33%prep
34%setup -q -n openvswitch-%{version}
35
36%build
37./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --with-linux=/lib/modules/%{kernel}/build --enable-ssl %{build_number}
38make %{_smp_mflags} -C datapath/linux
39
40%install
41rm -rf $RPM_BUILD_ROOT
42make -C datapath/linux modules_install
43
44install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{kernel}/kernel/extra/openvswitch
45find datapath/linux -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{kernel}/kernel/extra/openvswitch \;
46
47%clean
48rm -rf $RPM_BUILD_ROOT
49
50%preun
51
52%post
53# Ensure that modprobe will find our modules.
54depmod %{kernel}
55
56%files
57%defattr(-,root,root)
58/lib/modules/%{kernel}/kernel/extra/openvswitch/openvswitch.ko
59/lib/modules/%{kernel}/kernel/extra/openvswitch/brcompat.ko
60
61%changelog
62* Wed Sep 21 2011 Kyle Mestery <kmestery@cisco.com>
63- Updated for F15
64* Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net>
65- First build on F14