6 # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7 # to disable or enable specific features
14 %bcond_with runautogen
16 %global gitver
%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
17 %global gittarver
%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
20 Summary: The Corosync Cluster Engine and Application Programming Interfaces
22 Release: 1%{?gitver}%{?dist}
24 URL: http
://corosync.github.io
/corosync
/
25 Source0: http
://build.clusterlabs.org
/corosync
/releases
/%{name}-%{version}%{?gittarver}.tar.gz
28 # The automatic dependency overridden in favor of explicit version lock
29 Requires: corosynclib
%{?_isa} = %{version}-%{release}
35 BuildRequires
: groff
-full
39 BuildRequires
: libqb
-devel
40 BuildRequires
: libknet1
-devel
41 BuildRequires
: zlib
-devel
42 %if %{with runautogen}
43 BuildRequires
: autoconf automake libtool
45 %if %{with monitoring}
46 BuildRequires
: libstatgrab
-devel
49 BuildRequires
: net
-snmp
-devel
53 BuildRequires
: dbus
-1-devel
55 BuildRequires
: dbus
-devel
60 BuildRequires
: systemd
61 BuildRequires
: systemd
-devel
63 Requires(post
): /sbin
/chkconfig
64 Requires(preun
): /sbin
/chkconfig
71 %setup -q
-n
%{name}-%{version}%{?gittarver}
74 %if %{with runautogen}
82 %if %{with monitoring}
97 --with
-initddir
=%{_initrddir} \
98 --with
-systemddir
=%{_unitdir} \
104 make install DESTDIR
=%{buildroot}
107 mkdir -p
-m
0700 %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
108 install -m
644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
113 rm -f
%{buildroot}%{_libdir}/*.a
114 rm -f
%{buildroot}%{_libdir}/*.la
115 # drop docs and html docs for now
116 rm -rf
%{buildroot}%{_docdir}/*
117 # /etc/sysconfig/corosync-notifyd
118 mkdir -p
%{buildroot}%{_sysconfdir}/sysconfig
119 install -m
644 tools
/corosync
-notifyd.sysconfig.example \
120 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
-notifyd
121 # /etc/sysconfig/corosync
122 install -m
644 init
/corosync.sysconfig.example \
123 %{buildroot}%{_sysconfdir}/sysconfig
/corosync
126 This package contains the Corosync Cluster Engine Executive
, several default
127 APIs and libraries
, default configuration files
, and an init script.
130 %if %{with systemd} && 0%{?systemd_post:1}
131 %systemd_post corosync.service
133 if [ $
1 -eq
1 ]; then
134 /sbin
/chkconfig
--add corosync ||
:
139 %if %{with systemd} && 0%{?systemd_preun:1}
140 %systemd_preun corosync.service
142 if [ $
1 -eq
0 ]; then
143 /sbin
/service corosync stop
&>/dev
/null ||
:
144 /sbin
/chkconfig
--del corosync ||
:
149 %if %{with systemd} && 0%{?systemd_postun:1}
150 %systemd_postun corosync.service
156 %{_sbindir}/corosync
-keygen
157 %{_sbindir}/corosync
-cmapctl
158 %{_sbindir}/corosync
-cfgtool
159 %{_sbindir}/corosync
-cpgtool
160 %{_sbindir}/corosync
-quorumtool
161 %{_sbindir}/corosync
-notifyd
162 %{_bindir}/corosync
-blackbox
164 %{_bindir}/corosync
-xmlproc
165 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.xml.example
166 %dir %{_datadir}/corosync
167 %{_datadir}/corosync
/xml2conf.xsl
168 %{_mandir}/man8
/corosync
-xmlproc
.8*
169 %{_mandir}/man5
/corosync.xml
.5*
171 %dir %{_sysconfdir}/corosync
172 %dir %{_sysconfdir}/corosync
/uidgid.d
173 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example
174 %config(noreplace
) %{_sysconfdir}/corosync
/corosync.conf.example.udpu
175 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
-notifyd
176 %config(noreplace
) %{_sysconfdir}/sysconfig
/corosync
177 %config(noreplace
) %{_sysconfdir}/logrotate.d
/corosync
179 %{_sysconfdir}/dbus
-1/system.d
/corosync
-signals.conf
182 %{_datadir}/snmp
/mibs
/COROSYNC
-MIB.txt
185 %{_unitdir}/corosync.service
186 %{_unitdir}/corosync
-notifyd.service
188 %{_initrddir}/corosync
189 %{_initrddir}/corosync
-notifyd
191 %dir %{_localstatedir}/lib
/corosync
192 %dir %{_localstatedir}/log
/cluster
193 %{_mandir}/man7
/corosync_overview
.7*
194 %{_mandir}/man8
/corosync
.8*
195 %{_mandir}/man8
/corosync
-blackbox
.8*
196 %{_mandir}/man8
/corosync
-cmapctl
.8*
197 %{_mandir}/man8
/corosync
-keygen
.8*
198 %{_mandir}/man8
/corosync
-cfgtool
.8*
199 %{_mandir}/man8
/corosync
-cpgtool
.8*
200 %{_mandir}/man8
/corosync
-notifyd
.8*
201 %{_mandir}/man8
/corosync
-quorumtool
.8*
202 %{_mandir}/man5
/corosync.conf
.5*
203 %{_mandir}/man5
/votequorum
.5*
204 %{_mandir}/man8
/cmap_keys
.8*
208 %package -n corosynclib
209 Summary: The Corosync Cluster Engine Libraries
211 %description -n corosynclib
212 This package contains corosync libraries.
214 %files -n corosynclib
216 %{_libdir}/libcfg.so.
*
217 %{_libdir}/libcpg.so.
*
218 %{_libdir}/libcmap.so.
*
219 %{_libdir}/libquorum.so.
*
220 %{_libdir}/libvotequorum.so.
*
221 %{_libdir}/libsam.so.
*
222 %{_libdir}/libcorosync_common.so.
*
224 %post -n corosynclib
-p
/sbin
/ldconfig
226 %postun -n corosynclib
-p
/sbin
/ldconfig
228 %package -n corosynclib
-devel
229 Summary: The Corosync Cluster Engine Development Kit
230 Requires: corosynclib
%{?_isa} = %{version}-%{release}
232 Provides: corosync
-devel
= %{version}
234 %description -n corosynclib
-devel
235 This package contains include files and man pages used to develop using
236 The Corosync Cluster Engine APIs.
238 %files -n corosynclib
-devel
240 %dir %{_includedir}/corosync
/
241 %{_includedir}/corosync
/corodefs.h
242 %{_includedir}/corosync
/cfg.h
243 %{_includedir}/corosync
/cmap.h
244 %{_includedir}/corosync
/corotypes.h
245 %{_includedir}/corosync
/cpg.h
246 %{_includedir}/corosync
/hdb.h
247 %{_includedir}/corosync
/sam.h
248 %{_includedir}/corosync
/quorum.h
249 %{_includedir}/corosync
/votequorum.h
250 %dir %{_includedir}/corosync
/totem
/
251 %{_includedir}/corosync
/totem
/totem.h
252 %{_includedir}/corosync
/totem
/totemip.h
253 %{_includedir}/corosync
/totem
/totempg.h
254 %{_includedir}/corosync
/totem
/totemstats.h
257 %{_libdir}/libcmap.so
258 %{_libdir}/libquorum.so
259 %{_libdir}/libvotequorum.so
261 %{_libdir}/libcorosync_common.so
262 %{_libdir}/pkgconfig
/*.pc
263 %{_mandir}/man3
/cpg_
*3*
264 %{_mandir}/man3
/quorum_
*3*
265 %{_mandir}/man3
/votequorum_
*3*
266 %{_mandir}/man3
/sam_
*3*
267 %{_mandir}/man3
/cmap_
*3*
270 * @date@ Autotools generated version
<nobody@nowhere.org
> - @version@
-1-@numcomm@.@alphatag@.@dirty@
271 - Autotools generated version