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