]> git.pld-linux.org Git - packages/corosync.git/blame - corosync.spec
Dependencies updated, adapterized
[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)
4169d0ae
JB
4%bcond_without dbus # DBus events
5%bcond_without rdma # RDMA support
6%bcond_without snmp # SNMP protocol support
37d86914
JK
7%bcond_without testagents
8%bcond_without watchdog
9%bcond_without monitoring
10%bcond_without xmlconf
2805ff24 11#
ab0d79a4 12Summary: Corosync - OSI Certified implementation of a complete cluster engine
a1f7a440 13Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
ab0d79a4 14Name: corosync
37d86914 15Version: 2.1.0
4ee17075 16Release: 4
ab0d79a4 17License: BSD
18Group: Base
833a6419 19Source0: https://github.com/downloads/corosync/corosync/%{name}-%{version}.tar.gz
37d86914 20# Source0-md5: dc5152e6dfdb4638ab544e587884483a
baa29f3f
JK
21Source1: %{name}.init
22Source2: %{name}-notifyd.init
23Source3: %{name}-notifyd.sysconfig
37d86914
JK
24Patch0: %{name}-lib_deps.patch
25Patch1: %{name}-install.patch
a0c966cc 26Patch2: %{name}-notifyd_service.patch
ab0d79a4 27URL: http://www.corosync.org/
a1f7a440 28BuildRequires: autoconf >= 2.61
ab0d79a4 29BuildRequires: automake
4169d0ae 30%{?with_dbus:BuildRequires: dbus-devel}
2805ff24 31%{?with_apidocs:BuildRequires: doxygen}
5a02a01c 32BuildRequires: libqb-devel
37d86914 33%{?with_monitoring:BuildRequires: libstatgrab-devel}
2805ff24
JB
34%if %{with rdma}
35BuildRequires: libibverbs-devel
36BuildRequires: librdmacm-devel
833a6419 37BuildRequires: libtool
2805ff24 38%endif
5a02a01c 39%{?with_xmlconf:BuildRequires: libxslt}
4169d0ae 40%{?with_snmp:BuildRequires: net-snmp-devel}
40252af1 41BuildRequires: nss-devel
9d8c645a 42BuildRequires: pkgconfig
833a6419
JK
43BuildRequires: rpmbuild(macros)
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
4169d0ae
JB
101%package -n mibs-corosync
102Summary: Corosync SNMP MIB data
103Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
104Group: Applications/System
105Requires: mibs-dirs
106
107%description -n mibs-corosync
108Corosync SNMP MIB data.
109
110%description -n mibs-corosync -l pl.UTF-8
111Dane SNMP MIB dla Corosync.
112
5a02a01c
JK
113%package -n corosync-testagents
114Summary: The Corosync Cluster Engine Test Agents
115Group: Development/Libraries
116Requires: %{name} = %{version}-%{release}
117
118%description -n corosync-testagents
119This package contains corosync test agents.
120
ab0d79a4 121%prep
122%setup -q
bc47be90 123%patch0 -p1
5a02a01c 124%patch1 -p1
a0c966cc 125%patch2 -p1
ab0d79a4 126
127%build
37d86914 128%{__libtoolize}
ab0d79a4 129%{__aclocal}
130%{__autoconf}
a1f7a440 131%{__autoheader}
ab0d79a4 132%{__automake}
ab0d79a4 133%configure \
5a02a01c
JK
134 %{?with_testagents:--enable-testagents} \
135 %{?with_watchdog:--enable-watchdog} \
136 %{?with_monitoring:--enable-monitoring} \
137 %{?with_xmlconf:--enable-xmlconf} \
4169d0ae 138 %{?with_dbus:--enable-dbus} \
2805ff24 139 %{?with_rdma:--enable-rdma} \
4169d0ae 140 %{?with_snmp:--enable-snmp} \
5a02a01c
JK
141 --enable-systemd \
142 --with-systemddir=%{systemdunitdir} \
143 --with-initddir=/etc/rc.d/init.d
ab0d79a4 144
145%{__make}
146
147%{?with_apidocs:%{__make} doxygen}
a1e347d6 148
ab0d79a4 149%install
150rm -rf $RPM_BUILD_ROOT
baa29f3f 151install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
a1f7a440 152
ab0d79a4 153%{__make} install \
154 DESTDIR=$RPM_BUILD_ROOT
ab0d79a4 155
a1e347d6 156%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
a1f7a440
JB
157
158sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
159 >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
4169d0ae 160%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
ab0d79a4 161
37d86914
JK
162install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
163install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
164install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
165
ab0d79a4 166%clean
167rm -rf $RPM_BUILD_ROOT
168
5a02a01c 169%post
baa29f3f
JK
170/sbin/chkconfig --add %{name}
171/sbin/chkconfig --add %{name}-notifyd
172%service %{name} restart
173%service %{name}-notifyd restart
174%systemd_post %{name}.service
175%systemd_post %{name}-notifyd.service
5a02a01c
JK
176
177%preun
178if [ "$1" = "0" ]; then
baa29f3f
JK
179 %service -q %{name} stop
180 /sbin/chkconfig --del %{name}
181 %service -q %{name}-notifyd stop
182 /sbin/chkconfig --del %{name}-notifyd
5a02a01c 183fi
baa29f3f
JK
184%systemd_preun %{name}.service
185%systemd_preun %{name}-notifyd.service
5a02a01c
JK
186
187%postun
188%systemd_reload
189
364ac3e0 190%post libs -p /sbin/ldconfig
191%postun libs -p /sbin/ldconfig
192
ab0d79a4 193%files
194%defattr(644,root,root,755)
5a02a01c
JK
195%doc AUTHORS ChangeLog LICENSE README.recovery SECURITY TODO conf/corosync.conf.example*
196%if %{with xmlconf}
197%doc conf/corosync.xml.example*
198%endif
a1f7a440 199%attr(754,root,root) /etc/rc.d/init.d/corosync
4169d0ae 200%attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
baa29f3f 201%verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
ab0d79a4 202%dir %{_sysconfdir}/corosync
5a02a01c
JK
203%{systemdunitdir}/corosync.service
204%{systemdunitdir}/corosync-notifyd.service
ab0d79a4 205%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
e7c18d27 206%attr(755,root,root) %{_bindir}/corosync-blackbox
ab0d79a4 207%attr(755,root,root) %{_sbindir}/corosync
208%attr(755,root,root) %{_sbindir}/corosync-cfgtool
5a02a01c 209%attr(755,root,root) %{_sbindir}/corosync-cmapctl
a1f7a440 210%attr(755,root,root) %{_sbindir}/corosync-cpgtool
ab0d79a4 211%attr(755,root,root) %{_sbindir}/corosync-keygen
4169d0ae 212%attr(755,root,root) %{_sbindir}/corosync-notifyd
40252af1 213%attr(755,root,root) %{_sbindir}/corosync-quorumtool
a1f7a440
JB
214%{_mandir}/man5/corosync.conf.5*
215%{_mandir}/man8/corosync.8*
216%{_mandir}/man8/corosync-blackbox.8*
5a02a01c 217%{_mandir}/man8/corosync-cmapctl.8*
a1f7a440
JB
218%{_mandir}/man8/corosync-cfgtool.8*
219%{_mandir}/man8/corosync-cpgtool.8*
a1f7a440 220%{_mandir}/man8/corosync-keygen.8*
4169d0ae 221%{_mandir}/man8/corosync-notifyd.8*
a1f7a440 222%{_mandir}/man8/corosync-quorumtool.8*
025a2098
JK
223%{_mandir}/man5/votequorum.5*
224# should be man7...
225%{_mandir}/man8/cmap_keys.8*
226%{_mandir}/man8/cmap_overview.8*
227%{_mandir}/man8/corosync_overview.8*
228%{_mandir}/man8/cpg_overview.8*
229%{_mandir}/man8/sam_overview.8*
230%{_mandir}/man8/votequorum_overview.8*
231%{_mandir}/man8/quorum_overview.8*
30055d52
JK
232%dir %{_datadir}/corosync
233%attr(755,root,root) %{_datadir}/%{name}/corosync
234%attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
5a02a01c
JK
235%if %{with xmlconf}
236%attr(755,root,root) %{_bindir}/corosync-xmlproc
237%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
5a02a01c 238%dir %{_datadir}/corosync/xml2conf.xsl
5a02a01c
JK
239%{_mandir}/man8/corosync-xmlproc.8*
240%{_mandir}/man5/corosync.xml.5*
241%endif
242%if %{with dbus}
243/etc/dbus-1/system.d/corosync-signals.conf
244%endif
60ed1713 245/var/lib/corosync
ab0d79a4 246
247%files libs
248%defattr(644,root,root,755)
5a02a01c
JK
249%attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
250%attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
251%attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
252%attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
253%attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
254%attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
ab0d79a4 255%attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
256%attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
1c7457c7 257%attr(755,root,root) %{_libdir}/libsam.so.4.*.*
258%attr(755,root,root) %ghost %{_libdir}/libsam.so.4
5a02a01c
JK
259%attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
260%attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
261%attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
262%attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
37d86914
JK
263%attr(755,root,root) %{_libdir}/libvotequorum.so.6.*.*
264%attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.6
ab0d79a4 265
266%files devel
267%defattr(644,root,root,755)
cab13e1f 268%{?with_apidocs:%doc doc/api/html/*}
a1f7a440 269%attr(755,root,root) %{_libdir}/libcfg.so
5a02a01c
JK
270%attr(755,root,root) %{_libdir}/libcmap.so
271%attr(755,root,root) %{_libdir}/libcorosync_common.so
a1f7a440 272%attr(755,root,root) %{_libdir}/libcpg.so
a1f7a440
JB
273%attr(755,root,root) %{_libdir}/libsam.so
274%attr(755,root,root) %{_libdir}/libquorum.so
275%attr(755,root,root) %{_libdir}/libtotem_pg.so
276%attr(755,root,root) %{_libdir}/libvotequorum.so
ab0d79a4 277%{_includedir}/corosync
a1f7a440
JB
278%{_pkgconfigdir}/corosync.pc
279%{_pkgconfigdir}/libcfg.pc
5a02a01c
JK
280%{_pkgconfigdir}/libcmap.pc
281%{_pkgconfigdir}/libcorosync_common.pc
a1f7a440 282%{_pkgconfigdir}/libcpg.pc
a1f7a440
JB
283%{_pkgconfigdir}/libquorum.pc
284%{_pkgconfigdir}/libsam.pc
285%{_pkgconfigdir}/libtotem_pg.pc
286%{_pkgconfigdir}/libvotequorum.pc
5a02a01c 287%{_mandir}/man3/cmap_*.3*
a1f7a440 288%{_mandir}/man3/cpg_*.3*
5a02a01c 289%{_mandir}/man3/quorum_*.3*
a1f7a440
JB
290%{_mandir}/man3/sam_*.3*
291%{_mandir}/man3/votequorum_*.3*
025a2098 292
ab0d79a4 293%files static
294%defattr(644,root,root,755)
295%{_libdir}/libcfg.a
5a02a01c
JK
296%{_libdir}/libcmap.a
297%{_libdir}/libcorosync_common.a
ab0d79a4 298%{_libdir}/libcpg.a
1c7457c7 299%{_libdir}/libsam.a
ab0d79a4 300%{_libdir}/libquorum.a
301%{_libdir}/libtotem_pg.a
302%{_libdir}/libvotequorum.a
4169d0ae
JB
303
304%if %{with snmp}
305%files -n mibs-corosync
306%defattr(644,root,root,755)
307%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
308%endif
5a02a01c
JK
309
310%if %{with testagents}
311%files -n corosync-testagents
312%defattr(644,root,root,755)
313%{_datadir}/corosync/tests/mem_leak_test.sh
314%{_datadir}/corosync/tests/net_breaker.sh
315%{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
316%{_datadir}/corosync/tests/shm_leak_audit.sh
317%attr(755,root,root) %{_bindir}/cpg_test_agent
318%attr(755,root,root) %{_bindir}/sam_test_agent
319%attr(755,root,root) %{_bindir}/votequorum_test_agent
320%endif
This page took 0.117835 seconds and 4 git commands to generate.