DEFAULTS_INSTALL=''
DEFAULTS_FILES=''
+# The package containing groupadd is different on different OSs
+SHADOW_REQUIRES='shadow-utils'
+
# On some older distro's *cough* centos 6 *cough* autosetup fails
SETUP="%autosetup -n %{name}-${TARBALLVERSION}"
RE2_CONFIGURE='--disable-re2 \'
PROTOBUF_BUILDREQUIRES=''
PROTOBUF_CONFIGURE='--without-protobuf \'
+ SHADOW_REQUIRES='shadow'
;;
esac
fi
Vendor: PowerDNS.COM BV
Group: System/DNS
Source: dnsdist-${TARBALLVERSION}.tar.bz2
-Requires(pre): shadow-utils
+Requires(pre): ${SHADOW_REQUIRES}
BuildRequires: boost-devel
BuildRequires: lua-devel
BuildRequires: readline-devel
%post
%if 0%{?el6}
/sbin/chkconfig --add %{name}
+%elif 0%{?suse_version}
+%service_add_post %{name}.service
%else
%systemd_post %{name}.service
%endif
/sbin/service %{name} stop > /dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
+%elif 0%{?suse_version}
+%service_del_preun %{name}.service
%else
%systemd_preun %{name}.service
%endif
if [ "\$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
+%elif 0%{?suse_version}
+%service_del_postun %{name}.service
%else
%systemd_postun_with_restart %{name}.service
%endif