]> git.pld-linux.org Git - packages/corosync.git/blob - corosync.spec
- updated to 2.4.4
[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.4
20 Release:        1
21 License:        BSD
22 Group:          Base
23 #Source0Download: http://corosync.org/download/
24 Source0:        http://build.clusterlabs.org/corosync/releases/%{name}-%{version}.tar.gz
25 # Source0-md5:  69db29ff4bc035936946be44fc8be5cd
26 Source1:        %{name}.init
27 Source2:        %{name}-notifyd.init
28 Source3:        %{name}-notifyd.sysconfig
29 URL:            http://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}
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 %build
136 %{__libtoolize}
137 %{__aclocal}
138 %{__autoconf}
139 %{__autoheader}
140 %{__automake}
141 %configure \
142         %{?with_augeas:--enable-augeas} \
143         %{?with_dbus:--enable-dbus} \
144         %{?with_libcgroup:--enable-libcgroup} \
145         %{?with_monitoring:--enable-monitoring} \
146         %{?with_qdevices:--enable-qdevices} \
147         %{?with_qnetd:--enable-qnetd} \
148         %{?with_rdma:--enable-rdma} \
149         --disable-silent-rules \
150         %{?with_snmp:--enable-snmp} \
151         --enable-systemd \
152         %{?with_testagents:--enable-testagents} \
153         %{?with_watchdog:--enable-watchdog} \
154         %{?with_xmlconf:--enable-xmlconf} \
155         --with-initddir=/etc/rc.d/init.d \
156         --with-systemddir=%{systemdunitdir}
157
158 %{__make}
159
160 %{?with_apidocs:%{__make} doxygen}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
165 install -d $RPM_BUILD_ROOT/var/log/cluster
166
167 %{__make} install \
168         mibdir=%{_datadir}/mibs \
169         DESTDIR=$RPM_BUILD_ROOT
170
171 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
172
173 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
174         >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
175 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
176
177 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
178 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
179 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
180
181 %if %{with qdevices} || %{with qnetd}
182 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
183 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/corosync.conf <<EOF
184 %if %{with qdevices}
185 d /var/run/corosync-qdevice 0770 root root -
186 %endif
187 %if %{with qnetd}
188 d /var/run/corosync-qnetd 0770 root root -
189 %endif
190 EOF
191 %endif
192
193 # obsoleted by pkg-config
194 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
195
196 %clean
197 rm -rf $RPM_BUILD_ROOT
198
199 %post
200 /sbin/chkconfig --add %{name}
201 /sbin/chkconfig --add %{name}-notifyd
202 %service %{name}-notifyd restart
203 %systemd_post %{name}-notifyd.service
204 export NORESTART=1
205 %systemd_post %{name}.service
206
207 %preun
208 if [ "$1" = "0" ]; then
209         %service -q %{name} stop
210         /sbin/chkconfig --del %{name}
211         %service -q %{name}-notifyd stop
212         /sbin/chkconfig --del %{name}-notifyd
213 fi
214 %systemd_preun %{name}.service
215 %systemd_preun %{name}-notifyd.service
216
217 %postun
218 %systemd_reload
219
220 %post   libs -p /sbin/ldconfig
221 %postun libs -p /sbin/ldconfig
222
223 %files
224 %defattr(644,root,root,755)
225 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
226 %if %{with xmlconf}
227 %doc conf/corosync.xml.example*
228 %endif
229 %attr(754,root,root) /etc/rc.d/init.d/corosync
230 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
231 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
232 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
233 %dir %{_sysconfdir}/corosync
234 %dir %{_sysconfdir}/corosync/service.d
235 %dir %{_sysconfdir}/corosync/uidgid.d
236 %{systemdunitdir}/corosync.service
237 %{systemdunitdir}/corosync-notifyd.service
238 %if %{with qdevices} || %{with qnetd}
239 %{systemdtmpfilesdir}/corosync.conf
240 %endif
241 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
242 %attr(755,root,root) %{_bindir}/corosync-blackbox
243 %attr(755,root,root) %{_sbindir}/corosync
244 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
245 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
246 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
247 %attr(755,root,root) %{_sbindir}/corosync-keygen
248 %attr(755,root,root) %{_sbindir}/corosync-notifyd
249 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
250 %{_mandir}/man5/corosync.conf.5*
251 %{_mandir}/man5/votequorum.5*
252 %{_mandir}/man8/corosync.8*
253 %{_mandir}/man8/corosync-blackbox.8*
254 %{_mandir}/man8/corosync-cmapctl.8*
255 %{_mandir}/man8/corosync-cfgtool.8*
256 %{_mandir}/man8/corosync-cpgtool.8*
257 %{_mandir}/man8/corosync-keygen.8*
258 %{_mandir}/man8/corosync-notifyd.8*
259 %{_mandir}/man8/corosync-quorumtool.8*
260 # should be man7...
261 %{_mandir}/man8/cmap_keys.8*
262 %{_mandir}/man8/cmap_overview.8*
263 %{_mandir}/man8/corosync_overview.8*
264 %{_mandir}/man8/cpg_overview.8*
265 %{_mandir}/man8/sam_overview.8*
266 %{_mandir}/man8/votequorum_overview.8*
267 %{_mandir}/man8/quorum_overview.8*
268 %dir %{_datadir}/corosync
269 %attr(755,root,root) %{_datadir}/%{name}/corosync
270 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
271 %if %{with xmlconf}
272 %attr(755,root,root) %{_bindir}/corosync-xmlproc
273 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
274 %dir %{_datadir}/corosync/xml2conf.xsl
275 %{_mandir}/man8/corosync-xmlproc.8*
276 %{_mandir}/man5/corosync.xml.5*
277 %endif
278 %if %{with augeas}
279 %{_datadir}/augeas/lenses/corosync.aug
280 %{_datadir}/augeas/lenses/tests/test_corosync.aug
281 %endif
282 %if %{with dbus}
283 /etc/dbus-1/system.d/corosync-signals.conf
284 %endif
285 %dir /var/lib/corosync
286 %attr(700,root,root) %dir /var/log/cluster
287 %if %{with qdevices}
288 %attr(755,root,root) %{_sbindir}/corosync-qdevice
289 %attr(755,root,root) %{_sbindir}/corosync-qdevice-net-certutil
290 %attr(755,root,root) %{_sbindir}/corosync-qdevice-tool
291 %{_datadir}/corosync/corosync-qdevice
292 %{systemdunitdir}/corosync-qdevice.service
293 %dir %{_sysconfdir}/corosync/qdevice
294 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qdevice/net
295 %attr(770,root,root) %dir /var/run/corosync-qdevice
296 %{_mandir}/man8/corosync-qdevice.8*
297 %{_mandir}/man8/corosync-qdevice-net-certutil.8*
298 %{_mandir}/man8/corosync-qdevice-tool.8*
299 %endif
300 %if %{with qnetd}
301 %attr(755,root,root) %{_bindir}/corosync-qnetd
302 %attr(755,root,root) %{_bindir}/corosync-qnetd-certutil
303 %attr(755,root,root) %{_bindir}/corosync-qnetd-tool
304 %{_datadir}/corosync/corosync-qnetd
305 %{systemdunitdir}/corosync-qnetd.service
306 %attr(770,root,root) %dir %{_sysconfdir}/corosync/qnetd
307 %attr(770,root,root) %dir /var/run/corosync-qnetd
308 %{_mandir}/man8/corosync-qnetd.8*
309 %{_mandir}/man8/corosync-qnetd-certutil.8*
310 %{_mandir}/man8/corosync-qnetd-tool.8*
311 %endif
312
313 %files libs
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
316 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
317 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
318 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
319 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
321 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
323 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
325 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
326 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
327 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
328 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
329 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
330 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
331
332 %files devel
333 %defattr(644,root,root,755)
334 %{?with_apidocs:%doc doc/api/html/*}
335 %attr(755,root,root) %{_libdir}/libcfg.so
336 %attr(755,root,root) %{_libdir}/libcmap.so
337 %attr(755,root,root) %{_libdir}/libcorosync_common.so
338 %attr(755,root,root) %{_libdir}/libcpg.so
339 %attr(755,root,root) %{_libdir}/libsam.so
340 %attr(755,root,root) %{_libdir}/libquorum.so
341 %attr(755,root,root) %{_libdir}/libtotem_pg.so
342 %attr(755,root,root) %{_libdir}/libvotequorum.so
343 %{_includedir}/corosync
344 %{_pkgconfigdir}/corosync.pc
345 %{_pkgconfigdir}/libcfg.pc
346 %{_pkgconfigdir}/libcmap.pc
347 %{_pkgconfigdir}/libcorosync_common.pc
348 %{_pkgconfigdir}/libcpg.pc
349 %{_pkgconfigdir}/libquorum.pc
350 %{_pkgconfigdir}/libsam.pc
351 %{_pkgconfigdir}/libtotem_pg.pc
352 %{_pkgconfigdir}/libvotequorum.pc
353 %{_mandir}/man3/cmap_*.3*
354 %{_mandir}/man3/cpg_*.3*
355 %{_mandir}/man3/quorum_*.3*
356 %{_mandir}/man3/sam_*.3*
357 %{_mandir}/man3/votequorum_*.3*
358
359 %files static
360 %defattr(644,root,root,755)
361 %{_libdir}/libcfg.a
362 %{_libdir}/libcmap.a
363 %{_libdir}/libcorosync_common.a
364 %{_libdir}/libcpg.a
365 %{_libdir}/libsam.a
366 %{_libdir}/libquorum.a
367 %{_libdir}/libtotem_pg.a
368 %{_libdir}/libvotequorum.a
369
370 %if %{with testagents}
371 %files testagents
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_bindir}/cpg_test_agent
374 %attr(755,root,root) %{_bindir}/sam_test_agent
375 %attr(755,root,root) %{_bindir}/votequorum_test_agent
376 %dir %{_datadir}/corosync/tests
377 %{_datadir}/corosync/tests/mem_leak_test.sh
378 %{_datadir}/corosync/tests/net_breaker.sh
379 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
380 %{_datadir}/corosync/tests/shm_leak_audit.sh
381 %endif
382
383 %if %{with snmp}
384 %files -n mibs-corosync
385 %defattr(644,root,root,755)
386 %{_datadir}/mibs/COROSYNC-MIB.txt
387 %endif
This page took 0.055612 seconds and 4 git commands to generate.