Unbreak build on openSUSE 11.4 (systemd-less systems)

OBS-URL: https://build.opensuse.org/package/show/server:irc/atheme?expand=0&rev=45
This commit is contained in:
Jan Engelhardt 2012-11-21 00:36:06 +00:00 committed by Git OBS Bridge
parent db20ebca8a
commit 8f086df13d

View File

@ -40,7 +40,9 @@ BuildRequires: fdupes
BuildRequires: libopenssl-devel
BuildRequires: openldap2-devel
BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%endif
BuildRequires: pkgconfig(libmowgli-2) >= 2.0.0
BuildRequires: pkgconfig(libpcre)
%define atheme_home /var/lib/atheme
@ -117,7 +119,7 @@ install -m 0644 contrib/*.php contrib/*.pl TODO "$b/%_docdir/%name"
install -Dm 0755 "%{S:1}" "$b/%_sysconfdir/init.d/%name";
ln -sf "%_sysconfdir/init.d/%name" "$b/%_sbindir/rc%name";
%if %{?_unitdir:1}
%if 0%{?_unitdir:1}
mkdir -p "$b/%_unitdir" "$b/%_libexecdir/tmpfiles.d";
install -pm0644 "%{S:2}" "$b/%_unitdir/";
install -pm0644 "%{S:3}" "$b/%_libexecdir/tmpfiles.d/atheme.conf";
@ -136,26 +138,26 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,}
/usr/bin/getent passwd atheme >/dev/null 2>/dev/null || \
/usr/sbin/useradd -r -g atheme -s /bin/false \
-c "%name daemon" -d "%atheme_home" atheme >/dev/null || :;
%if %{?_unitdir:1}
%if 0%{?_unitdir:1}
%service_add_pre atheme.service
%endif
%post
%fillup_and_insserv %name
%if %{?_unitdir:1}
%if 0%{?_unitdir:1}
%service_add_post atheme.service
%endif
%preun
%stop_on_removal %name
%if %{?_unitdir:1}
%if 0%{?_unitdir:1}
%service_del_preun atheme.service
%endif
%postun
%restart_on_update %name
%insserv_cleanup
%if %{?_unitdir:1}
%if 0%{?_unitdir:1}
%service_del_postun atheme.service
%endif
@ -178,7 +180,7 @@ cp -v "$b/%_sysconfdir/%name"/atheme.motd{.example,}
%doc %_docdir/%name
%dir %attr(750,atheme,atheme) %atheme_home
%dir %attr(750,atheme,atheme) %atheme_log
%if %{?_unitdir:1}
%if 0%{?_unitdir:1}
%_unitdir/*.service
%_libexecdir/tmpfiles.d
%else