# # spec file for package csync2 # # Copyright 2004-2020 LINBIT, Vienna, Austria # # SPDX-License-Identifier: GPL-2.0-or-later Summary: Cluster synchronization tool License: GPL-2.0-or-later Group: Productivity/Clustering/HA Name: csync2 Version: master Release: 0 URL: https://github.com/LINBIT/csync2#readme Source0: https://github.com/LINBIT/csync2/archive/refs/heads/master.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: flex BuildRequires: gnutls-devel BuildRequires: librsync-devel # openssl required at build time due to rpmlint checks which run postinstall script which uses openssl BuildRequires: openssl BuildRequires: pkgconfig BuildRequires: sqlite-devel Requires: openssl Requires: sqlite %if 0%{?rhel} >= 7 BuildRequires: hostname BuildRequires: systemd %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Csync2 is a cluster synchronization tool. It can be used to keep files on multiple hosts in a cluster in sync. Csync2 can handle complex setups with much more than just 2 hosts, handle file deletions and can detect conflicts. It is expedient for HA-clusters, HPC-clusters, COWs and server farms. %prep %setup %build export CFLAGS="$RPM_OPT_FLAGS -I/usr/kerberos/include" if ! [ -f configure ]; then ./autogen.sh; fi %configure --enable-sqlite3 \ --sysconfdir=%{_sysconfdir}/csync2 --docdir=%{_docdir}/%{name} make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_localstatedir}/lib/csync2 mkdir -p %{buildroot}%{_docdir}/csync2 mkdir -p %{buildroot}%{_sysconfdir}/csync2 mv csync2.cfg %{buildroot}%{_sysconfdir}/csync2 install -m 644 doc/csync2.adoc %{buildroot}%{_docdir}/csync2/csync2.adoc install -m 644 doc/csync2-quickstart.adoc %{buildroot}%{_docdir}/csync2/csync2-quickstart.adoc install -m 644 AUTHORS.adoc %{buildroot}%{_docdir}/csync2/AUTHORS.adoc install -m 644 README.adoc %{buildroot}%{_docdir}/csync2/README.adoc install -m 644 ChangeLog %{buildroot}%{_docdir}/csync2/ChangeLog install -m 644 COPYING %{buildroot}%{_docdir}/csync2/COPYING %if 0%{?rhel} >= 7 install -D -m 644 csync2@.service %{buildroot}%{_unitdir}/csync2@.service install -D -m 644 csync2.socket %{buildroot}%{_unitdir}/csync2.socket %endif %if 0%{?rhel} < 7 install -D -m 644 csync2.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/csync2 %endif %clean [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT make clean %post if ! grep -q "^csync2" %{_sysconfdir}/services ; then echo "csync2 30865/tcp" >>%{_sysconfdir}/services fi %if 0%{?rhel} >= 7 %systemd_post csync2.socket csync2@.service %endif %files %defattr(-,root,root) %{_sbindir}/csync2 %{_sbindir}/csync2-compare %{_var}/lib/csync2 %if 0%{?rhel} >= 7 %{_unitdir}/csync2@.service %{_unitdir}/csync2.socket %endif %doc %{_mandir}/man1/csync2.1.gz %doc %{_docdir}/csync2/csync2.adoc %doc %{_docdir}/csync2/csync2-quickstart.adoc %doc %{_docdir}/csync2/ChangeLog %doc %{_docdir}/csync2/README.adoc %doc %{_docdir}/csync2/AUTHORS.adoc %doc %{_docdir}/csync2/COPYING %if 0%{?rhel} < 7 %config(noreplace) %{_sysconfdir}/xinetd.d/csync2 %endif %config(noreplace) %{_sysconfdir}/csync2/csync2.cfg %changelog * Fri Sep 18 2020 Lars Ellenberg - 2.1-1 - New upstream release * Tue Jan 27 2015 Lars Ellenberg - 2.0-1 - New upstream release