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