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