|
|
@@ -16,7 +16,6 @@ Summary: The Corosync Cluster Engine Qdevice
|
|
|
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
|
|
|
|
|
|
@@ -26,9 +25,9 @@ Requires: corosynclib >= 2.4.0
|
|
|
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
|
|
|
@@ -44,12 +43,6 @@ BuildRequires: sed
|
|
|
%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}
|
|
|
@@ -71,8 +64,6 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
make %{_smp_mflags}
|
|
|
|
|
|
%install
|
|
|
-rm -rf %{buildroot}
|
|
|
-
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
## tree fixup
|
|
|
@@ -95,7 +86,6 @@ sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
|
|
|
%endif
|
|
|
|
|
|
%clean
|
|
|
-rm -rf %{buildroot}
|
|
|
|
|
|
%description
|
|
|
This package contains the Corosync Cluster Engine Qdevice, script for creating
|
|
|
@@ -122,11 +112,10 @@ fi
|
|
|
|
|
|
%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
|
|
|
@@ -145,15 +134,11 @@ fi
|
|
|
|
|
|
%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
|
|
|
@@ -187,11 +172,10 @@ fi
|
|
|
|
|
|
%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
|