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