ae491a0682fa3a93368c4a76fa3138a3c39e2346
[openvswitch.git] / openvswitch.spec
1 %define url $URL$
2
3 %define name openvswitch
4 %define version ef72dd8
5 %define taglevel 1
6
7 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
8 %define upstream http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
9
10 Vendor: PlanetLab
11 Packager: PlanetLab Central <support@planet-lab.org>
12 Distribution: PlanetLab %{plrelease}
13 URL: %(echo %{url} | cut -d ' ' -f 2)
14
15 Summary: pl_openvswitch
16 Name: %{name}
17 Version: %{version}
18 Release: %{release}
19 License: GPL
20 Group: System Environment/Kernel
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
22 #Requires: 
23 BuildRequires: kernel-devel
24
25 Source0: openvswitch-%{version}.tar.gz
26
27 %description
28 Openvswitch - virtual switches on PlanetLab
29
30 %prep
31 %setup
32
33 %build
34 KVER=`ls -l /usr/src/kernels | awk '{printf $9;}'`
35 ./configure --with-linux=/usr/src/kernels/$KVER
36 make -j17
37
38 %install
39 KVER=`ls -l /usr/src/kernels | awk '{printf $9;}'`
40 mkdir -p $RPM_BUILD_ROOT/bin
41 mkdir -p $RPM_BUILD_ROOT/sbin
42 mkdir -p $RPM_BUILD_ROOT/share
43 mkdir -p $RPM_BUILD_ROOT/var
44 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KVER/kernel/drivers/net
45
46 make install DESTDIR=$RPM_BUILD_ROOT
47 cp -R datapath/linux/*.ko $RPM_BUILD_ROOT/lib/modules/$KVER/kernel/drivers/net
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %files
53 /bin
54 /sbin
55 /share
56 /var
57 /lib/modules
58 /usr
59
60 %post
61 # XXX
62
63 %postun
64
65 %changelog
66 * Mon Sep 26 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - openvswitch-1.1.0pre2-2
67 - add a buildrequires dep. to kernel-devel
68
69 * Mon Jan 17 2011 Sapan Bhatia <sapanb@cs.princeton.edu> - openvswitch-1.1.0pre2-1
70 - Fixed a build issue.
71