6 # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7 # to disable or enable specific features
10 %bcond_with monitoring
17 %global gitver
%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
18 %global gittarver
%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
21 Summary: The Corosync Cluster Engine and Application Programming Interfaces
23 Release: 1%{?gitver}%{?dist}
25 Group: System Environment
/Base
26 URL: http
://ftp.corosync.org
27 Source0: ftp
://ftp
:user@ftp.corosync.org
/downloads
/%{name}-%{version}/%{name}-%{version}%{?gittarver}.tar.gz
30 Requires: corosynclib
= %{version}-%{release}
31 Requires(pre
): /usr
/sbin
/useradd
32 Requires(post
): /sbin
/chkconfig
33 Requires(preun
): /sbin
/chkconfig
34 Conflicts: openais
<= 0.89, openais
-devel
<= 0.89
39 %{?_with_buildtrunk: %define buildtrunk 1}
42 BuildRequires
: libqb
-devel
43 BuildRequires
: nss
-devel
45 BuildRequires
: autoconf automake
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
66 BuildRoot: %
(mktemp
-ud
%{_tmppath}/%{name}-%{version}-%{release}-XXXXXX
)
69 %setup -q
-n
%{name}-%{version}%{?gittarver}
77 export ibverbs_CFLAGS
=-I
/usr
/include
/infiniband \
78 export ibverbs_LIBS
=-libverbs \
79 export rdmacm_CFLAGS
=-I
/usr
/include
/rdma \
80 export rdmacm_LIBS
=-lrdmacm \
83 %if %{with testagents}
89 %if %{with monitoring}
107 --with
-initddir
=%{_initrddir} \
108 --with
-systemddir
=%{_unitdir}
115 make install DESTDIR
=%{buildroot}
118 mkdir -p
-m
0700 %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
119 install -m
644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
124 rm -f
%{buildroot}%{_libdir}/*.a
125 rm -f
%{buildroot}%{_libdir}/*.la
126 # drop docs and html docs for now
127 rm -rf
%{buildroot}%{_docdir}/*
133 This package contains the Corosync Cluster Engine Executive
, several default
134 APIs and libraries
, default configuration files
, and an init script.
137 if [ $
1 -eq
1 ]; then
138 /sbin
/chkconfig
--add corosync ||
:
142 if [ $
1 -eq
0 ]; then
143 /sbin
/service corosync stop
&>/dev
/null ||
:
144 /sbin
/chkconfig
--del corosync ||
:
148 %defattr(-,root
,root
,-)
149 %doc LICENSE SECURITY
151 %{_sbindir}/corosync
-keygen
152 %{_sbindir}/corosync
-cmapctl
153 %{_sbindir}/corosync
-cfgtool
154 %{_sbindir}/corosync
-cpgtool
155 %{_sbindir}/corosync
-quorumtool
156 %{_sbindir}/corosync
-notifyd
157 %{_bindir}/corosync
-blackbox
159 %{_bindir}/corosync
-xmlproc
160 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.xml.example
161 %dir %{_datadir}/corosync
162 %dir %{_datadir}/corosync
/xml2conf.xsl
163 %{_mandir}/man8
/corosync
-xmlproc
.8*
164 %{_mandir}/man5
/corosync.xml
.5*
166 %dir %{_sysconfdir}/corosync
167 %dir %{_sysconfdir}/corosync
/uidgid.d
168 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example
169 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example.udpu
171 %{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
174 %{_datadir}/snmp
/mibs
/COROSYNC
-MIB.txt
177 %{_unitdir}/corosync.service
178 %{_unitdir}/corosync
-notifyd.service
179 %dir %{_datadir}/corosync
180 %{_datadir}/corosync
/corosync
181 %{_datadir}/corosync
/corosync
-notifyd
183 %{_initrddir}/corosync
184 %{_initrddir}/corosync
-notifyd
186 %dir %{_localstatedir}/lib
/corosync
187 %dir %{_localstatedir}/log
/cluster
188 %{_mandir}/man8
/corosync_overview
.8*
189 %{_mandir}/man8
/corosync
.8*
190 %{_mandir}/man8
/corosync
-blackbox
.8*
191 %{_mandir}/man8
/corosync
-cmapctl
.8*
192 %{_mandir}/man8
/corosync
-keygen
.8*
193 %{_mandir}/man8
/corosync
-cfgtool
.8*
194 %{_mandir}/man8
/corosync
-cpgtool
.8*
195 %{_mandir}/man8
/corosync
-notifyd
.8*
196 %{_mandir}/man8
/corosync
-quorumtool
.8*
197 %{_mandir}/man5
/corosync.conf
.5*
198 %{_mandir}/man5
/votequorum
.5*
199 %{_mandir}/man8
/cmap_keys
.8*
201 # optional testagent rpm
203 %if %{with testagents}
205 %package -n corosync
-testagents
206 Summary: The Corosync Cluster Engine Test Agents
207 Group: Development
/Libraries
208 Requires: %{name} = %{version}-%{release}
210 %description -n corosync
-testagents
211 This package contains corosync
test agents.
213 %files -n corosync
-testagents
214 %defattr(755,root
,root
,-)
215 %{_datadir}/corosync
/tests
/mem_leak_test.sh
216 %{_datadir}/corosync
/tests
/net_breaker.sh
217 %{_datadir}/corosync
/tests
/cmap
-dispatch
-deadlock.sh
218 %{_datadir}/corosync
/tests
/shm_leak_audit.sh
219 %{_bindir}/cpg_test_agent
220 %{_bindir}/sam_test_agent
221 %{_bindir}/votequorum_test_agent
227 %package -n corosynclib
228 Summary: The Corosync Cluster Engine Libraries
229 Group: System Environment
/Libraries
230 Requires: %{name} = %{version}-%{release}
232 %description -n corosynclib
233 This package contains corosync libraries.
235 %files -n corosynclib
236 %defattr(-,root
,root
,-)
238 %{_libdir}/libcfg.so.
*
239 %{_libdir}/libcpg.so.
*
240 %{_libdir}/libcmap.so.
*
241 %{_libdir}/libtotem_pg.so.
*
242 %{_libdir}/libquorum.so.
*
243 %{_libdir}/libvotequorum.so.
*
244 %{_libdir}/libsam.so.
*
245 %{_libdir}/libcorosync_common.so.
*
247 %post -n corosynclib
-p
/sbin
/ldconfig
249 %postun -n corosynclib
-p
/sbin
/ldconfig
251 %package -n corosynclib
-devel
252 Summary: The Corosync Cluster Engine Development Kit
253 Group: Development
/Libraries
254 Requires: corosynclib
= %{version}-%{release}
256 Provides: corosync
-devel
= %{version}
257 Obsoletes
: corosync
-devel
< 0.92-7
259 %description -n corosynclib
-devel
260 This package contains include files and man pages used to develop using
261 The Corosync Cluster Engine APIs.
263 %files -n corosynclib
-devel
264 %defattr(-,root
,root
,-)
266 %dir %{_includedir}/corosync
/
267 %{_includedir}/corosync
/corodefs.h
268 %{_includedir}/corosync
/cfg.h
269 %{_includedir}/corosync
/cmap.h
270 %{_includedir}/corosync
/corotypes.h
271 %{_includedir}/corosync
/cpg.h
272 %{_includedir}/corosync
/hdb.h
273 %{_includedir}/corosync
/sam.h
274 %{_includedir}/corosync
/quorum.h
275 %{_includedir}/corosync
/votequorum.h
276 %dir %{_includedir}/corosync
/totem
/
277 %{_includedir}/corosync
/totem
/totem.h
278 %{_includedir}/corosync
/totem
/totemip.h
279 %{_includedir}/corosync
/totem
/totempg.h
282 %{_libdir}/libcmap.so
283 %{_libdir}/libtotem_pg.so
284 %{_libdir}/libquorum.so
285 %{_libdir}/libvotequorum.so
287 %{_libdir}/libcorosync_common.so
288 %{_libdir}/pkgconfig
/*.pc
289 %{_mandir}/man3
/cpg_
*3*
290 %{_mandir}/man3
/quorum_
*3*
291 %{_mandir}/man3
/votequorum_
*3*
292 %{_mandir}/man3
/sam_
*3*
293 %{_mandir}/man8
/cpg_overview
.8*
294 %{_mandir}/man8
/votequorum_overview
.8*
295 %{_mandir}/man8
/sam_overview
.8*
296 %{_mandir}/man3
/cmap_
*3*
297 %{_mandir}/man8
/cmap_overview
.8*
298 %{_mandir}/man8
/quorum_overview
.8*
301 * @date@ Autotools generated version
<nobody@nowhere.org
> - @version@
-1-@numcomm@.@alphatag@.@dirty@
302 - Autotools generated version