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