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