]> git.pld-linux.org Git - packages/csync2.git/blob - csync2.spec
- fix building with librsync 1.0+
[packages/csync2.git] / csync2.spec
1 Summary:        Cluster sync tool
2 Summary(pl.UTF-8):      Narzędzie do synchronizacji klastra
3 Name:           csync2
4 Version:        2.0
5 Release:        3
6 License:        GPL v2+
7 Group:          Daemons
8 Source0:        http://oss.linbit.com/csync2/%{name}-%{version}.tar.gz
9 # Source0-md5:  4e189ff02af441e588ceaa7791732162
10 Source1:        %{name}.init
11 Source2:        %{name}.inet
12 Source3:        %{name}.sysconfig
13 Patch0:         %{name}-fix-sonames.patch
14 Patch1:         %{name}-docdata.patch
15 Patch2:         librsync.patch
16 URL:            http://oss.linbit.com/csync2/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  bison
20 BuildRequires:  flex
21 BuildRequires:  gnutls-devel
22 BuildRequires:  librsync-devel
23 BuildRequires:  mysql-devel
24 BuildRequires:  openssl-devel
25 BuildRequires:  postgresql-devel
26 BuildRequires:  sqlite3-devel
27 BuildRequires:  texlive-format-pdflatex
28 Requires:       setup > 2.4.10-4
29 Suggests:       mysql-libs
30 Suggests:       postgresql-libs
31 Suggests:       sqlite3
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _sysconfdir     /etc/%{name}
35
36 %description
37 Csync2 is a cluster synchronization tool. It can be used to keep files
38 on multiple hosts in a cluster in sync. Csync2 can handle complex
39 setups with much more than just 2 hosts, handle file deletions and can
40 detect conflicts. It is expedient for HA-clusters, HPC-clusters, COWs
41 and server farms.
42
43 %description -l pl.UTF-8
44 Csync2 to narzędzie do synchronizacji klastra. Może być używane do
45 utrzymywania zgodności plików na wielu hostach w klastrze. Csync2 jest
46 w stanie obsłużyć złożone konfiguracje z więcej niż 2 hostami,
47 obsługiwać usuwanie plików i wykrywać konflikty. Jest praktyczne dla
48 klastrów HA, HPC, COW oraz farm serwerów.
49
50 %package -n csync2-inetd
51 Summary:        Files necessary to run csync2 in inetd service mode
52 Summary(pl.UTF-8):      Pliki niezbędne do uruchomienia csync2 w trybie usługi inetd
53 Group:          Networking/Daemons
54 Requires:       %{name} = %{version}-%{release}
55 Requires:       rc-inetd
56 Provides:       csyncd
57 Provides:       csyncd-inetd
58 Obsoletes:      csyncd
59 Obsoletes:      csync2-standalone
60 Obsoletes:      csyncd-standalone
61
62 %description -n csync2-inetd
63 Csync2 is a cluster synchronization tool. It can be used to keep files
64 on multiple hosts in a cluster in sync. Csync2 can handle complex
65 setups with much more than just 2 hosts, handle file deletions and can
66 detect conflicts. It is expedient for HA-clusters, HPC-clusters, COWs
67 and server farms.
68
69 %description -n csync2-inetd -l pl.UTF-8
70 Csync2 to narzędzie do synchronizacji klastra. Może być używane do
71 utrzymywania zgodności plików na wielu hostach w klastrze. Csync2 jest
72 w stanie obsłużyć złożone konfiguracje z więcej niż 2 hostami,
73 obsługiwać usuwanie plików i wykrywać konflikty. Jest praktyczne dla
74 klastrów HA, HPC, COW oraz farm serwerów.
75
76 %package -n csync2-standalone
77 Summary:        Files necessary to run csync2 in standalone daemon mode
78 Summary(pl.UTF-8):      Pliki niezbędne do uruchomienia csync2 w trybie samodzielnego serwera
79 Group:          Networking/Daemons
80 Requires(post,preun):   /sbin/chkconfig
81 Requires:       %{name} = %{version}-%{release}
82 Provides:       csyncd
83 Provides:       csyncd-standalone
84 Obsoletes:      csyncd
85 Obsoletes:      csync2-inetd
86 Obsoletes:      csyncd-inetd
87
88 %description -n csync2-standalone
89 Csync2 is a cluster synchronization tool. It can be used to keep files
90 on multiple hosts in a cluster in sync. Csync2 can handle complex
91 setups with much more than just 2 hosts, handle file deletions and can
92 detect conflicts. It is expedient for HA-clusters, HPC-clusters, COWs
93 and server farms.
94
95 %description -n csync2-standalone -l pl.UTF-8
96 Csync2 to narzędzie do synchronizacji klastra. Może być używane do
97 utrzymywania zgodności plików na wielu hostach w klastrze. Csync2 jest
98 w stanie obsłużyć złożone konfiguracje z więcej niż 2 hostami,
99 obsługiwać usuwanie plików i wykrywać konflikty. Jest praktyczne dla
100 klastrów HA, HPC, COW oraz farm serwerów.
101
102 %prep
103 %setup -q
104 %patch0 -p1
105 %patch1 -p0
106 %patch2 -p1
107
108 %build
109 %{__aclocal}
110 %{__automake}
111 %{__autoconf}
112 %configure \
113         --enable-gnutls \
114         --enable-mysql \
115         --enable-postgres \
116         --enable-sqlite3
117 %{__make}
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121 install -d $RPM_BUILD_ROOT{%{_var}/lib/csync2,/etc/{sysconfig/rc-inetd,rc.d/init.d}}
122
123 %{__make} install \
124         DESTDIR=$RPM_BUILD_ROOT
125
126 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
127 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/%{name}
128 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post -n csync2-inetd
134 %service -q rc-inetd reload
135
136 %postun -n csync2-inetd
137 if [ "$1" = "0" ]; then
138         %service -q rc-inetd reload
139 fi
140
141 %post -n csync2-standalone
142 /sbin/chkconfig --add csync2
143 %service csync2 restart "csync2 server"
144
145 %preun -n csync2-standalone
146 if [ "$1" = "0" ]; then
147         %service csync2 stop
148         /sbin/chkconfig --del csync2
149 fi
150
151 %files
152 %defattr(644,root,root,755)
153 %doc AUTHORS ChangeLog README csync2.xinetd doc/csync2_paper.pdf
154 %dir %{_sysconfdir}
155 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/csync2.cfg
156 %attr(755,root,root) %{_sbindir}/csync2
157 %attr(755,root,root) %{_sbindir}/csync2-compare
158 %dir %{_var}/lib/csync2
159 %{_mandir}/man1/*.1*
160
161 %files -n csync2-inetd
162 %defattr(644,root,root,755)
163 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/%{name}
164
165 %files -n csync2-standalone
166 %defattr(644,root,root,755)
167 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
168 %attr(754,root,root) /etc/rc.d/init.d/%{name}
This page took 0.083043 seconds and 4 git commands to generate.