6 # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7 # to disable or enable specific features
10 %bcond_with monitoring
15 %bcond_with runautogen
18 %global gitver
%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
19 %global gittarver
%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
22 Summary: The Corosync Cluster Engine and Application Programming Interfaces
24 Release: 1%{?gitver}%{?dist}
26 URL: http
://corosync.github.io
/corosync
/
27 Source0: http
://build.clusterlabs.org
/corosync
/releases
/%{name}-%{version}%{?gittarver}.tar.gz
30 # The automatic dependency overridden in favor of explicit version lock
31 Requires: corosynclib
%{?_isa} = %{version}-%{release}
36 BuildRequires
: groff
-full
40 BuildRequires
: libqb
-devel
42 BuildRequires
: mozilla
-nss
-devel
44 BuildRequires
: nss
-devel
46 BuildRequires
: libknet1
-devel
47 BuildRequires
: zlib
-devel
48 %if %{with runautogen}
49 BuildRequires
: autoconf automake libtool
51 %if %{with monitoring}
52 BuildRequires
: libstatgrab
-devel
55 BuildRequires
: net
-snmp
-devel
59 BuildRequires
: dbus
-1-devel
61 BuildRequires
: dbus
-devel
66 BuildRequires
: systemd
67 BuildRequires
: systemd
-devel
69 Requires(post
): /sbin
/chkconfig
70 Requires(preun
): /sbin
/chkconfig
76 BuildRequires
: libcgroup
-devel
80 %setup -q
-n
%{name}-%{version}%{?gittarver}
83 %if %{with runautogen}
88 %if %{with testagents}
94 %if %{with monitoring}
109 %if %{with libcgroup}
112 --with
-initddir
=%{_initrddir} \
113 --with
-systemddir
=%{_unitdir} \
119 make install DESTDIR
=%{buildroot}
122 mkdir -p
-m
0700 %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
123 install -m
644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
128 rm -f
%{buildroot}%{_libdir}/*.a
129 rm -f
%{buildroot}%{_libdir}/*.la
130 # drop docs and html docs for now
131 rm -rf
%{buildroot}%{_docdir}/*
132 # /etc/sysconfig/corosync-notifyd
133 mkdir -p
%{buildroot}%{_sysconfdir}/sysconfig
134 install -m
644 tools
/corosync
-notifyd.sysconfig.example \
135 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
-notifyd
136 # /etc/sysconfig/corosync
137 install -m
644 init
/corosync.sysconfig.example \
138 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
143 This package contains the Corosync Cluster Engine Executive
, several default
144 APIs and libraries
, default configuration files
, and an init script.
147 %if %{with systemd} && 0%{?systemd_post:1}
148 %systemd_post corosync.service
150 if [ $
1 -eq
1 ]; then
151 /sbin
/chkconfig
--add corosync ||
:
156 %if %{with systemd} && 0%{?systemd_preun:1}
157 %systemd_preun corosync.service
159 if [ $
1 -eq
0 ]; then
160 /sbin
/service corosync stop
&>/dev
/null ||
:
161 /sbin
/chkconfig
--del corosync ||
:
166 %if %{with systemd} && 0%{?systemd_postun:1}
167 %systemd_postun corosync.service
171 %doc LICENSE SECURITY
173 %{_sbindir}/corosync
-keygen
174 %{_sbindir}/corosync
-cmapctl
175 %{_sbindir}/corosync
-cfgtool
176 %{_sbindir}/corosync
-cpgtool
177 %{_sbindir}/corosync
-quorumtool
178 %{_sbindir}/corosync
-notifyd
179 %{_bindir}/corosync
-blackbox
181 %{_bindir}/corosync
-xmlproc
182 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.xml.example
183 %dir %{_datadir}/corosync
184 %{_datadir}/corosync
/xml2conf.xsl
185 %{_mandir}/man8
/corosync
-xmlproc
.8*
186 %{_mandir}/man5
/corosync.xml
.5*
188 %dir %{_sysconfdir}/corosync
189 %dir %{_sysconfdir}/corosync
/uidgid.d
190 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example
191 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example.udpu
192 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
-notifyd
193 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
194 %config(noreplace
) %{_sysconfdir}/logrotate.d
/corosync
196 %{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
199 %{_datadir}/snmp
/mibs
/COROSYNC
-MIB.txt
202 %{_unitdir}/corosync.service
203 %{_unitdir}/corosync
-notifyd.service
205 %{_initrddir}/corosync
206 %{_initrddir}/corosync
-notifyd
208 %dir %{_localstatedir}/lib
/corosync
209 %dir %{_localstatedir}/log
/cluster
210 %{_mandir}/man7
/corosync_overview
.7*
211 %{_mandir}/man8
/corosync
.8*
212 %{_mandir}/man8
/corosync
-blackbox
.8*
213 %{_mandir}/man8
/corosync
-cmapctl
.8*
214 %{_mandir}/man8
/corosync
-keygen
.8*
215 %{_mandir}/man8
/corosync
-cfgtool
.8*
216 %{_mandir}/man8
/corosync
-cpgtool
.8*
217 %{_mandir}/man8
/corosync
-notifyd
.8*
218 %{_mandir}/man8
/corosync
-quorumtool
.8*
219 %{_mandir}/man5
/corosync.conf
.5*
220 %{_mandir}/man5
/votequorum
.5*
221 %{_mandir}/man8
/cmap_keys
.8*
223 # optional testagent rpm
225 %if %{with testagents}
227 %package -n corosync
-testagents
228 Summary: The Corosync Cluster Engine Test Agents
229 Requires: %{name} = %{version}-%{release}
231 %description -n corosync
-testagents
232 This package contains corosync
test agents.
234 %files -n corosync
-testagents
235 %defattr(755,root
,root
,-)
236 %{_datadir}/corosync
/tests
/mem_leak_test.sh
237 %{_datadir}/corosync
/tests
/net_breaker.sh
238 %{_datadir}/corosync
/tests
/cmap
-dispatch
-deadlock.sh
239 %{_datadir}/corosync
/tests
/shm_leak_audit.sh
240 %{_bindir}/cpg_test_agent
241 %{_bindir}/sam_test_agent
242 %{_bindir}/votequorum_test_agent
248 %package -n corosynclib
249 Summary: The Corosync Cluster Engine Libraries
251 %description -n corosynclib
252 This package contains corosync libraries.
254 %files -n corosynclib
256 %{_libdir}/libcfg.so.
*
257 %{_libdir}/libcpg.so.
*
258 %{_libdir}/libcmap.so.
*
259 %{_libdir}/libtotem_pg.so.
*
260 %{_libdir}/libquorum.so.
*
261 %{_libdir}/libvotequorum.so.
*
262 %{_libdir}/libsam.so.
*
263 %{_libdir}/libcorosync_common.so.
*
265 %post -n corosynclib
-p
/sbin
/ldconfig
267 %postun -n corosynclib
-p
/sbin
/ldconfig
269 %package -n corosynclib
-devel
270 Summary: The Corosync Cluster Engine Development Kit
271 Requires: corosynclib
%{?_isa} = %{version}-%{release}
273 Provides: corosync
-devel
= %{version}
275 %description -n corosynclib
-devel
276 This package contains include files and man pages used to develop using
277 The Corosync Cluster Engine APIs.
279 %files -n corosynclib
-devel
281 %dir %{_includedir}/corosync
/
282 %{_includedir}/corosync
/corodefs.h
283 %{_includedir}/corosync
/cfg.h
284 %{_includedir}/corosync
/cmap.h
285 %{_includedir}/corosync
/corotypes.h
286 %{_includedir}/corosync
/cpg.h
287 %{_includedir}/corosync
/hdb.h
288 %{_includedir}/corosync
/sam.h
289 %{_includedir}/corosync
/quorum.h
290 %{_includedir}/corosync
/votequorum.h
291 %dir %{_includedir}/corosync
/totem
/
292 %{_includedir}/corosync
/totem
/totem.h
293 %{_includedir}/corosync
/totem
/totemip.h
294 %{_includedir}/corosync
/totem
/totempg.h
295 %{_includedir}/corosync
/totem
/totemstats.h
298 %{_libdir}/libcmap.so
299 %{_libdir}/libtotem_pg.so
300 %{_libdir}/libquorum.so
301 %{_libdir}/libvotequorum.so
303 %{_libdir}/libcorosync_common.so
304 %{_libdir}/pkgconfig
/*.pc
305 %{_mandir}/man3
/cpg_
*3*
306 %{_mandir}/man3
/quorum_
*3*
307 %{_mandir}/man3
/votequorum_
*3*
308 %{_mandir}/man3
/sam_
*3*
309 %{_mandir}/man3
/cmap_
*3*
312 * @date@ Autotools generated version
<nobody@nowhere.org
> - @version@
-1-@numcomm@.@alphatag@.@dirty@
313 - Autotools generated version