rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/etc
-install -d -m 755 $RPM_BUILD_ROOT/etc/openvswitch
+install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch
install -p -D -m 0644 rhel/usr_lib_systemd_system_openvswitch.service \
$RPM_BUILD_ROOT%{_unitdir}/openvswitch.service
install -p -D -m 0644 rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
install -p -D -m 0644 include/openflow/*.h \
-t $RPM_BUILD_ROOT%{_includedir}/openflow
+touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db
+touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf
+
%check
%if %{with check}
if make check TESTSUITEFLAGS='%{_smp_mflags}' ||
%files
%defattr(-,root,root)
-%config /etc/sysconfig/openvswitch
+%dir %{_sysconfdir}/openvswitch
+%config %ghost %{_sysconfdir}/openvswitch/conf.db
+%config %ghost %{_sysconfdir}/openvswitch/system-id.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
%config /etc/logrotate.d/openvswitch
%{_unitdir}/openvswitch.service
%{_unitdir}/openvswitch-nonetwork.service
/var/lib/openvswitch
/var/log/openvswitch
/usr/share/openvswitch/scripts/ovs-ctl
-%exclude /etc/openvswitch
%exclude /usr/bin/ovs-benchmark
%exclude /usr/bin/ovs-parse-backtrace
%exclude /usr/bin/ovs-pcap