ovs-benchmark: Remove.
[cascardo/ovs.git] / xenserver / openvswitch-xen.spec.in
index 3bae86a..8bc4a2c 100644 (file)
@@ -1,6 +1,6 @@
 # Spec file for Open vSwitch.
 
-# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
 #      -D "kernel_flavor xen"
 #      -bb /usr/src/redhat/SPECS/openvswitch-xen.spec
 #
-# For XenServer version >= 6.5, replace kernel_flavor with xen_version which
-# should be the `uname -r` output.
+# For XenServer version >= 6.5, use kernel_uname which should be
+# the `uname -r` output.
 # for example:
 #
 #    rpmbuild -D "openvswitch_version 2.3.0+build123"
-#      -D "kernel_name  NAME-xen"
-#      -D "kernel_version 3.10.41-323.380416"
-#      -D "xen_version 3.10.0+2"
+#      -D "kernel_uname  3.10.0+2"
 #      -bb /usr/src/redhat/SPECS/openvswitch-xen.spec
 #
 # If tests have to be skipped while building, specify the '--without check'
 %define openvswitch_version @VERSION@
 %endif
 
+%if %{?kernel_uname:1}%{!?kernel_uname:0}
+%define kernel_name kernel
+%define kernel_version %{kernel_uname}
+%endif
+
 %if %{?kernel_name:0}%{!?kernel_name:1}
 %define kernel %(rpm -qa 'kernel*xen-devel' | head -1)
 %define kernel_name %(rpm -q --queryformat "%%{Name}" %{kernel} | sed 's/-devel//' | sed 's/kernel-//')
@@ -44,7 +47,7 @@
 %endif
 
 %if %{?xen_version:0}%{!?xen_version:1}
-%define xen_version %{kernel_version}%{kernel_flavor}
+%define xen_version %{kernel_version}%{?kernel_flavor:%{kernel_flavor}}
 %endif
 
 # bump this when breaking compatibility with userspace
@@ -78,7 +81,12 @@ Summary: Open vSwitch kernel module
 Group: System Environment/Kernel
 License: GPLv2
 Provides: %{name}-modules%{?kernel_flavor:-%{kernel_flavor}} = %{kernel_version}, openvswitch.ko.%{module_abi_version}
+%if %{?kernel_uname:0}%{!?kernel_uname:1}
 Requires: kernel%{?kernel_flavor:-%{kernel_flavor}} = %{kernel_version}
+%endif
+%if %{?kernel_uname:1}%{!?kernel_uname:0}
+Requires: kernel-uname-r = %{kernel_version}
+%endif
 
 %description %{module_package}
 Open vSwitch Linux kernel module compiled against kernel version
@@ -132,20 +140,16 @@ install -m 644 \
 
 install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/extra/openvswitch
 find datapath/linux -name *.ko -exec install -m 755  \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/extra/openvswitch \;
-install python/compat/uuid.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
-install python/compat/argparse.py $RPM_BUILD_ROOT/usr/share/openvswitch/python
 
 install -d -m 755 $RPM_BUILD_ROOT/etc/xensource/bugtool
 cp -rf $RPM_BUILD_ROOT/usr/share/openvswitch/bugtool-plugins/* $RPM_BUILD_ROOT/etc/xensource/bugtool
 
 # Get rid of stuff we don't want to make RPM happy.
 rm \
-    $RPM_BUILD_ROOT/usr/bin/ovs-benchmark \
     $RPM_BUILD_ROOT/usr/bin/ovs-testcontroller \
     $RPM_BUILD_ROOT/usr/bin/ovs-l3ping \
     $RPM_BUILD_ROOT/usr/bin/ovs-pki \
     $RPM_BUILD_ROOT/usr/bin/ovs-test \
-    $RPM_BUILD_ROOT/usr/share/man/man1/ovs-benchmark.1 \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-testcontroller.8 \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-l3ping.8 \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-pki.8 \
@@ -430,6 +434,8 @@ exit 0
 
 %files
 %defattr(-,root,root)
+/etc/bash_completion.d/ovs-appctl-bashcomp.bash
+/etc/bash_completion.d/ovs-vsctl-bashcomp.bash
 /etc/init.d/openvswitch
 /etc/init.d/openvswitch-xapi-update
 /etc/xapi.d/plugins/openvswitch-cfg-update
@@ -497,6 +503,13 @@ exit 0
 %exclude /usr/share/openvswitch/python/*.py[co]
 %exclude /usr/share/openvswitch/python/ovs/*.py[co]
 %exclude /usr/share/openvswitch/python/ovs/db/*.py[co]
+%exclude /usr/bin/ovn-*
+%exclude /usr/share/man/man5/ovn-*
+%exclude /usr/share/man/man7/ovn-*
+%exclude /usr/share/man/man8/ovn-*
+%exclude /usr/share/openvswitch/ovn-*
+%exclude /usr/share/openvswitch/scripts/ovn-*
 
 %files %{module_package}
 /lib/modules/%{xen_version}/extra/openvswitch/openvswitch.ko
+/lib/modules/%{xen_version}/extra/openvswitch/vport-*.ko