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