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