Version: @version@
Release: 1%{?gitver}%{?dist}
License: BSD
-Group: System Environment/Base
URL: https://github.com/corosync/corosync-qdevice
Source0: https://github.com/corosync/corosync-qdevice/releases/download/v%{version}%{?gittarver}/%{name}-%{version}%{?gittarver}.tar.gz
Requires: nss-tools
%if %{with systemd}
-Requires(post): systemd
-Requires(preun): systemd
-Requires(postun): systemd
+%{?systemd_requires}
+BuildRequires: systemd
+BuildRequires: systemd-devel
%else
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
%if %{with runautogen}
BuildRequires: autoconf automake libtool
%endif
-%if %{with systemd}
-BuildRequires: systemd-units
-BuildRequires: systemd-devel
-%endif
-
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%prep
%setup -q -n %{name}-%{version}%{?gittarver}
make %{_smp_mflags}
%install
-rm -rf %{buildroot}
-
make install DESTDIR=%{buildroot}
## tree fixup
%endif
%clean
-rm -rf %{buildroot}
%description
This package contains the Corosync Cluster Engine Qdevice, script for creating
%postun
%if %{with systemd} && 0%{?systemd_postun:1}
-%systemd_postun
+%systemd_postun corosync-qdevice.service
%endif
%files
-%defattr(-,root,root,-)
%dir %{_sysconfdir}/corosync/qdevice
%dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net
%dir %{_localstatedir}/run/corosync-qdevice
%package -n corosync-qnetd
Summary: The Corosync Cluster Engine Qdevice Network Daemon
-Group: System Environment/Base
Requires: nss-tools
Requires(pre): shadow-utils
-Requires(pre): /usr/sbin/useradd
%if %{with systemd}
-Requires(post): systemd
-Requires(preun): systemd
-Requires(postun): systemd
+%{?systemd_requires}
%endif
%description -n corosync-qnetd
%postun -n corosync-qnetd
%if %{with systemd} && 0%{?systemd_postun:1}
-%systemd_postun
+%systemd_postun corosync-qnetd.service
%endif
%files -n corosync-qnetd
-%defattr(-,root,root,-)
%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd
%dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd
%{_bindir}/corosync-qnetd