LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File lsyncd.spec of Package lsyncd (Project network:synchronization:files)

#
# spec file for package lsyncd
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           lsyncd
Version:        2.1.4
Release:        0
Url:            http://code.google.com/p/lsyncd/
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}-init.d
Source2:        %{name}.conf
Source3:        rsync_sudo.sh
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  pkg-config
%else
BuildRequires:  pkgconfig
%endif
BuildRequires:  automake
BuildRequires:  asciidoc
BuildRequires:  lua-devel >= 5.1
Requires:       rsync
Summary:        Live Syncing (Mirror) Daemon
License:        GPL-2.0
Group:          Productivity/Networking/Other

%description
Lsyncd (Live Syncing (Mirror) Daemon) uses rsync to synchronize local directories with a remote machine running rsyncd. It watches multiple directory trees through inotify. The first step after adding the watches is to rsync all directories with the remote host, and then the software synchronizes single files by collecting the inotify events. lsyncd is a lightweight live mirror solution that should be easy to install and use while blending well with your system.

%prep
%setup -q

%build
autoreconf -fiv
export CFLAGS="%optflags"
export LIBLUA_LIBS=$(pkg-config --libs lua)
export LIBLUA_CFLAGS=$(pkg-config --cflags lua)
%configure --docdir=%{_docdir}/%{name}
%__make %{?jobs:-j%jobs}

%install
%makeinstall
%{__mkdir_p} %{buildroot}%{_docdir}/%{name}
%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/lsyncd
%__install -Dm 755 %{S:1} %{buildroot}%{_initrddir}/lsyncd
%__install -Dm 755 %{S:2} %{buildroot}%{_sysconfdir}/lsyncd/lsyncd.conf
%__install -Dm 755 %{S:3} %{buildroot}%{_sysconfdir}/lsyncd/rsync_sudo.sh

%clean
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ChangeLog COPYING
%{_bindir}/lsyncd
%{_mandir}/man1/lsyncd.1.gz
%{_initrddir}/lsyncd
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/lsyncd.conf
%config(noreplace) %{_sysconfdir}/%{name}/rsync_sudo.sh
%dir %{_localstatedir}/log/%{name}

%changelog