]> git.proxmox.com Git - mirror_corosync.git/blame - corosync.spec.in
config: Don't free pointers used by transports
[mirror_corosync.git] / corosync.spec.in
CommitLineData
ae96f61a
FDN
1@ALPHATAG@
2@NUMCOMM@
3@DIRTY@
85fb6472
AS
4
5# Conditionals
6# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7# to disable or enable specific features
07d06c0c
AS
8%bcond_with watchdog
9%bcond_with monitoring
2a568d6e
AS
10%bcond_with snmp
11%bcond_with dbus
6fa114ac 12%bcond_with systemd
cdff97a0 13%bcond_with xmlconf
83dc407f 14%bcond_with nozzle
c3d69712 15%bcond_with vqsim
5da3fe9f 16%bcond_with runautogen
5cced85c 17%bcond_with userflags
85fb6472 18
8f766dd7
FDN
19%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
20%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
21
b5fc4494
FDN
22Name: corosync
23Summary: The Corosync Cluster Engine and Application Programming Interfaces
24Version: @version@
8f766dd7 25Release: 1%{?gitver}%{?dist}
b5fc4494 26License: BSD
c6c15ebc 27URL: http://corosync.github.io/corosync/
41995454 28Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz
b5fc4494
FDN
29
30# Runtime bits
c91c4825 31# The automatic dependency overridden in favor of explicit version lock
c8c257ee 32Requires: corosynclib%{?_isa} = %{version}-%{release}
b5fc4494 33
47b9e296 34# Build bits
afdc4055 35BuildRequires: gcc
47b9e296 36
6f784804
FDN
37%if 0%{?suse_version}
38BuildRequires: groff-full
39%else
e3ff3e2a 40BuildRequires: groff
6f784804 41%endif
c505993e 42BuildRequires: libqb-devel
76591baa 43BuildRequires: libknet1-devel
8cc8e513 44BuildRequires: zlib-devel
5da3fe9f
JF
45%if %{with runautogen}
46BuildRequires: autoconf automake libtool
8c3680d1 47%endif
5c5db34e
FDN
48%if %{with monitoring}
49BuildRequires: libstatgrab-devel
50%endif
2a568d6e
AS
51%if %{with snmp}
52BuildRequires: net-snmp-devel
53%endif
54%if %{with dbus}
6f784804
FDN
55%if 0%{?suse_version}
56BuildRequires: dbus-1-devel
57%else
58BuildRequires: dbus-devel
59%endif
2a568d6e 60%endif
83dc407f
JF
61%if %{with nozzle}
62BuildRequires: libnozzle1-devel
63%endif
6fa114ac 64%if %{with systemd}
eec4d710
JF
65%{?systemd_requires}
66BuildRequires: systemd
db541f56 67BuildRequires: systemd-devel
eec4d710
JF
68%else
69Requires(post): /sbin/chkconfig
70Requires(preun): /sbin/chkconfig
6fa114ac 71%endif
23b93ccb
SD
72%if %{with xmlconf}
73Requires: libxslt
74%endif
c3d69712
CC
75%if %{with vqsim}
76BuildRequires: readline-devel
77%endif
b5fc4494 78
b5fc4494 79%prep
8f766dd7 80%setup -q -n %{name}-%{version}%{?gittarver}
b5fc4494 81
583eb6ae 82%build
5da3fe9f 83%if %{with runautogen}
b5fc4494 84./autogen.sh
8c3680d1 85%endif
b5fc4494 86
15f3bc84 87%{configure} \
07d06c0c
AS
88%if %{with watchdog}
89 --enable-watchdog \
90%endif
91%if %{with monitoring}
92 --enable-monitoring \
2a568d6e
AS
93%endif
94%if %{with snmp}
95 --enable-snmp \
96%endif
97%if %{with dbus}
98 --enable-dbus \
85fb6472 99%endif
6fa114ac
AS
100%if %{with systemd}
101 --enable-systemd \
61b2a85e
JF
102%endif
103%if %{with xmlconf}
104 --enable-xmlconf \
83dc407f
JF
105%endif
106%if %{with nozzle}
107 --enable-nozzle \
c3d69712
CC
108%endif
109%if %{with vqsim}
110 --enable-vqsim \
5cced85c
JF
111%endif
112%if %{with userflags}
113 --enable-user-flags \
17fb819a 114%endif
769a69e4 115 --with-initddir=%{_initrddir} \
30c7f331
FDN
116 --with-systemddir=%{_unitdir} \
117 --docdir=%{_docdir}
b5fc4494 118
b5fc4494
FDN
119make %{_smp_mflags}
120
121%install
b5fc4494 122make install DESTDIR=%{buildroot}
b5fc4494 123
2d75c705
JF
124%if %{with dbus}
125mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
8f766dd7 126install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
2d75c705
JF
127%endif
128
b5fc4494
FDN
129## tree fixup
130# drop static libs
131rm -f %{buildroot}%{_libdir}/*.a
2156ae60 132rm -f %{buildroot}%{_libdir}/*.la
b5fc4494
FDN
133# drop docs and html docs for now
134rm -rf %{buildroot}%{_docdir}/*
03f05b58
JF
135# /etc/sysconfig/corosync-notifyd
136mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
137install -m 644 tools/corosync-notifyd.sysconfig.example \
138 %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
1f7e78ab
JF
139# /etc/sysconfig/corosync
140install -m 644 init/corosync.sysconfig.example \
141 %{buildroot}%{_sysconfdir}/sysconfig/corosync
b5fc4494 142
6aad39be 143%description
b5fc4494
FDN
144This package contains the Corosync Cluster Engine Executive, several default
145APIs and libraries, default configuration files, and an init script.
146
147%post
61329a78
JF
148%if %{with systemd} && 0%{?systemd_post:1}
149%systemd_post corosync.service
150%else
583eb6ae
SD
151if [ $1 -eq 1 ]; then
152 /sbin/chkconfig --add corosync || :
153fi
61329a78 154%endif
b5fc4494
FDN
155
156%preun
61329a78
JF
157%if %{with systemd} && 0%{?systemd_preun:1}
158%systemd_preun corosync.service
159%else
b5fc4494
FDN
160if [ $1 -eq 0 ]; then
161 /sbin/service corosync stop &>/dev/null || :
162 /sbin/chkconfig --del corosync || :
163fi
61329a78
JF
164%endif
165
166%postun
167%if %{with systemd} && 0%{?systemd_postun:1}
eec4d710 168%systemd_postun corosync.service
61329a78 169%endif
b5fc4494 170
6aad39be 171%files
94dff3b7 172%doc LICENSE
b5fc4494
FDN
173%{_sbindir}/corosync
174%{_sbindir}/corosync-keygen
4f04735f 175%{_sbindir}/corosync-cmapctl
b5fc4494 176%{_sbindir}/corosync-cfgtool
15f3bc84
FDN
177%{_sbindir}/corosync-cpgtool
178%{_sbindir}/corosync-quorumtool
2a568d6e 179%{_sbindir}/corosync-notifyd
45fc3a51 180%{_bindir}/corosync-blackbox
4f04735f
SD
181%if %{with xmlconf}
182%{_bindir}/corosync-xmlproc
ab9986cb 183%dir %{_datadir}/corosync
e5f2ecab 184%{_datadir}/corosync/xml2conf.xsl
ab9986cb
FDN
185%{_mandir}/man8/corosync-xmlproc.8*
186%{_mandir}/man5/corosync.xml.5*
4f04735f 187%endif
b446d4e9
FDN
188%dir %{_sysconfdir}/corosync
189%dir %{_sysconfdir}/corosync/uidgid.d
190%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
03f05b58 191%config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
1f7e78ab 192%config(noreplace) %{_sysconfdir}/sysconfig/corosync
aabbace6 193%config(noreplace) %{_sysconfdir}/logrotate.d/corosync
2a568d6e
AS
194%if %{with dbus}
195%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
196%endif
197%if %{with snmp}
a197e7b1 198%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
2a568d6e 199%endif
6fa114ac
AS
200%if %{with systemd}
201%{_unitdir}/corosync.service
202%{_unitdir}/corosync-notifyd.service
203%else
6bae61d8 204%{_initrddir}/corosync
2a568d6e 205%{_initrddir}/corosync-notifyd
6fa114ac 206%endif
b446d4e9 207%dir %{_localstatedir}/lib/corosync
60f13c03 208%dir %{_localstatedir}/log/cluster
3de869d2 209%{_mandir}/man7/corosync_overview.7*
824467e6
AS
210%{_mandir}/man8/corosync.8*
211%{_mandir}/man8/corosync-blackbox.8*
a516a1f9 212%{_mandir}/man8/corosync-cmapctl.8*
52632075 213%{_mandir}/man8/corosync-keygen.8*
de317d57 214%{_mandir}/man8/corosync-cfgtool.8*
b7ed8064 215%{_mandir}/man8/corosync-cpgtool.8*
2a568d6e 216%{_mandir}/man8/corosync-notifyd.8*
d655a79c 217%{_mandir}/man8/corosync-quorumtool.8*
b5fc4494 218%{_mandir}/man5/corosync.conf.5*
284ca618 219%{_mandir}/man5/votequorum.5*
f1d36307 220%{_mandir}/man7/cmap_keys.7*
b5fc4494 221
85fb6472
AS
222# library
223#
b5fc4494
FDN
224%package -n corosynclib
225Summary: The Corosync Cluster Engine Libraries
b5fc4494
FDN
226
227%description -n corosynclib
228This package contains corosync libraries.
229
230%files -n corosynclib
b5fc4494
FDN
231%doc LICENSE
232%{_libdir}/libcfg.so.*
233%{_libdir}/libcpg.so.*
7c250a51 234%{_libdir}/libcmap.so.*
b5fc4494
FDN
235%{_libdir}/libquorum.so.*
236%{_libdir}/libvotequorum.so.*
47ae82b0 237%{_libdir}/libsam.so.*
40727bd6 238%{_libdir}/libcorosync_common.so.*
b5fc4494
FDN
239
240%post -n corosynclib -p /sbin/ldconfig
241
242%postun -n corosynclib -p /sbin/ldconfig
243
244%package -n corosynclib-devel
245Summary: The Corosync Cluster Engine Development Kit
d1d929a7 246Requires: corosynclib%{?_isa} = %{version}-%{release}
b5fc4494
FDN
247Requires: pkgconfig
248Provides: corosync-devel = %{version}
b5fc4494
FDN
249
250%description -n corosynclib-devel
251This package contains include files and man pages used to develop using
252The Corosync Cluster Engine APIs.
253
254%files -n corosynclib-devel
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
b5fc4494
FDN
266%{_libdir}/libcfg.so
267%{_libdir}/libcpg.so
7c250a51 268%{_libdir}/libcmap.so
b5fc4494
FDN
269%{_libdir}/libquorum.so
270%{_libdir}/libvotequorum.so
47ae82b0 271%{_libdir}/libsam.so
40727bd6 272%{_libdir}/libcorosync_common.so
b5fc4494
FDN
273%{_libdir}/pkgconfig/*.pc
274%{_mandir}/man3/cpg_*3*
601684d2 275%{_mandir}/man3/quorum_*3*
b5fc4494 276%{_mandir}/man3/votequorum_*3*
47ae82b0 277%{_mandir}/man3/sam_*3*
c21f9573 278%{_mandir}/man3/cmap_*3*
b5fc4494 279
c3d69712
CC
280%if %{with vqsim}
281%package -n corosync-vqsim
282Summary: The Corosync Cluster Engine - Votequorum Simulator
283Requires: corosynclib%{?_isa} = %{version}-%{release}
284Requires: pkgconfig
285
286%description -n corosync-vqsim
287A command-line simulator for the corosync votequorum subsystem.
288It uses the same code as the corosync quorum system but forks
289them into subprocesses to simulate nodes.
290Nodes can be added and removed as well as partitioned (to simulate
291network splits)
292
293%files -n corosync-vqsim
294%doc LICENSE
295%{_bindir}/corosync-vqsim
296%{_mandir}/man8/corosync-vqsim.8*
297%endif
298
b5fc4494 299%changelog
b2400314 300* @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
b5fc4494 301- Autotools generated version