diff --git a/varnish.spec b/varnish.spec index 9584ffa..e3c2fc1 100644 --- a/varnish.spec +++ b/varnish.spec @@ -41,7 +41,7 @@ Prereq(post): %_sbindir/useradd %_sbindir/groupadd %if 0%{?suse_version} >= 1010 Recommends: logrotate %endif -%if 0%{?suse_version} >= 1140 +%if 0%{?suse_version} >= 1210 BuildRequires: systemd %{?systemd_requires} %endif @@ -140,7 +140,7 @@ mkdir -p "$b/%pkg_logdir" %_bindir/getent passwd varnish >/dev/null || \ %_sbindir/useradd -g varnish -s /bin/false -r -c "user for Varnish" \ -d %pkg_home varnish || : -%if 0%{?service_add_pre:1} +%if 0%{?_unitdir:1} %service_add_pre varnish.service %service_add_pre varnishlog.service %endif @@ -148,7 +148,7 @@ mkdir -p "$b/%pkg_logdir" %post %fillup_and_insserv varnish %fillup_and_insserv varnishlog -%if 0%{?service_add_post:1} +%if 0%{?_unitdir:1} %service_add_post varnish.service %service_add_post varnishlog.service %endif @@ -156,16 +156,16 @@ mkdir -p "$b/%pkg_logdir" %preun %stop_on_removal varnish %stop_on_removal varnishlog -%if 0%{?service_del_preun:1} +%if 0%{?_unitdir:1} %service_del_preun varnish.service %service_del_preun varnishlog.service %endif %postun -# Does not this very much conflict? But rpmlint wants to have it... +# Does not sysv+systemd very much conflict? But rpmlint wants to have it... %restart_on_update varnish %restart_on_update varnishlog -%if 0%{?service_del_postun:1} +%if 0%{?_unitdir:1} %service_del_postun varnish.service %service_del_postun varnishlog.service %endif