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