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