]> git.pld-linux.org Git - packages/corosync.git/blame - corosync.spec
rel 2; add /var/log/cluster
[packages/corosync.git] / corosync.spec
CommitLineData
a1f7a440 1#
ab0d79a4 2# Conditional build:
37d86914 3%bcond_without apidocs # build apidocs (some man3 pages are provided anyway)
4169d0ae
JB
4%bcond_without dbus # DBus events
5%bcond_without rdma # RDMA support
6%bcond_without snmp # SNMP protocol support
37d86914
JK
7%bcond_without testagents
8%bcond_without watchdog
9%bcond_without monitoring
10%bcond_without xmlconf
2805ff24 11#
ab0d79a4 12Summary: Corosync - OSI Certified implementation of a complete cluster engine
a1f7a440 13Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
ab0d79a4 14Name: corosync
e2130fd9 15Version: 2.2.0
1ffd5e89 16Release: 2
ab0d79a4 17License: BSD
18Group: Base
b6437302 19Source0: http://corosync.org/download/%{name}-%{version}.tar.gz
e2130fd9 20# Source0-md5: 1bdae48c4ec1df653809d3dc04b3d121
baa29f3f
JK
21Source1: %{name}.init
22Source2: %{name}-notifyd.init
23Source3: %{name}-notifyd.sysconfig
b6437302 24Patch0: %{name}-notifyd_service.patch
ab0d79a4 25URL: http://www.corosync.org/
a1f7a440 26BuildRequires: autoconf >= 2.61
ab0d79a4 27BuildRequires: automake
4169d0ae 28%{?with_dbus:BuildRequires: dbus-devel}
2805ff24 29%{?with_apidocs:BuildRequires: doxygen}
5a02a01c 30BuildRequires: libqb-devel
37d86914 31%{?with_monitoring:BuildRequires: libstatgrab-devel}
2805ff24
JB
32%if %{with rdma}
33BuildRequires: libibverbs-devel
34BuildRequires: librdmacm-devel
833a6419 35BuildRequires: libtool
2805ff24 36%endif
5a02a01c 37%{?with_xmlconf:BuildRequires: libxslt}
4169d0ae 38%{?with_snmp:BuildRequires: net-snmp-devel}
40252af1 39BuildRequires: nss-devel
9d8c645a 40BuildRequires: pkgconfig
7e102371 41BuildRequires: rpmbuild(macros) >= 1.644
833a6419
JK
42Requires: rc-scripts
43Requires: systemd-units >= 38
44Requires(post,preun): /sbin/chkconfig
a1f7a440 45Requires: %{name}-libs = %{version}-%{release}
ab0d79a4 46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
4169d0ae
JB
48# short_service_name_get() is defined in executable
49%define skip_post_check_so libcoroipcs\.so.*
50
ab0d79a4 51%description
52The Corosync Cluster Engine is an OSI Certified implementation of a
53complete cluster engine.
54
a1f7a440
JB
55%description -l pl.UTF-8
56Corosync Cluster Engine to implementacja pełnego silnika klastrowego
57certyfikowana przez OSI.
58
ab0d79a4 59%package libs
a1f7a440
JB
60Summary: Corosync Cluster Engine libraries
61Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync
ab0d79a4 62Group: Libraries
63
64%description libs
a1f7a440
JB
65This package contains the libraries of Corosync Cluster Engine, an OSI
66Certified implementation of a complete cluster engine.
67
68%description libs -l pl.UTF-8
a1e347d6 69Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
70silnika klastrowego certyfikowanego przez OSI.
ab0d79a4 71
72%package devel
a1f7a440
JB
73Summary: Header files for Corosync libraries
74Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync
ab0d79a4 75Group: Development/Libraries
76Requires: %{name}-libs = %{version}-%{release}
3398ab62 77Conflicts: openais-devel < 1.0
ab0d79a4 78
79%description devel
a1f7a440 80This package contains the include files used to develop using Corosync
ab0d79a4 81APIs.
82
a1f7a440
JB
83%description devel -l pl.UTF-8
84Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
85użyciem API Corosync.
86
ab0d79a4 87%package static
a1f7a440
JB
88Summary: Corosync static libraries
89Summary(pl.UTF-8): Statyczne biblioteki Corosync
ab0d79a4 90Group: Development/Libraries
91Requires: %{name}-devel = %{version}-%{release}
92
93%description static
a1f7a440
JB
94This package contains the Corosync static libraries.
95
96%description static -l pl.UTF-8
97Ten pakiet zawiera statyczne biblioteki Corosync.
ab0d79a4 98
4169d0ae
JB
99%package -n mibs-corosync
100Summary: Corosync SNMP MIB data
101Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
102Group: Applications/System
103Requires: mibs-dirs
104
105%description -n mibs-corosync
106Corosync SNMP MIB data.
107
108%description -n mibs-corosync -l pl.UTF-8
109Dane SNMP MIB dla Corosync.
110
5a02a01c
JK
111%package -n corosync-testagents
112Summary: The Corosync Cluster Engine Test Agents
113Group: Development/Libraries
114Requires: %{name} = %{version}-%{release}
115
116%description -n corosync-testagents
117This package contains corosync test agents.
118
ab0d79a4 119%prep
120%setup -q
bc47be90 121%patch0 -p1
ab0d79a4 122
123%build
37d86914 124%{__libtoolize}
ab0d79a4 125%{__aclocal}
126%{__autoconf}
a1f7a440 127%{__autoheader}
ab0d79a4 128%{__automake}
ab0d79a4 129%configure \
5a02a01c
JK
130 %{?with_testagents:--enable-testagents} \
131 %{?with_watchdog:--enable-watchdog} \
132 %{?with_monitoring:--enable-monitoring} \
133 %{?with_xmlconf:--enable-xmlconf} \
4169d0ae 134 %{?with_dbus:--enable-dbus} \
2805ff24 135 %{?with_rdma:--enable-rdma} \
4169d0ae 136 %{?with_snmp:--enable-snmp} \
5a02a01c
JK
137 --enable-systemd \
138 --with-systemddir=%{systemdunitdir} \
139 --with-initddir=/etc/rc.d/init.d
ab0d79a4 140
141%{__make}
142
143%{?with_apidocs:%{__make} doxygen}
a1e347d6 144
ab0d79a4 145%install
146rm -rf $RPM_BUILD_ROOT
baa29f3f 147install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
1ffd5e89 148install -d $RPM_BUILD_ROOT/var/log/cluster
a1f7a440 149
ab0d79a4 150%{__make} install \
151 DESTDIR=$RPM_BUILD_ROOT
ab0d79a4 152
a1e347d6 153%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
a1f7a440
JB
154
155sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
156 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
4169d0ae 157%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
ab0d79a4 158
37d86914
JK
159install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
160install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
161install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
162
ab0d79a4 163%clean
164rm -rf $RPM_BUILD_ROOT
165
5a02a01c 166%post
baa29f3f
JK
167/sbin/chkconfig --add %{name}
168/sbin/chkconfig --add %{name}-notifyd
baa29f3f 169%service %{name}-notifyd restart
baa29f3f 170%systemd_post %{name}-notifyd.service
383c4bd9
JK
171export NORESTART=1
172%systemd_post %{name}.service
5a02a01c
JK
173
174%preun
175if [ "$1" = "0" ]; then
baa29f3f
JK
176 %service -q %{name} stop
177 /sbin/chkconfig --del %{name}
178 %service -q %{name}-notifyd stop
179 /sbin/chkconfig --del %{name}-notifyd
5a02a01c 180fi
baa29f3f
JK
181%systemd_preun %{name}.service
182%systemd_preun %{name}-notifyd.service
5a02a01c
JK
183
184%postun
185%systemd_reload
186
364ac3e0 187%post libs -p /sbin/ldconfig
188%postun libs -p /sbin/ldconfig
189
ab0d79a4 190%files
191%defattr(644,root,root,755)
5a02a01c
JK
192%doc AUTHORS ChangeLog LICENSE README.recovery SECURITY TODO conf/corosync.conf.example*
193%if %{with xmlconf}
194%doc conf/corosync.xml.example*
195%endif
a1f7a440 196%attr(754,root,root) /etc/rc.d/init.d/corosync
4169d0ae 197%attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
baa29f3f 198%verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
ab0d79a4 199%dir %{_sysconfdir}/corosync
5a02a01c
JK
200%{systemdunitdir}/corosync.service
201%{systemdunitdir}/corosync-notifyd.service
ab0d79a4 202%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
e7c18d27 203%attr(755,root,root) %{_bindir}/corosync-blackbox
ab0d79a4 204%attr(755,root,root) %{_sbindir}/corosync
205%attr(755,root,root) %{_sbindir}/corosync-cfgtool
5a02a01c 206%attr(755,root,root) %{_sbindir}/corosync-cmapctl
a1f7a440 207%attr(755,root,root) %{_sbindir}/corosync-cpgtool
ab0d79a4 208%attr(755,root,root) %{_sbindir}/corosync-keygen
4169d0ae 209%attr(755,root,root) %{_sbindir}/corosync-notifyd
40252af1 210%attr(755,root,root) %{_sbindir}/corosync-quorumtool
a1f7a440
JB
211%{_mandir}/man5/corosync.conf.5*
212%{_mandir}/man8/corosync.8*
213%{_mandir}/man8/corosync-blackbox.8*
5a02a01c 214%{_mandir}/man8/corosync-cmapctl.8*
a1f7a440
JB
215%{_mandir}/man8/corosync-cfgtool.8*
216%{_mandir}/man8/corosync-cpgtool.8*
a1f7a440 217%{_mandir}/man8/corosync-keygen.8*
4169d0ae 218%{_mandir}/man8/corosync-notifyd.8*
a1f7a440 219%{_mandir}/man8/corosync-quorumtool.8*
025a2098
JK
220%{_mandir}/man5/votequorum.5*
221# should be man7...
222%{_mandir}/man8/cmap_keys.8*
223%{_mandir}/man8/cmap_overview.8*
224%{_mandir}/man8/corosync_overview.8*
225%{_mandir}/man8/cpg_overview.8*
226%{_mandir}/man8/sam_overview.8*
227%{_mandir}/man8/votequorum_overview.8*
228%{_mandir}/man8/quorum_overview.8*
30055d52
JK
229%dir %{_datadir}/corosync
230%attr(755,root,root) %{_datadir}/%{name}/corosync
231%attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
5a02a01c
JK
232%if %{with xmlconf}
233%attr(755,root,root) %{_bindir}/corosync-xmlproc
234%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
5a02a01c 235%dir %{_datadir}/corosync/xml2conf.xsl
5a02a01c
JK
236%{_mandir}/man8/corosync-xmlproc.8*
237%{_mandir}/man5/corosync.xml.5*
238%endif
239%if %{with dbus}
240/etc/dbus-1/system.d/corosync-signals.conf
241%endif
60ed1713 242/var/lib/corosync
1ffd5e89 243%dir /var/log/cluster
ab0d79a4 244
245%files libs
246%defattr(644,root,root,755)
5a02a01c
JK
247%attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
248%attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
249%attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
250%attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
251%attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
252%attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
ab0d79a4 253%attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
254%attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
1c7457c7 255%attr(755,root,root) %{_libdir}/libsam.so.4.*.*
256%attr(755,root,root) %ghost %{_libdir}/libsam.so.4
5a02a01c
JK
257%attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
258%attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
259%attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
260%attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
37d86914
JK
261%attr(755,root,root) %{_libdir}/libvotequorum.so.6.*.*
262%attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.6
ab0d79a4 263
264%files devel
265%defattr(644,root,root,755)
cab13e1f 266%{?with_apidocs:%doc doc/api/html/*}
a1f7a440 267%attr(755,root,root) %{_libdir}/libcfg.so
5a02a01c
JK
268%attr(755,root,root) %{_libdir}/libcmap.so
269%attr(755,root,root) %{_libdir}/libcorosync_common.so
a1f7a440 270%attr(755,root,root) %{_libdir}/libcpg.so
a1f7a440
JB
271%attr(755,root,root) %{_libdir}/libsam.so
272%attr(755,root,root) %{_libdir}/libquorum.so
273%attr(755,root,root) %{_libdir}/libtotem_pg.so
274%attr(755,root,root) %{_libdir}/libvotequorum.so
ab0d79a4 275%{_includedir}/corosync
a1f7a440
JB
276%{_pkgconfigdir}/corosync.pc
277%{_pkgconfigdir}/libcfg.pc
5a02a01c
JK
278%{_pkgconfigdir}/libcmap.pc
279%{_pkgconfigdir}/libcorosync_common.pc
a1f7a440 280%{_pkgconfigdir}/libcpg.pc
a1f7a440
JB
281%{_pkgconfigdir}/libquorum.pc
282%{_pkgconfigdir}/libsam.pc
283%{_pkgconfigdir}/libtotem_pg.pc
284%{_pkgconfigdir}/libvotequorum.pc
5a02a01c 285%{_mandir}/man3/cmap_*.3*
a1f7a440 286%{_mandir}/man3/cpg_*.3*
5a02a01c 287%{_mandir}/man3/quorum_*.3*
a1f7a440
JB
288%{_mandir}/man3/sam_*.3*
289%{_mandir}/man3/votequorum_*.3*
025a2098 290
ab0d79a4 291%files static
292%defattr(644,root,root,755)
293%{_libdir}/libcfg.a
5a02a01c
JK
294%{_libdir}/libcmap.a
295%{_libdir}/libcorosync_common.a
ab0d79a4 296%{_libdir}/libcpg.a
1c7457c7 297%{_libdir}/libsam.a
ab0d79a4 298%{_libdir}/libquorum.a
299%{_libdir}/libtotem_pg.a
300%{_libdir}/libvotequorum.a
4169d0ae
JB
301
302%if %{with snmp}
303%files -n mibs-corosync
304%defattr(644,root,root,755)
305%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
306%endif
5a02a01c
JK
307
308%if %{with testagents}
309%files -n corosync-testagents
310%defattr(644,root,root,755)
485d55ce 311%dir %{_datadir}/corosync/tests
5a02a01c
JK
312%{_datadir}/corosync/tests/mem_leak_test.sh
313%{_datadir}/corosync/tests/net_breaker.sh
314%{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
315%{_datadir}/corosync/tests/shm_leak_audit.sh
316%attr(755,root,root) %{_bindir}/cpg_test_agent
317%attr(755,root,root) %{_bindir}/sam_test_agent
318%attr(755,root,root) %{_bindir}/votequorum_test_agent
319%endif
This page took 0.116155 seconds and 4 git commands to generate.