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