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