3 %bcond_without apidocs # build apidocs (some man3 pages are provided anyway)
4 %bcond_without augeas # augeas lens support
5 %bcond_without dbus # DBus events
6 %bcond_without nozzle # nozzle support
7 %bcond_without snmp # SNMP protocol support
8 %bcond_without vqsim # quorum simulator support
9 %bcond_without watchdog # watchdog support
10 %bcond_without monitoring # resource monitoring
11 %bcond_without xmlconf # XML configuration support
13 Summary: Corosync - OSI Certified implementation of a complete cluster engine
14 Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
20 #Source0Download: http://corosync.org/download/
21 Source0: https://build.clusterlabs.org/corosync/releases/%{name}-%{version}.tar.gz
22 # Source0-md5: 9bb4ef724b468d51ac9d6894cf34333b
24 Source2: %{name}-notifyd.init
25 Source3: %{name}-notifyd.sysconfig
26 URL: https://www.corosync.org/
27 BuildRequires: autoconf >= 2.61
28 BuildRequires: automake >= 1:1.11
29 %{?with_dbus:BuildRequires: dbus-devel}
30 %{?with_apidocs:BuildRequires: doxygen}
31 %{?with_apidocs:BuildRequires: graphviz}
33 %{?with_nozzle:BuildRequires: kronosnet-devel}
34 BuildRequires: libqb-devel
35 %{?with_monitoring:BuildRequires: libstatgrab-devel >= 0.90}
36 BuildRequires: libtool >= 2:2.2.6
37 %{?with_snmp:BuildRequires: net-snmp-devel}
38 BuildRequires: nss-devel
39 BuildRequires: pkgconfig
40 %{?with_vqsim:BuildRequires: readline-devel}
41 BuildRequires: rpmbuild(macros) >= 1.644
42 BuildRequires: systemd-devel >= 1:209
43 # only for cpghum test program
44 #BuildRequires: zlib-devel
45 %{?with_xmlconf:Requires: libxslt-progs}
47 Requires: systemd-units >= 38
48 Requires(post,preun): /sbin/chkconfig
49 Requires: %{name}-libs = %{version}-%{release}
50 Obsoletes: corosync-testagents < 3
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 # short_service_name_get() is defined in executable
54 %define skip_post_check_so libcoroipcs\.so.*
57 The Corosync Cluster Engine is an OSI Certified implementation of a
58 complete cluster engine.
60 %description -l pl.UTF-8
61 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
62 certyfikowana przez OSI.
65 Summary: Corosync Cluster Engine libraries
66 Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync
70 This package contains the libraries of Corosync Cluster Engine, an OSI
71 Certified implementation of a complete cluster engine.
73 %description libs -l pl.UTF-8
74 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
75 silnika klastrowego certyfikowanego przez OSI.
78 Summary: Header files for Corosync libraries
79 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync
80 Group: Development/Libraries
81 Requires: %{name}-libs = %{version}-%{release}
82 Conflicts: openais-devel < 1.0
85 This package contains the include files used to develop using Corosync
88 %description devel -l pl.UTF-8
89 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
93 Summary: Corosync static libraries
94 Summary(pl.UTF-8): Statyczne biblioteki Corosync
95 Group: Development/Libraries
96 Requires: %{name}-devel = %{version}-%{release}
99 This package contains the Corosync static libraries.
101 %description static -l pl.UTF-8
102 Ten pakiet zawiera statyczne biblioteki Corosync.
104 %package -n mibs-corosync
105 Summary: Corosync SNMP MIB data
106 Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
107 Group: Applications/System
110 %description -n mibs-corosync
111 Corosync SNMP MIB data.
113 %description -n mibs-corosync -l pl.UTF-8
114 Dane SNMP MIB dla Corosync.
126 %{?with_augeas:--enable-augeas} \
127 %{?with_dbus:--enable-dbus} \
128 %{?with_monitoring:--enable-monitoring} \
129 %{?with_nozzle:--enable-nozzle} \
130 --disable-silent-rules \
131 %{?with_snmp:--enable-snmp} \
133 %{?with_vqsim:--enable-vqsim} \
134 %{?with_watchdog:--enable-watchdog} \
135 %{?with_xmlconf:--enable-xmlconf} \
136 --with-initddir=/etc/rc.d/init.d \
137 --with-systemddir=%{systemdunitdir}
141 %{?with_apidocs:%{__make} doxygen}
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
146 install -d $RPM_BUILD_ROOT/var/log/cluster
149 mibdir=%{_datadir}/mibs \
150 DESTDIR=$RPM_BUILD_ROOT
152 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
154 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
155 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
156 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
158 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
159 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
160 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
162 # obsoleted by pkg-config
163 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
166 rm -rf $RPM_BUILD_ROOT
169 /sbin/chkconfig --add %{name}
170 /sbin/chkconfig --add %{name}-notifyd
171 %service %{name}-notifyd restart
172 %systemd_post %{name}-notifyd.service
174 %systemd_post %{name}.service
177 if [ "$1" = "0" ]; then
178 %service -q %{name} stop
179 /sbin/chkconfig --del %{name}
180 %service -q %{name}-notifyd stop
181 /sbin/chkconfig --del %{name}-notifyd
183 %systemd_preun %{name}.service
184 %systemd_preun %{name}-notifyd.service
189 %post libs -p /sbin/ldconfig
190 %postun libs -p /sbin/ldconfig
193 %defattr(644,root,root,755)
194 %doc AUTHORS ChangeLog LICENSE README.recovery conf/corosync.conf.example*
195 %attr(754,root,root) /etc/rc.d/init.d/corosync
196 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
197 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
198 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
199 %dir %{_sysconfdir}/corosync
200 %dir %{_sysconfdir}/corosync/service.d
201 %dir %{_sysconfdir}/corosync/uidgid.d
202 %{systemdunitdir}/corosync.service
203 %{systemdunitdir}/corosync-notifyd.service
204 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
205 %attr(755,root,root) %{_bindir}/corosync-blackbox
206 %attr(755,root,root) %{_sbindir}/corosync
207 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
208 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
209 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
210 %attr(755,root,root) %{_sbindir}/corosync-keygen
211 %attr(755,root,root) %{_sbindir}/corosync-notifyd
212 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
213 %{_mandir}/man5/corosync.conf.5*
214 %{_mandir}/man5/votequorum.5*
215 %{_mandir}/man7/cmap_keys.7*
216 %{_mandir}/man7/corosync_overview.7*
217 %{_mandir}/man8/corosync.8*
218 %{_mandir}/man8/corosync-blackbox.8*
219 %{_mandir}/man8/corosync-cmapctl.8*
220 %{_mandir}/man8/corosync-cfgtool.8*
221 %{_mandir}/man8/corosync-cpgtool.8*
222 %{_mandir}/man8/corosync-keygen.8*
223 %{_mandir}/man8/corosync-notifyd.8*
224 %{_mandir}/man8/corosync-quorumtool.8*
225 %dir %{_datadir}/corosync
227 %attr(755,root,root) %{_bindir}/corosync-xmlproc
228 %dir %{_datadir}/corosync/xml2conf.xsl
229 %{_mandir}/man8/corosync-xmlproc.8*
230 %{_mandir}/man5/corosync.xml.5*
233 %{_datadir}/augeas/lenses/corosync.aug
234 %{_datadir}/augeas/lenses/tests/test_corosync.aug
237 /etc/dbus-1/system.d/corosync-signals.conf
239 %dir /var/lib/corosync
240 %attr(700,root,root) %dir /var/log/cluster
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libcfg.so.7.*.*
245 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.7
246 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
247 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
248 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
249 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
250 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
251 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
252 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
253 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
254 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
255 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
256 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
257 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
260 %defattr(644,root,root,755)
261 %{?with_apidocs:%doc doc/api/html/*}
262 %attr(755,root,root) %{_libdir}/libcfg.so
263 %attr(755,root,root) %{_libdir}/libcmap.so
264 %attr(755,root,root) %{_libdir}/libcorosync_common.so
265 %attr(755,root,root) %{_libdir}/libcpg.so
266 %attr(755,root,root) %{_libdir}/libsam.so
267 %attr(755,root,root) %{_libdir}/libquorum.so
268 %attr(755,root,root) %{_libdir}/libvotequorum.so
269 %{_includedir}/corosync
270 %{_pkgconfigdir}/corosync.pc
271 %{_pkgconfigdir}/libcfg.pc
272 %{_pkgconfigdir}/libcmap.pc
273 %{_pkgconfigdir}/libcorosync_common.pc
274 %{_pkgconfigdir}/libcpg.pc
275 %{_pkgconfigdir}/libquorum.pc
276 %{_pkgconfigdir}/libsam.pc
277 %{_pkgconfigdir}/libvotequorum.pc
278 %{_mandir}/man3/cmap_*.3*
279 %{_mandir}/man3/cpg_*.3*
280 %{_mandir}/man3/quorum_*.3*
281 %{_mandir}/man3/sam_*.3*
282 %{_mandir}/man3/votequorum_*.3*
285 %defattr(644,root,root,755)
288 %{_libdir}/libcorosync_common.a
291 %{_libdir}/libquorum.a
292 %{_libdir}/libvotequorum.a
295 %files -n mibs-corosync
296 %defattr(644,root,root,755)
297 %{_datadir}/mibs/COROSYNC-MIB.txt