]>
Commit | Line | Data |
---|---|---|
ae96f61a FDN |
1 | @ALPHATAG@ |
2 | @NUMCOMM@ | |
3 | @DIRTY@ | |
85fb6472 AS |
4 | |
5 | # Conditionals | |
6 | # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>" | |
7 | # to disable or enable specific features | |
8 | %bcond_with testagents | |
07d06c0c AS |
9 | %bcond_with watchdog |
10 | %bcond_with monitoring | |
2a568d6e AS |
11 | %bcond_with snmp |
12 | %bcond_with dbus | |
6fa114ac | 13 | %bcond_with systemd |
cdff97a0 | 14 | %bcond_with xmlconf |
5da3fe9f | 15 | %bcond_with runautogen |
9a50628f | 16 | %bcond_with libcgroup |
85fb6472 | 17 | |
8f766dd7 FDN |
18 | %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}} |
19 | %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} | |
20 | ||
b5fc4494 FDN |
21 | Name: corosync |
22 | Summary: The Corosync Cluster Engine and Application Programming Interfaces | |
23 | Version: @version@ | |
8f766dd7 | 24 | Release: 1%{?gitver}%{?dist} |
b5fc4494 | 25 | License: BSD |
c6c15ebc | 26 | URL: http://corosync.github.io/corosync/ |
41995454 | 27 | Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz |
b5fc4494 FDN |
28 | |
29 | # Runtime bits | |
c91c4825 | 30 | # The automatic dependency overridden in favor of explicit version lock |
c8c257ee | 31 | Requires: corosynclib%{?_isa} = %{version}-%{release} |
b5fc4494 | 32 | |
47b9e296 FDN |
33 | # Build bits |
34 | ||
e3ff3e2a | 35 | BuildRequires: groff |
c505993e | 36 | BuildRequires: libqb-devel |
8cdd2fc4 | 37 | BuildRequires: nss-devel |
76591baa | 38 | BuildRequires: libknet1-devel |
8cc8e513 | 39 | BuildRequires: zlib-devel |
5da3fe9f JF |
40 | %if %{with runautogen} |
41 | BuildRequires: autoconf automake libtool | |
8c3680d1 | 42 | %endif |
5c5db34e FDN |
43 | %if %{with monitoring} |
44 | BuildRequires: libstatgrab-devel | |
45 | %endif | |
2a568d6e AS |
46 | %if %{with snmp} |
47 | BuildRequires: net-snmp-devel | |
48 | %endif | |
49 | %if %{with dbus} | |
50 | BuildRequires: dbus-devel | |
51 | %endif | |
6fa114ac | 52 | %if %{with systemd} |
eec4d710 JF |
53 | %{?systemd_requires} |
54 | BuildRequires: systemd | |
db541f56 | 55 | BuildRequires: systemd-devel |
eec4d710 JF |
56 | %else |
57 | Requires(post): /sbin/chkconfig | |
58 | Requires(preun): /sbin/chkconfig | |
6fa114ac | 59 | %endif |
23b93ccb SD |
60 | %if %{with xmlconf} |
61 | Requires: libxslt | |
62 | %endif | |
9a50628f JF |
63 | %if %{with libcgroup} |
64 | BuildRequires: libcgroup-devel | |
65 | %endif | |
b5fc4494 | 66 | |
b5fc4494 | 67 | %prep |
8f766dd7 | 68 | %setup -q -n %{name}-%{version}%{?gittarver} |
b5fc4494 | 69 | |
583eb6ae | 70 | %build |
5da3fe9f | 71 | %if %{with runautogen} |
b5fc4494 | 72 | ./autogen.sh |
8c3680d1 | 73 | %endif |
b5fc4494 | 74 | |
15f3bc84 | 75 | %{configure} \ |
85fb6472 | 76 | %if %{with testagents} |
45fc3a51 | 77 | --enable-testagents \ |
07d06c0c AS |
78 | %endif |
79 | %if %{with watchdog} | |
80 | --enable-watchdog \ | |
81 | %endif | |
82 | %if %{with monitoring} | |
83 | --enable-monitoring \ | |
2a568d6e AS |
84 | %endif |
85 | %if %{with snmp} | |
86 | --enable-snmp \ | |
87 | %endif | |
88 | %if %{with dbus} | |
89 | --enable-dbus \ | |
85fb6472 | 90 | %endif |
6fa114ac AS |
91 | %if %{with systemd} |
92 | --enable-systemd \ | |
61b2a85e JF |
93 | %endif |
94 | %if %{with xmlconf} | |
95 | --enable-xmlconf \ | |
7bbcb1b7 | 96 | %endif |
9a50628f JF |
97 | %if %{with libcgroup} |
98 | --enable-libcgroup \ | |
17fb819a | 99 | %endif |
769a69e4 | 100 | --with-initddir=%{_initrddir} \ |
59bd5f0f | 101 | --with-systemddir=%{_unitdir} |
b5fc4494 | 102 | |
b5fc4494 FDN |
103 | make %{_smp_mflags} |
104 | ||
105 | %install | |
b5fc4494 | 106 | make install DESTDIR=%{buildroot} |
b5fc4494 | 107 | |
2d75c705 JF |
108 | %if %{with dbus} |
109 | mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d | |
8f766dd7 | 110 | install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf |
2d75c705 JF |
111 | %endif |
112 | ||
b5fc4494 FDN |
113 | ## tree fixup |
114 | # drop static libs | |
115 | rm -f %{buildroot}%{_libdir}/*.a | |
2156ae60 | 116 | rm -f %{buildroot}%{_libdir}/*.la |
b5fc4494 FDN |
117 | # drop docs and html docs for now |
118 | rm -rf %{buildroot}%{_docdir}/* | |
03f05b58 JF |
119 | # /etc/sysconfig/corosync-notifyd |
120 | mkdir -p %{buildroot}%{_sysconfdir}/sysconfig | |
121 | install -m 644 tools/corosync-notifyd.sysconfig.example \ | |
122 | %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd | |
1f7e78ab JF |
123 | # /etc/sysconfig/corosync |
124 | install -m 644 init/corosync.sysconfig.example \ | |
125 | %{buildroot}%{_sysconfdir}/sysconfig/corosync | |
b5fc4494 FDN |
126 | |
127 | %clean | |
b5fc4494 | 128 | |
6aad39be | 129 | %description |
b5fc4494 FDN |
130 | This package contains the Corosync Cluster Engine Executive, several default |
131 | APIs and libraries, default configuration files, and an init script. | |
132 | ||
133 | %post | |
61329a78 JF |
134 | %if %{with systemd} && 0%{?systemd_post:1} |
135 | %systemd_post corosync.service | |
136 | %else | |
583eb6ae SD |
137 | if [ $1 -eq 1 ]; then |
138 | /sbin/chkconfig --add corosync || : | |
139 | fi | |
61329a78 | 140 | %endif |
b5fc4494 FDN |
141 | |
142 | %preun | |
61329a78 JF |
143 | %if %{with systemd} && 0%{?systemd_preun:1} |
144 | %systemd_preun corosync.service | |
145 | %else | |
b5fc4494 FDN |
146 | if [ $1 -eq 0 ]; then |
147 | /sbin/service corosync stop &>/dev/null || : | |
148 | /sbin/chkconfig --del corosync || : | |
149 | fi | |
61329a78 JF |
150 | %endif |
151 | ||
152 | %postun | |
153 | %if %{with systemd} && 0%{?systemd_postun:1} | |
eec4d710 | 154 | %systemd_postun corosync.service |
61329a78 | 155 | %endif |
b5fc4494 | 156 | |
6aad39be | 157 | %files |
b5fc4494 FDN |
158 | %doc LICENSE SECURITY |
159 | %{_sbindir}/corosync | |
160 | %{_sbindir}/corosync-keygen | |
4f04735f | 161 | %{_sbindir}/corosync-cmapctl |
b5fc4494 | 162 | %{_sbindir}/corosync-cfgtool |
15f3bc84 FDN |
163 | %{_sbindir}/corosync-cpgtool |
164 | %{_sbindir}/corosync-quorumtool | |
2a568d6e | 165 | %{_sbindir}/corosync-notifyd |
45fc3a51 | 166 | %{_bindir}/corosync-blackbox |
4f04735f SD |
167 | %if %{with xmlconf} |
168 | %{_bindir}/corosync-xmlproc | |
ab9986cb FDN |
169 | %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example |
170 | %dir %{_datadir}/corosync | |
e5f2ecab | 171 | %{_datadir}/corosync/xml2conf.xsl |
ab9986cb FDN |
172 | %{_mandir}/man8/corosync-xmlproc.8* |
173 | %{_mandir}/man5/corosync.xml.5* | |
4f04735f | 174 | %endif |
b446d4e9 FDN |
175 | %dir %{_sysconfdir}/corosync |
176 | %dir %{_sysconfdir}/corosync/uidgid.d | |
177 | %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example | |
bb05aed9 | 178 | %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu |
03f05b58 | 179 | %config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd |
1f7e78ab | 180 | %config(noreplace) %{_sysconfdir}/sysconfig/corosync |
aabbace6 | 181 | %config(noreplace) %{_sysconfdir}/logrotate.d/corosync |
2a568d6e AS |
182 | %if %{with dbus} |
183 | %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf | |
184 | %endif | |
185 | %if %{with snmp} | |
a197e7b1 | 186 | %{_datadir}/snmp/mibs/COROSYNC-MIB.txt |
2a568d6e | 187 | %endif |
6fa114ac AS |
188 | %if %{with systemd} |
189 | %{_unitdir}/corosync.service | |
190 | %{_unitdir}/corosync-notifyd.service | |
191 | %else | |
6bae61d8 | 192 | %{_initrddir}/corosync |
2a568d6e | 193 | %{_initrddir}/corosync-notifyd |
6fa114ac | 194 | %endif |
b446d4e9 | 195 | %dir %{_localstatedir}/lib/corosync |
60f13c03 | 196 | %dir %{_localstatedir}/log/cluster |
3de869d2 | 197 | %{_mandir}/man7/corosync_overview.7* |
824467e6 AS |
198 | %{_mandir}/man8/corosync.8* |
199 | %{_mandir}/man8/corosync-blackbox.8* | |
a516a1f9 | 200 | %{_mandir}/man8/corosync-cmapctl.8* |
52632075 | 201 | %{_mandir}/man8/corosync-keygen.8* |
de317d57 | 202 | %{_mandir}/man8/corosync-cfgtool.8* |
b7ed8064 | 203 | %{_mandir}/man8/corosync-cpgtool.8* |
2a568d6e | 204 | %{_mandir}/man8/corosync-notifyd.8* |
d655a79c | 205 | %{_mandir}/man8/corosync-quorumtool.8* |
b5fc4494 | 206 | %{_mandir}/man5/corosync.conf.5* |
284ca618 | 207 | %{_mandir}/man5/votequorum.5* |
de47f124 | 208 | %{_mandir}/man8/cmap_keys.8* |
b5fc4494 | 209 | |
85fb6472 AS |
210 | # optional testagent rpm |
211 | # | |
212 | %if %{with testagents} | |
213 | ||
214 | %package -n corosync-testagents | |
215 | Summary: The Corosync Cluster Engine Test Agents | |
85fb6472 AS |
216 | Requires: %{name} = %{version}-%{release} |
217 | ||
218 | %description -n corosync-testagents | |
219 | This package contains corosync test agents. | |
220 | ||
221 | %files -n corosync-testagents | |
222 | %defattr(755,root,root,-) | |
223 | %{_datadir}/corosync/tests/mem_leak_test.sh | |
224 | %{_datadir}/corosync/tests/net_breaker.sh | |
2678f0a0 AS |
225 | %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh |
226 | %{_datadir}/corosync/tests/shm_leak_audit.sh | |
85fb6472 | 227 | %{_bindir}/cpg_test_agent |
1cdad310 AS |
228 | %{_bindir}/sam_test_agent |
229 | %{_bindir}/votequorum_test_agent | |
85fb6472 AS |
230 | |
231 | %endif | |
232 | ||
233 | # library | |
234 | # | |
b5fc4494 FDN |
235 | %package -n corosynclib |
236 | Summary: The Corosync Cluster Engine Libraries | |
b5fc4494 FDN |
237 | |
238 | %description -n corosynclib | |
239 | This package contains corosync libraries. | |
240 | ||
241 | %files -n corosynclib | |
b5fc4494 FDN |
242 | %doc LICENSE |
243 | %{_libdir}/libcfg.so.* | |
244 | %{_libdir}/libcpg.so.* | |
7c250a51 | 245 | %{_libdir}/libcmap.so.* |
b5fc4494 | 246 | %{_libdir}/libtotem_pg.so.* |
b5fc4494 FDN |
247 | %{_libdir}/libquorum.so.* |
248 | %{_libdir}/libvotequorum.so.* | |
47ae82b0 | 249 | %{_libdir}/libsam.so.* |
40727bd6 | 250 | %{_libdir}/libcorosync_common.so.* |
b5fc4494 FDN |
251 | |
252 | %post -n corosynclib -p /sbin/ldconfig | |
253 | ||
254 | %postun -n corosynclib -p /sbin/ldconfig | |
255 | ||
256 | %package -n corosynclib-devel | |
257 | Summary: The Corosync Cluster Engine Development Kit | |
d1d929a7 | 258 | Requires: corosynclib%{?_isa} = %{version}-%{release} |
b5fc4494 FDN |
259 | Requires: pkgconfig |
260 | Provides: corosync-devel = %{version} | |
b5fc4494 FDN |
261 | |
262 | %description -n corosynclib-devel | |
263 | This package contains include files and man pages used to develop using | |
264 | The Corosync Cluster Engine APIs. | |
265 | ||
266 | %files -n corosynclib-devel | |
bf3a0ad5 | 267 | %doc LICENSE |
b5fc4494 | 268 | %dir %{_includedir}/corosync/ |
b5fc4494 | 269 | %{_includedir}/corosync/corodefs.h |
b5fc4494 | 270 | %{_includedir}/corosync/cfg.h |
7c250a51 | 271 | %{_includedir}/corosync/cmap.h |
b5fc4494 FDN |
272 | %{_includedir}/corosync/corotypes.h |
273 | %{_includedir}/corosync/cpg.h | |
b5fc4494 | 274 | %{_includedir}/corosync/hdb.h |
47ae82b0 | 275 | %{_includedir}/corosync/sam.h |
b5fc4494 FDN |
276 | %{_includedir}/corosync/quorum.h |
277 | %{_includedir}/corosync/votequorum.h | |
278 | %dir %{_includedir}/corosync/totem/ | |
b5fc4494 FDN |
279 | %{_includedir}/corosync/totem/totem.h |
280 | %{_includedir}/corosync/totem/totemip.h | |
281 | %{_includedir}/corosync/totem/totempg.h | |
e7734fab | 282 | %{_includedir}/corosync/totem/totemstats.h |
b5fc4494 FDN |
283 | %{_libdir}/libcfg.so |
284 | %{_libdir}/libcpg.so | |
7c250a51 | 285 | %{_libdir}/libcmap.so |
b5fc4494 | 286 | %{_libdir}/libtotem_pg.so |
b5fc4494 FDN |
287 | %{_libdir}/libquorum.so |
288 | %{_libdir}/libvotequorum.so | |
47ae82b0 | 289 | %{_libdir}/libsam.so |
40727bd6 | 290 | %{_libdir}/libcorosync_common.so |
b5fc4494 FDN |
291 | %{_libdir}/pkgconfig/*.pc |
292 | %{_mandir}/man3/cpg_*3* | |
601684d2 | 293 | %{_mandir}/man3/quorum_*3* |
b5fc4494 | 294 | %{_mandir}/man3/votequorum_*3* |
47ae82b0 | 295 | %{_mandir}/man3/sam_*3* |
c21f9573 | 296 | %{_mandir}/man3/cmap_*3* |
b5fc4494 FDN |
297 | |
298 | %changelog | |
b2400314 | 299 | * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@ |
b5fc4494 | 300 | - Autotools generated version |