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