79 lines
2.5 KiB
RPMSpec
79 lines
2.5 KiB
RPMSpec
%global _hardened_build 1
|
|
%global gittag0 release-2.2.3
|
|
%global commit0 42413cabbedca429d55a5378f6e830f191f3cc86
|
|
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
|
Name: lsyncd
|
|
Version: 2.2.3
|
|
Release: 1
|
|
Summary: File change monitoring and synchronization daemon
|
|
License: GPLv2+
|
|
URL: https://github.com/axkibe/lsyncd/
|
|
Source0: https://github.com/axkibe/%{name}/archive/%{gittag0}/%{name}-%{version}.tar.gz
|
|
Patch0: cmake-docpath.patch
|
|
Patch1: cmake-define-LUA_COMPAT_5_3.patch
|
|
Patch3: cmake-find-lua-suffixes.patch
|
|
Patch2: cmake-prefer-lua-54.patch
|
|
Patch4: cmake-determine-lua-version.patch
|
|
Source1: lsyncd.sysconfig
|
|
Source2: lsyncd.logrotate
|
|
Source3: lsyncd.conf
|
|
Source4: lsyncd.service
|
|
Source5: lsyncd.sysctl
|
|
BuildRequires: asciidoc cmake gcc gcc-c++ lua lua-devel >= 5.1.3 systemd rsync
|
|
Requires: lua rsync
|
|
|
|
%description
|
|
Lsyncd watches a local directory trees event monitor interface (inotify).
|
|
It aggregates and combines events for a few seconds and then spawns one
|
|
(or more) process(es) to synchronize the changes. By default this is
|
|
rsync.
|
|
Lsyncd is thus a light-weight live mirror solution that is comparatively
|
|
easy to install not requiring new file systems or block devices and does
|
|
not hamper local file system performance.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-release-%{version} -p1
|
|
|
|
%build
|
|
%cmake
|
|
%make_build
|
|
|
|
%install
|
|
%make_install
|
|
install -p -d -m 0755 %{buildroot}%{_var}/log/%{name}
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/lsyncd
|
|
install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/lsyncd
|
|
install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/
|
|
install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/lsyncd.service
|
|
install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysctldir}/50-lsyncd.conf
|
|
|
|
%check
|
|
%cmake
|
|
make
|
|
|
|
%post
|
|
%sysctl_apply 50-lsyncd.conf
|
|
%systemd_post lsyncd.service
|
|
|
|
%preun
|
|
%systemd_preun lsyncd.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart lsyncd.service
|
|
|
|
%files
|
|
%license COPYING
|
|
%doc ChangeLog examples
|
|
%doc %{_mandir}/man1/lsyncd.1.*
|
|
%config(noreplace) %{_sysconfdir}/lsyncd.conf
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/lsyncd
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/lsyncd
|
|
%{_sysctldir}/50-lsyncd.conf
|
|
%{_bindir}/lsyncd
|
|
%dir %{_var}/log/%{name}
|
|
%{_unitdir}/lsyncd.service
|
|
|
|
%changelog
|
|
* Wed Jan 20 2021 chengzihan <chengzihan2@huawei.com> - 2.2.3-1
|
|
- Package init
|