install -d -m 755 $RPM_BUILD_ROOT/etc/xapi.d/plugins
install -m 755 xenserver/etc_xapi.d_plugins_vswitch-cfg-update \
$RPM_BUILD_ROOT/etc/xapi.d/plugins/vswitch-cfg-update
-install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/scripts
+install -d -m 755 $RPM_BUILD_ROOT/usr/share/vswitch/scripts
install -m 755 xenserver/opt_xensource_libexec_interface-reconfigure \
- $RPM_BUILD_ROOT%{_prefix}/scripts/interface-reconfigure
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/interface-reconfigure
install -m 755 xenserver/etc_xensource_scripts_vif \
- $RPM_BUILD_ROOT%{_prefix}/scripts/vif
-install -m 755 xenserver/root_vswitch_scripts_dump-vif-details \
- $RPM_BUILD_ROOT%{_prefix}/scripts/dump-vif-details
-install -m 755 xenserver/root_vswitch_scripts_refresh-xs-network-uuids \
- $RPM_BUILD_ROOT%{_prefix}/scripts/refresh-xs-network-uuids
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/vif
+install -m 755 xenserver/usr_share_vswitch_scripts_dump-vif-details \
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/dump-vif-details
++install -m 755 xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids \
++ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/refresh-xs-network-uuids
install -m 755 xenserver/usr_sbin_xen-bugtool \
- $RPM_BUILD_ROOT%{_prefix}/scripts/xen-bugtool
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/xen-bugtool
install -m 755 xenserver/usr_sbin_brctl \
- $RPM_BUILD_ROOT%{_prefix}/scripts/brctl
-install -m 755 xenserver/root_vswitch_scripts_sysconfig.template \
- $RPM_BUILD_ROOT/root/vswitch/scripts/sysconfig.template
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/brctl
+install -m 755 xenserver/usr_share_vswitch_scripts_sysconfig.template \
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/sysconfig.template
install -m 644 \
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
- $RPM_BUILD_ROOT%{_prefix}/scripts/XSFeatureVSwitch.py
+ $RPM_BUILD_ROOT/usr/share/vswitch/scripts/XSFeatureVSwitch.py
-install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/kernel_modules
-find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT%{_prefix}/kernel_modules/ \;
+install -d -m 755 $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/vswitch
+find datapath/linux-2.6 -name *.ko -exec install -m 755 \{\} $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/vswitch \;
# Get rid of stuff we don't want to make RPM happy.
-rm -rf \
- $RPM_BUILD_ROOT/root/vswitch/bin/ezio-term \
- $RPM_BUILD_ROOT/root/vswitch/bin/ovs-controller \
- $RPM_BUILD_ROOT/root/vswitch/bin/ovs-discover \
- $RPM_BUILD_ROOT/root/vswitch/bin/ovs-kill \
- $RPM_BUILD_ROOT/root/vswitch/bin/ovs-pki \
- $RPM_BUILD_ROOT/root/vswitch/bin/ovs-switchui \
- $RPM_BUILD_ROOT/root/vswitch/bin/ovs-wdt \
- $RPM_BUILD_ROOT/root/vswitch/bin/secchan \
- $RPM_BUILD_ROOT/root/vswitch/sbin/ovs-monitor \
- $RPM_BUILD_ROOT/root/vswitch/share/man/man8/ovs-controller.8 \
- $RPM_BUILD_ROOT/root/vswitch/share/man/man8/ovs-discover.8 \
- $RPM_BUILD_ROOT/root/vswitch/share/man/man8/ovs-kill.8 \
- $RPM_BUILD_ROOT/root/vswitch/share/man/man8/ovs-pki.8 \
- $RPM_BUILD_ROOT/root/vswitch/share/man/man8/secchan.8 \
- $RPM_BUILD_ROOT/root/vswitch/share/openvswitch
+rm \
+ $RPM_BUILD_ROOT/usr/bin/ovs-controller \
+ $RPM_BUILD_ROOT/usr/bin/ovs-discover \
+ $RPM_BUILD_ROOT/usr/bin/ovs-kill \
+ $RPM_BUILD_ROOT/usr/bin/ovs-openflowd \
+ $RPM_BUILD_ROOT/usr/bin/ovs-pki \
+ $RPM_BUILD_ROOT/usr/bin/ovs-wdt \
+ $RPM_BUILD_ROOT/usr/sbin/ovs-monitor \
+ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-controller.8 \
+ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-discover.8 \
+ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-kill.8 \
+ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-openflowd.8 \
+ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-pki.8
+rm -f $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/net/vswitch/veth_mod.ko
+rm -r \
+ $RPM_BUILD_ROOT/usr/share/openvswitch/commands
+
+install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
%clean
rm -rf $RPM_BUILD_ROOT
/etc/xapi.d/plugins/vswitch-cfg-update
/etc/logrotate.d/vswitch
/etc/profile.d/vswitch.sh
-/root/vswitch/kernel_modules/brcompat_mod.ko
-/root/vswitch/kernel_modules/openvswitch_mod.ko
-/root/vswitch/kernel_modules/veth_mod.ko
-/root/vswitch/scripts/dump-vif-details
-/root/vswitch/scripts/refresh-xs-network-uuids
-/root/vswitch/scripts/interface-reconfigure
-/root/vswitch/scripts/vif
-/root/vswitch/scripts/xen-bugtool
-/root/vswitch/scripts/XSFeatureVSwitch.py
-/root/vswitch/scripts/brctl
-/root/vswitch/scripts/sysconfig.template
+/lib/modules/%{xen_version}/kernel/net/vswitch/openvswitch_mod.ko
+/lib/modules/%{xen_version}/kernel/net/vswitch/brcompat_mod.ko
+/usr/share/vswitch/scripts/dump-vif-details
++/usr/share/vswitch/scripts/refresh-xs-network-uuids
+/usr/share/vswitch/scripts/interface-reconfigure
+/usr/share/vswitch/scripts/vif
+/usr/share/vswitch/scripts/xen-bugtool
+/usr/share/vswitch/scripts/XSFeatureVSwitch.py
+/usr/share/vswitch/scripts/brctl
+/usr/share/vswitch/scripts/sysconfig.template
# Following two files are generated automatically by rpm. We don't
# really need them and they won't be used on the XenServer, but there
# isn't an obvious place to get rid of them since they are generated