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 BuildRequires
: zlib
-devel
44 %if %{with runautogen}
45 BuildRequires
: autoconf automake libtool
47 %if %{with monitoring}
48 BuildRequires
: libstatgrab
-devel
51 BuildRequires
: libibverbs
-devel librdmacm
-devel
54 BuildRequires
: net
-snmp
-devel
57 BuildRequires
: dbus
-devel
60 BuildRequires
: systemd
-units
61 Requires(post
): systemd
62 Requires(preun
): systemd
63 Requires(postun
): systemd
69 BuildRoot: %
(mktemp
-ud
%{_tmppath}/%{name}-%{version}-%{release}-XXXXXX
)
72 %setup -q
-n
%{name}-%{version}%{?gittarver}
75 %if %{with runautogen}
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 \
86 %if %{with testagents}
92 %if %{with monitoring}
113 --with
-initddir
=%{_initrddir} \
114 --with
-systemddir
=%{_unitdir} \
115 --with
-upstartdir
=%{_sysconfdir}/init
122 make install DESTDIR
=%{buildroot}
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
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
147 This package contains the Corosync Cluster Engine Executive
, several default
148 APIs and libraries
, default configuration files
, and an init script.
151 %if %{with systemd} && 0%{?systemd_post:1}
152 %systemd_post corosync.service
154 if [ $
1 -eq
1 ]; then
155 /sbin
/chkconfig
--add corosync ||
:
160 %if %{with systemd} && 0%{?systemd_preun:1}
161 %systemd_preun corosync.service
163 if [ $
1 -eq
0 ]; then
164 /sbin
/service corosync stop
&>/dev
/null ||
:
165 /sbin
/chkconfig
--del corosync ||
:
170 %if %{with systemd} && 0%{?systemd_postun:1}
175 %defattr(-,root
,root
,-)
176 %doc LICENSE SECURITY
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
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*
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
200 %{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
203 %{_datadir}/snmp
/mibs
/COROSYNC
-MIB.txt
206 %{_unitdir}/corosync.service
207 %{_unitdir}/corosync
-notifyd.service
208 %dir %{_datadir}/corosync
209 %{_datadir}/corosync
/corosync
210 %{_datadir}/corosync
/corosync
-notifyd
212 %{_initrddir}/corosync
213 %{_initrddir}/corosync
-notifyd
216 %{_sysconfdir}/init
/corosync.conf
217 %{_sysconfdir}/init
/corosync
-notifyd.conf
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*
234 # optional testagent rpm
236 %if %{with testagents}
238 %package -n corosync
-testagents
239 Summary: The Corosync Cluster Engine Test Agents
240 Group: Development
/Libraries
241 Requires: %{name} = %{version}-%{release}
243 %description -n corosync
-testagents
244 This package contains corosync
test agents.
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
260 %package -n corosynclib
261 Summary: The Corosync Cluster Engine Libraries
262 Group: System Environment
/Libraries
263 Requires: %{name} = %{version}-%{release}
265 %description -n corosynclib
266 This package contains corosync libraries.
268 %files -n corosynclib
269 %defattr(-,root
,root
,-)
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.
*
280 %post -n corosynclib
-p
/sbin
/ldconfig
282 %postun -n corosynclib
-p
/sbin
/ldconfig
284 %package -n corosynclib
-devel
285 Summary: The Corosync Cluster Engine Development Kit
286 Group: Development
/Libraries
287 Requires: corosynclib
= %{version}-%{release}
289 Provides: corosync
-devel
= %{version}
290 Obsoletes
: corosync
-devel
< 0.92-7
292 %description -n corosynclib
-devel
293 This package contains include files and man pages used to develop using
294 The Corosync Cluster Engine APIs.
296 %files -n corosynclib
-devel
297 %defattr(-,root
,root
,-)
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
315 %{_libdir}/libcmap.so
316 %{_libdir}/libtotem_pg.so
317 %{_libdir}/libquorum.so
318 %{_libdir}/libvotequorum.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*
334 * @date@ Autotools generated version
<nobody@nowhere.org
> - @version@
-1-@numcomm@.@alphatag@.@dirty@
335 - Autotools generated version