]> git.pld-linux.org Git - SPECS.git/blob - lsyncd.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / lsyncd.spec
1 Summary:        Lsyncd - Live Syncing (Mirror) Daemon
2 Name:           lsyncd
3 Version:        2.2.3
4 Release:        0.1
5 License:        GPL v2+
6 Group:          Networking/Daemons
7 Source0:        https://github.com/axkibe/lsyncd/archive/release-%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  25d36b73946bec822d5c7f258262d9f3
9 Patch0:         docpath.patch
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}.logrotate
13 URL:            https://github.com/axkibe/lsyncd
14 BuildRequires:  cmake
15 BuildRequires:  libstdc++-devel
16 BuildRequires:  libxml2-devel
17 BuildRequires:  lua53-devel
18 BuildRequires:  lua53
19 Requires:       rsync >= 3.1
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Lsyncd uses rsync to synchronize local directories with a remote
24 machine running rsyncd. Lsyncd watches multiple directories trees
25 through inotify. The first step after adding the watches is to rsync
26 all directories with the remote host, and then sync single file by
27 collecting the inotify events. So lsyncd is a light-weight live mirror
28 solution that should be easy to install and use while blending well
29 with your system.
30
31 %prep
32 %setup -q -n %{name}-release-%{version}
33 %patch0 -p1
34
35 %build
36 install -d build
37 cd build
38 %cmake \
39         ..
40 %{__make}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,logrotate.d,sysconfig},/var/log,%{_mandir}/man1}
45 %{__make} -C build install \
46         DESTDIR=$RPM_BUILD_ROOT
47
48 touch $RPM_BUILD_ROOT/var/log/%{name}
49 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
50 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
51 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 /sbin/chkconfig --add lsyncd
58 %service lsyncd restart "lsync server"
59
60 %preun
61 if [ "$1" = "0" ]; then
62         %service lsyncd stop
63         /sbin/chkconfig --del lsyncd
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %doc README.md
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
70 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
71 %attr(755,root,root) %{_bindir}/%{name}
72 %{_mandir}/man1/lsyncd.1*
73 %attr(640,root,root) %ghost /var/log/%{name}
74 %attr(754,root,root) /etc/rc.d/init.d/lsyncd
This page took 0.407059 seconds and 3 git commands to generate.