]> git.proxmox.com Git - mirror_corosync.git/blame - corosync.spec.in
Remove info pages see also from cmapctl man
[mirror_corosync.git] / corosync.spec.in
CommitLineData
47b9e296 1%global alphatag @alphatag@
b2400314
FDN
2%global numcomm @numcomm@
3%global dirty @dirty@
85fb6472
AS
4
5# Conditionals
6# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7# to disable or enable specific features
8%bcond_with testagents
07d06c0c
AS
9%bcond_with watchdog
10%bcond_with monitoring
2a568d6e
AS
11%bcond_with snmp
12%bcond_with dbus
051bca82 13%bcond_with rdma
6fa114ac 14%bcond_with systemd
cdff97a0 15%bcond_with xmlconf
85fb6472 16
b5fc4494
FDN
17Name: corosync
18Summary: The Corosync Cluster Engine and Application Programming Interfaces
19Version: @version@
b2400314 20Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
b5fc4494
FDN
21License: BSD
22Group: System Environment/Base
f103fb29
JF
23URL: http://ftp.corosync.org
24Source0: ftp://ftp:user@ftp.corosync.org/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
b5fc4494
FDN
25
26# Runtime bits
27Requires: corosynclib = %{version}-%{release}
28Requires(pre): /usr/sbin/useradd
29Requires(post): /sbin/chkconfig
30Requires(preun): /sbin/chkconfig
31Conflicts: openais <= 0.89, openais-devel <= 0.89
32
47b9e296
FDN
33# Build bits
34
8c3680d1
SD
35%define buildtrunk 0
36%{?_with_buildtrunk: %define buildtrunk 1}
37
c505993e 38BuildRequires: libqb-devel
8cdd2fc4 39BuildRequires: nss-devel
8c3680d1 40%if %{buildtrunk}
b5fc4494 41BuildRequires: autoconf automake
8c3680d1 42%endif
17fb819a 43%if %{with rdma}
15f3bc84 44BuildRequires: libibverbs-devel librdmacm-devel
17fb819a 45%endif
2a568d6e
AS
46%if %{with snmp}
47BuildRequires: net-snmp-devel
48%endif
49%if %{with dbus}
50BuildRequires: dbus-devel
51%endif
6fa114ac
AS
52%if %{with systemd}
53BuildRequires: systemd-units
54%endif
23b93ccb
SD
55%if %{with xmlconf}
56Requires: libxslt
57%endif
b5fc4494
FDN
58
59BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
60
61%prep
b2400314 62%setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
b5fc4494 63
583eb6ae 64%build
8c3680d1 65%if %{buildtrunk}
b5fc4494 66./autogen.sh
8c3680d1 67%endif
b5fc4494 68
e715a455 69%if %{with rdma}
15f3bc84
FDN
70export ibverbs_CFLAGS=-I/usr/include/infiniband \
71export ibverbs_LIBS=-libverbs \
72export rdmacm_CFLAGS=-I/usr/include/rdma \
73export rdmacm_LIBS=-lrdmacm \
e715a455 74%endif
15f3bc84 75%{configure} \
85fb6472 76%if %{with testagents}
45fc3a51 77 --enable-testagents \
07d06c0c
AS
78%endif
79%if %{with watchdog}
80 --enable-watchdog \
81%endif
82%if %{with monitoring}
83 --enable-monitoring \
2a568d6e
AS
84%endif
85%if %{with snmp}
86 --enable-snmp \
87%endif
88%if %{with dbus}
89 --enable-dbus \
85fb6472 90%endif
17fb819a 91%if %{with rdma}
dac5df7d 92 --enable-rdma \
6fa114ac
AS
93%endif
94%if %{with systemd}
95 --enable-systemd \
61b2a85e
JF
96%endif
97%if %{with xmlconf}
98 --enable-xmlconf \
17fb819a 99%endif
6bae61d8 100 --with-initddir=%{_initrddir}
b5fc4494 101
b5fc4494
FDN
102make %{_smp_mflags}
103
104%install
105rm -rf %{buildroot}
106
107make install DESTDIR=%{buildroot}
b5fc4494 108
2d75c705
JF
109%if %{with dbus}
110mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
111install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
112%endif
113
b5fc4494
FDN
114## tree fixup
115# drop static libs
116rm -f %{buildroot}%{_libdir}/*.a
117# drop docs and html docs for now
118rm -rf %{buildroot}%{_docdir}/*
119
120%clean
121rm -rf %{buildroot}
122
6aad39be 123%description
b5fc4494
FDN
124This package contains the Corosync Cluster Engine Executive, several default
125APIs and libraries, default configuration files, and an init script.
126
127%post
583eb6ae
SD
128if [ $1 -eq 1 ]; then
129 /sbin/chkconfig --add corosync || :
130fi
b5fc4494
FDN
131
132%preun
133if [ $1 -eq 0 ]; then
134 /sbin/service corosync stop &>/dev/null || :
135 /sbin/chkconfig --del corosync || :
136fi
137
6aad39be 138%files
b5fc4494
FDN
139%defattr(-,root,root,-)
140%doc LICENSE SECURITY
141%{_sbindir}/corosync
142%{_sbindir}/corosync-keygen
4f04735f 143%{_sbindir}/corosync-cmapctl
b5fc4494
FDN
144%{_sbindir}/corosync-cfgtool
145%{_sbindir}/corosync-fplay
15f3bc84
FDN
146%{_sbindir}/corosync-cpgtool
147%{_sbindir}/corosync-quorumtool
2a568d6e 148%{_sbindir}/corosync-notifyd
45fc3a51 149%{_bindir}/corosync-blackbox
4f04735f
SD
150%if %{with xmlconf}
151%{_bindir}/corosync-xmlproc
ab9986cb
FDN
152%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
153%dir %{_datadir}/corosync
154%dir %{_datadir}/corosync/xml2conf.xsl
155%{_mandir}/man8/corosync-xmlproc.8*
156%{_mandir}/man5/corosync.xml.5*
4f04735f 157%endif
b446d4e9
FDN
158%dir %{_sysconfdir}/corosync
159%dir %{_sysconfdir}/corosync/uidgid.d
160%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
bb05aed9 161%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
2a568d6e
AS
162%if %{with dbus}
163%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
164%endif
165%if %{with snmp}
a197e7b1 166%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
2a568d6e 167%endif
6fa114ac
AS
168%if %{with systemd}
169%{_unitdir}/corosync.service
170%{_unitdir}/corosync-notifyd.service
171%else
6bae61d8 172%{_initrddir}/corosync
2a568d6e 173%{_initrddir}/corosync-notifyd
6fa114ac 174%endif
b446d4e9 175%dir %{_localstatedir}/lib/corosync
60f13c03 176%dir %{_localstatedir}/log/cluster
b5fc4494 177%{_mandir}/man8/corosync_overview.8*
824467e6
AS
178%{_mandir}/man8/corosync.8*
179%{_mandir}/man8/corosync-blackbox.8*
a516a1f9 180%{_mandir}/man8/corosync-cmapctl.8*
52632075 181%{_mandir}/man8/corosync-keygen.8*
de317d57 182%{_mandir}/man8/corosync-cfgtool.8*
b7ed8064 183%{_mandir}/man8/corosync-cpgtool.8*
54fe60a6 184%{_mandir}/man8/corosync-fplay.8*
2a568d6e 185%{_mandir}/man8/corosync-notifyd.8*
d655a79c 186%{_mandir}/man8/corosync-quorumtool.8*
b5fc4494 187%{_mandir}/man5/corosync.conf.5*
284ca618 188%{_mandir}/man5/votequorum.5*
de47f124 189%{_mandir}/man8/cmap_keys.8*
b5fc4494 190
85fb6472
AS
191# optional testagent rpm
192#
193%if %{with testagents}
194
195%package -n corosync-testagents
196Summary: The Corosync Cluster Engine Test Agents
197Group: Development/Libraries
198Requires: %{name} = %{version}-%{release}
199
200%description -n corosync-testagents
201This package contains corosync test agents.
202
203%files -n corosync-testagents
204%defattr(755,root,root,-)
205%{_datadir}/corosync/tests/mem_leak_test.sh
206%{_datadir}/corosync/tests/net_breaker.sh
2678f0a0
AS
207%{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
208%{_datadir}/corosync/tests/shm_leak_audit.sh
85fb6472 209%{_bindir}/cpg_test_agent
1cdad310
AS
210%{_bindir}/sam_test_agent
211%{_bindir}/votequorum_test_agent
85fb6472
AS
212
213%endif
214
215# library
216#
b5fc4494
FDN
217%package -n corosynclib
218Summary: The Corosync Cluster Engine Libraries
219Group: System Environment/Libraries
47b9e296 220Requires: %{name} = %{version}-%{release}
b5fc4494
FDN
221
222%description -n corosynclib
223This package contains corosync libraries.
224
225%files -n corosynclib
226%defattr(-,root,root,-)
227%doc LICENSE
228%{_libdir}/libcfg.so.*
229%{_libdir}/libcpg.so.*
7c250a51 230%{_libdir}/libcmap.so.*
b5fc4494 231%{_libdir}/libtotem_pg.so.*
b5fc4494
FDN
232%{_libdir}/libquorum.so.*
233%{_libdir}/libvotequorum.so.*
47ae82b0 234%{_libdir}/libsam.so.*
40727bd6 235%{_libdir}/libcorosync_common.so.*
b5fc4494
FDN
236
237%post -n corosynclib -p /sbin/ldconfig
238
239%postun -n corosynclib -p /sbin/ldconfig
240
241%package -n corosynclib-devel
242Summary: The Corosync Cluster Engine Development Kit
243Group: Development/Libraries
244Requires: corosynclib = %{version}-%{release}
245Requires: pkgconfig
246Provides: corosync-devel = %{version}
247Obsoletes: corosync-devel < 0.92-7
248
249%description -n corosynclib-devel
250This package contains include files and man pages used to develop using
251The Corosync Cluster Engine APIs.
252
253%files -n corosynclib-devel
254%defattr(-,root,root,-)
bf3a0ad5 255%doc LICENSE
b5fc4494 256%dir %{_includedir}/corosync/
b5fc4494 257%{_includedir}/corosync/corodefs.h
b5fc4494 258%{_includedir}/corosync/cfg.h
7c250a51 259%{_includedir}/corosync/cmap.h
b5fc4494
FDN
260%{_includedir}/corosync/corotypes.h
261%{_includedir}/corosync/cpg.h
b5fc4494 262%{_includedir}/corosync/hdb.h
47ae82b0 263%{_includedir}/corosync/sam.h
b5fc4494
FDN
264%{_includedir}/corosync/quorum.h
265%{_includedir}/corosync/votequorum.h
266%dir %{_includedir}/corosync/totem/
b5fc4494
FDN
267%{_includedir}/corosync/totem/totem.h
268%{_includedir}/corosync/totem/totemip.h
269%{_includedir}/corosync/totem/totempg.h
b5fc4494
FDN
270%{_libdir}/libcfg.so
271%{_libdir}/libcpg.so
7c250a51 272%{_libdir}/libcmap.so
b5fc4494 273%{_libdir}/libtotem_pg.so
b5fc4494
FDN
274%{_libdir}/libquorum.so
275%{_libdir}/libvotequorum.so
47ae82b0 276%{_libdir}/libsam.so
40727bd6 277%{_libdir}/libcorosync_common.so
b5fc4494
FDN
278%{_libdir}/pkgconfig/*.pc
279%{_mandir}/man3/cpg_*3*
601684d2 280%{_mandir}/man3/quorum_*3*
b5fc4494 281%{_mandir}/man3/votequorum_*3*
47ae82b0 282%{_mandir}/man3/sam_*3*
b5fc4494 283%{_mandir}/man8/cpg_overview.8*
b5fc4494 284%{_mandir}/man8/votequorum_overview.8*
47ae82b0 285%{_mandir}/man8/sam_overview.8*
c21f9573
JF
286%{_mandir}/man3/cmap_*3*
287%{_mandir}/man8/cmap_overview.8*
69cb3e69 288%{_mandir}/man8/quorum_overview.8*
b5fc4494
FDN
289
290%changelog
b2400314 291* @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
b5fc4494 292- Autotools generated version