Fix SLE11 build dependency with systemd

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=261
This commit is contained in:
Charles Arnold 2013-07-31 20:58:24 +00:00 committed by Git OBS Bridge
parent 1afde18e6c
commit e50de91dbe

View File

@ -76,7 +76,9 @@ BuildRequires: pciutils-devel
BuildRequires: python-devel
BuildRequires: texinfo
BuildRequires: transfig
%if %suse_version >= 1230
BuildRequires: systemd
%endif
%if %suse_version >= 1120
BuildRequires: xz-devel
%endif
@ -760,7 +762,7 @@ mv $RPM_BUILD_ROOT/etc/udev/rules.d/xen-backend.rules $RPM_BUILD_ROOT/etc/udev/r
mv $RPM_BUILD_ROOT/etc/udev/rules.d/xend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xend.rules
# Systemd
%if %with_systemd
%if %{?with_systemd}0
mkdir -p %{buildroot}%{_unitdir}
install -m 644 %{SOURCE40} %{buildroot}%{_unitdir}/xenstored.service
install -m 644 %{SOURCE41} %{buildroot}%{_unitdir}/blktapctrl.service
@ -982,7 +984,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%ifnarch %arm aarch64
%config /etc/init.d/pciback
%endif
%if %with_systemd
%if %{?with_systemd}0
%{_unitdir}/xendomains.service
%{_unitdir}/xencommons.service
%{_unitdir}/xenstored.service
@ -1055,7 +1057,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%dir %{_libdir}/python%{pyver}/site-packages/xen/xm
%dir %{_libdir}/python%{pyver}/site-packages/xen/web
%config /etc/init.d/xend
%if %with_systemd
%if %{?with_systemd}0
%{_unitdir}/xend.service
%endif
%endif
@ -1102,8 +1104,7 @@ rm -f $RPM_BUILD_ROOT/usr/libexec/qemu-bridge-helper
%post tools
%if %{?with_xend}0
# with_xend
%if %with_systemd
%if %{?with_systemd}0
%{fillup_and_insserv -i -y -n xencommons xencommons}
%{fillup_and_insserv -i -y -n xend xend}
/bin/systemctl enable xend.service
@ -1123,7 +1124,7 @@ fi
%endif
%else
# without_xend
%if %with_systemd
%if %{?with_systemd}0
%{fillup_and_insserv -i -y -n xencommons xencommons}
/bin/systemctl enable xencommons.service
%else
@ -1143,7 +1144,7 @@ fi
%endif
#
%ifnarch %arm aarch64
%if %with_systemd
%if %{?with_systemd}0
%{fillup_and_insserv -i -y -n xendomains xendomains}
/bin/systemctl enable xendomains.service
%else
@ -1165,7 +1166,7 @@ fi
%endif
%preun tools
%if %with_systemd
%if %{?with_systemd}0
/bin/systemctl disable xend.service
/bin/systemctl disable xencommons.service
/bin/systemctl disable xendomains.service