3 # - wait for openais compatible with corosync 2.0 before setting full Release
6 %bcond_with apidocs # build apidocs (man3 pages are provided anyway)
7 %bcond_without dbus # DBus events
8 %bcond_without rdma # RDMA support
9 %bcond_without snmp # SNMP protocol support
10 %bcond_with testagents
12 %bcond_with monitoring
15 Summary: Corosync - OSI Certified implementation of a complete cluster engine
16 Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
22 Source0: ftp://ftp:downloads@corosync.org/downloads/%{name}-%{version}/corosync-%{version}.tar.gz
23 # Source0-md5: 9e23f3f5594676455ff39ff363658155
24 Patch0: %{name}-makefile.patch
25 Patch1: %{name}-lib_deps.patch
26 Patch2: %{name}-install.patch
27 URL: http://www.corosync.org/
28 BuildRequires: autoconf >= 2.61
29 BuildRequires: automake
30 %{?with_dbus:BuildRequires: dbus-devel}
31 %{?with_apidocs:BuildRequires: doxygen}
32 BuildRequires: libqb-devel
34 BuildRequires: libibverbs-devel
35 BuildRequires: librdmacm-devel
37 %{?with_xmlconf:BuildRequires: libxslt}
38 %{?with_snmp:BuildRequires: net-snmp-devel}
39 BuildRequires: nss-devel
40 BuildRequires: pkgconfig
41 Requires: %{name}-libs = %{version}-%{release}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 # short_service_name_get() is defined in executable
45 %define skip_post_check_so libcoroipcs\.so.*
48 The Corosync Cluster Engine is an OSI Certified implementation of a
49 complete cluster engine.
51 %description -l pl.UTF-8
52 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
53 certyfikowana przez OSI.
56 Summary: Corosync Cluster Engine libraries
57 Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync
61 This package contains the libraries of Corosync Cluster Engine, an OSI
62 Certified implementation of a complete cluster engine.
64 %description libs -l pl.UTF-8
65 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
66 silnika klastrowego certyfikowanego przez OSI.
69 Summary: Header files for Corosync libraries
70 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync
71 Group: Development/Libraries
72 Requires: %{name}-libs = %{version}-%{release}
73 Conflicts: openais-devel < 1.0
76 This package contains the include files used to develop using Corosync
79 %description devel -l pl.UTF-8
80 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
84 Summary: Corosync static libraries
85 Summary(pl.UTF-8): Statyczne biblioteki Corosync
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 This package contains the Corosync static libraries.
92 %description static -l pl.UTF-8
93 Ten pakiet zawiera statyczne biblioteki Corosync.
95 %package -n mibs-corosync
96 Summary: Corosync SNMP MIB data
97 Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
98 Group: Applications/System
101 %description -n mibs-corosync
102 Corosync SNMP MIB data.
104 %description -n mibs-corosync -l pl.UTF-8
105 Dane SNMP MIB dla Corosync.
107 %package -n corosync-testagents
108 Summary: The Corosync Cluster Engine Test Agents
109 Group: Development/Libraries
110 Requires: %{name} = %{version}-%{release}
112 %description -n corosync-testagents
113 This package contains corosync test agents.
127 %{?with_testagents:--enable-testagents} \
128 %{?with_watchdog:--enable-watchdog} \
129 %{?with_monitoring:--enable-monitoring} \
130 %{?with_xmlconf:--enable-xmlconf} \
131 %{?with_dbus:--enable-dbus} \
132 %{?with_rdma:--enable-rdma} \
133 %{?with_snmp:--enable-snmp} \
135 --with-systemddir=%{systemdunitdir} \
136 --with-initddir=/etc/rc.d/init.d
140 %{?with_apidocs:%{__make} doxygen}
143 rm -rf $RPM_BUILD_ROOT
146 DESTDIR=$RPM_BUILD_ROOT
148 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
150 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
151 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
152 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
154 %{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3}
157 rm -rf $RPM_BUILD_ROOT
160 /sbin/chkconfig --add corosync
161 %service corosync restart "Corosync Cluster Engine"
163 %systemd_post corosync.service
166 if [ "$1" = "0" ]; then
167 %service corosync stop
168 /sbin/chkconfig --del corosync
170 %systemd_preun corosync.service
175 %post libs -p /sbin/ldconfig
176 %postun libs -p /sbin/ldconfig
179 %defattr(644,root,root,755)
180 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY TODO conf/corosync.conf.example*
182 %doc conf/corosync.xml.example*
184 %attr(754,root,root) /etc/rc.d/init.d/corosync
185 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
186 %dir %{_sysconfdir}/corosync
187 %{systemdunitdir}/corosync.service
188 %{systemdunitdir}/corosync-notifyd.service
189 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
190 %attr(755,root,root) %{_bindir}/corosync-blackbox
191 %attr(755,root,root) %{_sbindir}/corosync
192 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
193 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
194 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
195 %attr(755,root,root) %{_sbindir}/corosync-fplay
196 %attr(755,root,root) %{_sbindir}/corosync-keygen
197 %attr(755,root,root) %{_sbindir}/corosync-notifyd
198 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
199 %{_mandir}/man5/corosync.conf.5*
200 %{_mandir}/man8/corosync.8*
201 %{_mandir}/man8/corosync-blackbox.8*
202 %{_mandir}/man8/corosync-cmapctl.8*
203 %{_mandir}/man8/corosync-cfgtool.8*
204 %{_mandir}/man8/corosync-cpgtool.8*
205 %{_mandir}/man8/corosync-fplay.8*
206 %{_mandir}/man8/corosync-keygen.8*
207 %{_mandir}/man8/corosync-notifyd.8*
208 %{_mandir}/man8/corosync-quorumtool.8*
210 %attr(755,root,root) %{_bindir}/corosync-xmlproc
211 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
212 %dir %{_datadir}/corosync
213 %dir %{_datadir}/corosync/xml2conf.xsl
214 %{_mandir}/man8/corosync-xmlproc.8*
215 %{_mandir}/man5/corosync.xml.5*
218 /etc/dbus-1/system.d/corosync-signals.conf
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
224 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
225 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
226 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
227 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
228 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
229 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
230 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
231 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
232 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
233 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
235 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
237 %attr(755,root,root) %{_libdir}/libvotequorum.so.5.*.*
238 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.5
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libcfg.so
243 %attr(755,root,root) %{_libdir}/libcmap.so
244 %attr(755,root,root) %{_libdir}/libcorosync_common.so
245 %attr(755,root,root) %{_libdir}/libcpg.so
246 %attr(755,root,root) %{_libdir}/libsam.so
247 %attr(755,root,root) %{_libdir}/libquorum.so
248 %attr(755,root,root) %{_libdir}/libtotem_pg.so
249 %attr(755,root,root) %{_libdir}/libvotequorum.so
250 %{_includedir}/corosync
251 %{_pkgconfigdir}/corosync.pc
252 %{_pkgconfigdir}/libcfg.pc
253 %{_pkgconfigdir}/libcmap.pc
254 %{_pkgconfigdir}/libcorosync_common.pc
255 %{_pkgconfigdir}/libcpg.pc
256 %{_pkgconfigdir}/libquorum.pc
257 %{_pkgconfigdir}/libsam.pc
258 %{_pkgconfigdir}/libtotem_pg.pc
259 %{_pkgconfigdir}/libvotequorum.pc
260 %{_mandir}/man3/cmap_*.3*
261 %{_mandir}/man3/cpg_*.3*
262 %{_mandir}/man3/quorum_*.3*
263 %{_mandir}/man3/sam_*.3*
264 %{_mandir}/man3/votequorum_*.3*
265 %{_mandir}/man5/votequorum.5*
267 %{_mandir}/man8/cmap_keys.8*
268 %{_mandir}/man8/cmap_overview.8*
269 %{_mandir}/man8/corosync_overview.8*
270 %{_mandir}/man8/cpg_overview.8*
271 %{_mandir}/man8/sam_overview.8*
272 %{_mandir}/man8/votequorum_overview.8*
273 %{_mandir}/man8/quorum_overview.8*
275 %defattr(644,root,root,755)
278 %{_libdir}/libcorosync_common.a
281 %{_libdir}/libquorum.a
282 %{_libdir}/libtotem_pg.a
283 %{_libdir}/libvotequorum.a
286 %files -n mibs-corosync
287 %defattr(644,root,root,755)
288 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
291 %if %{with testagents}
292 %files -n corosync-testagents
293 %defattr(644,root,root,755)
294 %{_datadir}/corosync/tests/mem_leak_test.sh
295 %{_datadir}/corosync/tests/net_breaker.sh
296 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
297 %{_datadir}/corosync/tests/shm_leak_audit.sh
298 %attr(755,root,root) %{_bindir}/cpg_test_agent
299 %attr(755,root,root) %{_bindir}/sam_test_agent
300 %attr(755,root,root) %{_bindir}/votequorum_test_agent