Blame view

rpm/clsync.spec 2.97 KB
Enrique Martinez authored
1
#
Enrique Martinez authored
2 3
# author: Enrique Martinez <enmaca@hotmail.com>
# license: GPL-3+
Enrique Martinez authored
4
#
Enrique Martinez authored
5 6
Summary:	Live sync tool based on inotify
Name: 		clsync
Enrique Martinez authored
7 8
Version:	@VERSION@
Release:	@BUILDNUM@
Enrique Martinez authored
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
License: 	GPL-3+
Group:		Applications/System
URL: 		https://github.com/xaionaro/clsync
Source0: 	clsync-%{version}.tar.gz
Source1: 	clsync.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: 	glib2-devel
BuildRequires:	autoconf

%description
live sync tool based on inotify, written in GNU C
Clsync recursively watches for source directory and executes external
program to sync the changes. Clsync is adapted to use together with rsync.
This utility is much more lightweight than competitors and supports such
features as separate queue for big files, regex file filter,
multi-threading.

%package devel
Summary: Development Files for clsync
Group: Applications/System
Requires: clsync = %{version}-%{release}

%description devel
live sync tool based on inotify, written in GNU C
Clsync recursively watches for source directory and executes external
program to sync the changes. Clsync is adapted to use together with rsync.
This utility is much more lightweight than competitors and supports such
features as separate queue for big files, regex file filter,
multi-threading.

%prep
%setup

%build
autoreconf -if
%configure
make

%install
make install DESTDIR=%{buildroot}
install -D -p -m 0750 %{SOURCE1} %{buildroot}/etc/init.d/clsync
mkdir -p %{buildroot}/etc/clsync/rules
mkdir -p %{buildroot}/var/tmp/clsync/from
mkdir -p %{buildroot}/var/tmp/clsync/to
mkdir -p %{buildroot}/var/run/clsync

cat > %{buildroot}/etc/clsync/clsync.conf <<EOF
# This configuration is a simple test
[default]
watch-dir = /var/tmp/clsync/from
Enrique Martinez authored
59
rules-file = /etc/clsync/rules/default
Enrique Martinez authored
60 61 62 63 64 65 66 67 68
destination-dir = /var/tmp/clsync/to
mode = rsyncdirect
sync-handler = /usr/bin/rsync
background = 1
syslog = 1
full-initialsync = 1
retries = 3
EOF

Enrique Martinez authored
69
cat > %{buildroot}/etc/clsync/rules/default <<EOF
Enrique Martinez authored
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
-d^[Dd]ont[Ss]ync\$
+*.*
EOF

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_bindir}/*
%doc %{_docdir}/* 
%doc %{_mandir}/man1/clsync.1.gz
%dir /var/tmp/clsync/from
%dir /var/tmp/clsync/to
%dir /var/run/clsync
Enrique Martinez authored
85 86 87 88
%config(noreplace) /etc/clsync/clsync.conf
/etc/clsync/rules/default
/etc/init.d/clsync

Enrique Martinez authored
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115

%files devel
%{_includedir}/clsync/clsync.h
%{_includedir}/clsync/compilerflags.h
%{_includedir}/clsync/configuration.h
%{_includedir}/clsync/ctx.h
%{_includedir}/clsync/error.h
%{_includedir}/clsync/indexes.h
%{_includedir}/clsync/malloc.h
%{_includedir}/clsync/port-hacks.h


%changelog
* Thu Nov 6 2014 Dmitry Yu Okunev <dyokunev@ut.mephi.ru> - 0.4-1
- A lot of fixes

* Thu Jan 9 2014 Dmitry Yu Okunev <dyokunev@ut.mephi.ru> - 0.3-1
- Added support of control socket

* Thu Oct 24 2013 Barak A. Pearlmutter <bap@debian.org> - 0.2.1-1
- New upstream version

* Fri Oct 11 2013 Barak A. Pearlmutter <bap@debian.org> - 0.1-2
- Tweak debian/watch to ignore debian releases

* Sat Sep 07 2013 Barak A. Pearlmutter <bap@debian.org> - 0.1-1
- Initial release (Closes: #718769 )