6 # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7 # to disable or enable specific features
10 %bcond_with monitoring
17 %bcond_with runautogen
19 %global gitver
%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
20 %global gittarver
%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
23 Summary: The Corosync Cluster Engine and Application Programming Interfaces
25 Release: 1%{?gitver}%{?dist}
27 Group: System Environment
/Base
28 URL: http
://www.corosync.org
/
29 Source0: https
://github.com
/downloads
/corosync
/corosync
/%{name}-%{version}%{?gittarver}.tar.gz
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
41 BuildRequires
: libqb
-devel
42 BuildRequires
: nss
-devel
43 %if %{with runautogen}
44 BuildRequires
: autoconf automake libtool
46 %if %{with monitoring}
47 BuildRequires
: libstatgrab
-devel
50 BuildRequires
: libibverbs
-devel librdmacm
-devel
53 BuildRequires
: net
-snmp
-devel
56 BuildRequires
: dbus
-devel
59 BuildRequires
: systemd
-units
60 Requires(post
): systemd
61 Requires(preun
): systemd
62 Requires(postun
): systemd
68 BuildRoot: %
(mktemp
-ud
%{_tmppath}/%{name}-%{version}-%{release}-XXXXXX
)
71 %setup -q
-n
%{name}-%{version}%{?gittarver}
74 %if %{with runautogen}
79 export ibverbs_CFLAGS
=-I
/usr
/include
/infiniband \
80 export ibverbs_LIBS
=-libverbs \
81 export rdmacm_CFLAGS
=-I
/usr
/include
/rdma \
82 export rdmacm_LIBS
=-lrdmacm \
85 %if %{with testagents}
91 %if %{with monitoring}
112 --with
-initddir
=%{_initrddir} \
113 --with
-systemddir
=%{_unitdir} \
114 --with
-upstartdir
=%{_sysconfdir}/init
121 make install DESTDIR
=%{buildroot}
124 mkdir -p
-m
0700 %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
125 install -m
644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
130 rm -f
%{buildroot}%{_libdir}/*.a
131 rm -f
%{buildroot}%{_libdir}/*.la
132 # drop docs and html docs for now
133 rm -rf
%{buildroot}%{_docdir}/*
134 # /etc/sysconfig/corosync-notifyd
135 mkdir -p
%{buildroot}%{_sysconfdir}/sysconfig
136 install -m
644 tools
/corosync
-notifyd.sysconfig.example \
137 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
-notifyd
138 # /etc/sysconfig/corosync
139 install -m
644 init
/corosync.sysconfig.example \
140 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
146 This package contains the Corosync Cluster Engine Executive
, several default
147 APIs and libraries
, default configuration files
, and an init script.
150 %if %{with systemd} && 0%{?systemd_post:1}
151 %systemd_post corosync.service
153 if [ $
1 -eq
1 ]; then
154 /sbin
/chkconfig
--add corosync ||
:
159 %if %{with systemd} && 0%{?systemd_preun:1}
160 %systemd_preun corosync.service
162 if [ $
1 -eq
0 ]; then
163 /sbin
/service corosync stop
&>/dev
/null ||
:
164 /sbin
/chkconfig
--del corosync ||
:
169 %if %{with systemd} && 0%{?systemd_postun:1}
174 %defattr(-,root
,root
,-)
175 %doc LICENSE SECURITY
177 %{_sbindir}/corosync
-keygen
178 %{_sbindir}/corosync
-cmapctl
179 %{_sbindir}/corosync
-cfgtool
180 %{_sbindir}/corosync
-cpgtool
181 %{_sbindir}/corosync
-quorumtool
182 %{_sbindir}/corosync
-notifyd
183 %{_bindir}/corosync
-blackbox
185 %{_bindir}/corosync
-xmlproc
186 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.xml.example
187 %dir %{_datadir}/corosync
188 %{_datadir}/corosync
/xml2conf.xsl
189 %{_mandir}/man8
/corosync
-xmlproc
.8*
190 %{_mandir}/man5
/corosync.xml
.5*
192 %dir %{_sysconfdir}/corosync
193 %dir %{_sysconfdir}/corosync
/uidgid.d
194 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example
195 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example.udpu
196 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
-notifyd
197 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
199 %{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
202 %{_datadir}/snmp
/mibs
/COROSYNC
-MIB.txt
205 %{_unitdir}/corosync.service
206 %{_unitdir}/corosync
-notifyd.service
207 %dir %{_datadir}/corosync
208 %{_datadir}/corosync
/corosync
209 %{_datadir}/corosync
/corosync
-notifyd
211 %{_initrddir}/corosync
212 %{_initrddir}/corosync
-notifyd
215 %{_sysconfdir}/init
/corosync.conf
216 %{_sysconfdir}/init
/corosync
-notifyd.conf
218 %dir %{_localstatedir}/lib
/corosync
219 %dir %{_localstatedir}/log
/cluster
220 %{_mandir}/man8
/corosync_overview
.8*
221 %{_mandir}/man8
/corosync
.8*
222 %{_mandir}/man8
/corosync
-blackbox
.8*
223 %{_mandir}/man8
/corosync
-cmapctl
.8*
224 %{_mandir}/man8
/corosync
-keygen
.8*
225 %{_mandir}/man8
/corosync
-cfgtool
.8*
226 %{_mandir}/man8
/corosync
-cpgtool
.8*
227 %{_mandir}/man8
/corosync
-notifyd
.8*
228 %{_mandir}/man8
/corosync
-quorumtool
.8*
229 %{_mandir}/man5
/corosync.conf
.5*
230 %{_mandir}/man5
/votequorum
.5*
231 %{_mandir}/man8
/cmap_keys
.8*
233 # optional testagent rpm
235 %if %{with testagents}
237 %package -n corosync
-testagents
238 Summary: The Corosync Cluster Engine Test Agents
239 Group: Development
/Libraries
240 Requires: %{name} = %{version}-%{release}
242 %description -n corosync
-testagents
243 This package contains corosync
test agents.
245 %files -n corosync
-testagents
246 %defattr(755,root
,root
,-)
247 %{_datadir}/corosync
/tests
/mem_leak_test.sh
248 %{_datadir}/corosync
/tests
/net_breaker.sh
249 %{_datadir}/corosync
/tests
/cmap
-dispatch
-deadlock.sh
250 %{_datadir}/corosync
/tests
/shm_leak_audit.sh
251 %{_bindir}/cpg_test_agent
252 %{_bindir}/sam_test_agent
253 %{_bindir}/votequorum_test_agent
259 %package -n corosynclib
260 Summary: The Corosync Cluster Engine Libraries
261 Group: System Environment
/Libraries
262 Requires: %{name} = %{version}-%{release}
264 %description -n corosynclib
265 This package contains corosync libraries.
267 %files -n corosynclib
268 %defattr(-,root
,root
,-)
270 %{_libdir}/libcfg.so.
*
271 %{_libdir}/libcpg.so.
*
272 %{_libdir}/libcmap.so.
*
273 %{_libdir}/libtotem_pg.so.
*
274 %{_libdir}/libquorum.so.
*
275 %{_libdir}/libvotequorum.so.
*
276 %{_libdir}/libsam.so.
*
277 %{_libdir}/libcorosync_common.so.
*
279 %post -n corosynclib
-p
/sbin
/ldconfig
281 %postun -n corosynclib
-p
/sbin
/ldconfig
283 %package -n corosynclib
-devel
284 Summary: The Corosync Cluster Engine Development Kit
285 Group: Development
/Libraries
286 Requires: corosynclib
= %{version}-%{release}
288 Provides: corosync
-devel
= %{version}
289 Obsoletes
: corosync
-devel
< 0.92-7
291 %description -n corosynclib
-devel
292 This package contains include files and man pages used to develop using
293 The Corosync Cluster Engine APIs.
295 %files -n corosynclib
-devel
296 %defattr(-,root
,root
,-)
298 %dir %{_includedir}/corosync
/
299 %{_includedir}/corosync
/corodefs.h
300 %{_includedir}/corosync
/cfg.h
301 %{_includedir}/corosync
/cmap.h
302 %{_includedir}/corosync
/corotypes.h
303 %{_includedir}/corosync
/cpg.h
304 %{_includedir}/corosync
/hdb.h
305 %{_includedir}/corosync
/sam.h
306 %{_includedir}/corosync
/quorum.h
307 %{_includedir}/corosync
/votequorum.h
308 %dir %{_includedir}/corosync
/totem
/
309 %{_includedir}/corosync
/totem
/totem.h
310 %{_includedir}/corosync
/totem
/totemip.h
311 %{_includedir}/corosync
/totem
/totempg.h
314 %{_libdir}/libcmap.so
315 %{_libdir}/libtotem_pg.so
316 %{_libdir}/libquorum.so
317 %{_libdir}/libvotequorum.so
319 %{_libdir}/libcorosync_common.so
320 %{_libdir}/pkgconfig
/*.pc
321 %{_mandir}/man3
/cpg_
*3*
322 %{_mandir}/man3
/quorum_
*3*
323 %{_mandir}/man3
/votequorum_
*3*
324 %{_mandir}/man3
/sam_
*3*
325 %{_mandir}/man8
/cpg_overview
.8*
326 %{_mandir}/man8
/votequorum_overview
.8*
327 %{_mandir}/man8
/sam_overview
.8*
328 %{_mandir}/man3
/cmap_
*3*
329 %{_mandir}/man8
/cmap_overview
.8*
330 %{_mandir}/man8
/quorum_overview
.8*
333 * @date@ Autotools generated version
<nobody@nowhere.org
> - @version@
-1-@numcomm@.@alphatag@.@dirty@
334 - Autotools generated version