]> git.proxmox.com Git - mirror_corosync.git/blob - corosync.spec.in
Remove objdb and confdb
[mirror_corosync.git] / corosync.spec.in
1 %global alphatag @alphatag@
2 %global numcomm @numcomm@
3 %global dirty @dirty@
4
5 # Conditionals
6 # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
7 # to disable or enable specific features
8 %bcond_with testagents
9 %bcond_with watchdog
10 %bcond_with monitoring
11 %bcond_with snmp
12 %bcond_with dbus
13 %bcond_with rdma
14 %bcond_with systemd
15 %bcond_with nss
16
17 Name: corosync
18 Summary: The Corosync Cluster Engine and Application Programming Interfaces
19 Version: @version@
20 Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
21 License: BSD
22 Group: System Environment/Base
23 URL: http://ftp.corosync.org
24 Source0: ftp://ftp:user@ftp.corosync.org/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
25
26 # Runtime bits
27 Requires: corosynclib = %{version}-%{release}
28 Requires(pre): /usr/sbin/useradd
29 Requires(post): /sbin/chkconfig
30 Requires(preun): /sbin/chkconfig
31 Conflicts: openais <= 0.89, openais-devel <= 0.89
32
33 # Build bits
34
35 %define buildtrunk 0
36 %{?_with_buildtrunk: %define buildtrunk 1}
37
38 BuildRequires: libqb-devel
39 %if %{buildtrunk}
40 BuildRequires: autoconf automake
41 %endif
42 %if %{with nss}
43 BuildRequires: nss-devel
44 %endif
45 %if %{with rdma}
46 BuildRequires: libibverbs-devel librdmacm-devel
47 %endif
48 %if %{with snmp}
49 BuildRequires: net-snmp-devel
50 %endif
51 %if %{with dbus}
52 BuildRequires: dbus-devel
53 %endif
54 %if %{with systemd}
55 BuildRequires: systemd-units
56 %endif
57
58 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
59
60 %prep
61 %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
62
63 %build
64 %if %{buildtrunk}
65 ./autogen.sh
66 %endif
67
68 %if %{with rdma}
69 export ibverbs_CFLAGS=-I/usr/include/infiniband \
70 export ibverbs_LIBS=-libverbs \
71 export rdmacm_CFLAGS=-I/usr/include/rdma \
72 export rdmacm_LIBS=-lrdmacm \
73 %endif
74 %{configure} \
75 %if %{with nss}
76 --enable-nss \
77 %else
78 --disable-nss \
79 %endif
80 %if %{with testagents}
81 --enable-testagents \
82 %endif
83 %if %{with watchdog}
84 --enable-watchdog \
85 %endif
86 %if %{with monitoring}
87 --enable-monitoring \
88 %endif
89 %if %{with snmp}
90 --enable-snmp \
91 %endif
92 %if %{with dbus}
93 --enable-dbus \
94 %endif
95 %if %{with rdma}
96 --enable-rdma \
97 %endif
98 %if %{with systemd}
99 --enable-systemd \
100 %endif
101 --with-initddir=%{_initrddir}
102
103 make %{_smp_mflags}
104
105 %install
106 rm -rf %{buildroot}
107
108 make install DESTDIR=%{buildroot}
109
110 %if %{with dbus}
111 mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
112 install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
113 %endif
114
115 ## tree fixup
116 # drop static libs
117 rm -f %{buildroot}%{_libdir}/*.a
118 # drop docs and html docs for now
119 rm -rf %{buildroot}%{_docdir}/*
120
121 %clean
122 rm -rf %{buildroot}
123
124 %description
125 This package contains the Corosync Cluster Engine Executive, several default
126 APIs and libraries, default configuration files, and an init script.
127
128 %post
129 if [ $1 -eq 1 ]; then
130 /sbin/chkconfig --add corosync || :
131 fi
132
133 %preun
134 if [ $1 -eq 0 ]; then
135 /sbin/service corosync stop &>/dev/null || :
136 /sbin/chkconfig --del corosync || :
137 fi
138
139 %files
140 %defattr(-,root,root,-)
141 %doc LICENSE SECURITY
142 %{_sbindir}/corosync
143 %{_sbindir}/corosync-keygen
144 %{_sbindir}/corosync-objctl
145 %{_sbindir}/corosync-cfgtool
146 %{_sbindir}/corosync-fplay
147 %{_sbindir}/corosync-pload
148 %{_sbindir}/corosync-cpgtool
149 %{_sbindir}/corosync-quorumtool
150 %{_sbindir}/corosync-notifyd
151 %{_bindir}/corosync-blackbox
152 %dir %{_sysconfdir}/corosync
153 %dir %{_sysconfdir}/corosync/service.d
154 %dir %{_sysconfdir}/corosync/uidgid.d
155 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
156 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
157 %if %{with dbus}
158 %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
159 %endif
160 %if %{with snmp}
161 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
162 %endif
163 %if %{with systemd}
164 %{_unitdir}/corosync.service
165 %{_unitdir}/corosync-notifyd.service
166 %else
167 %{_initrddir}/corosync
168 %{_initrddir}/corosync-notifyd
169 %endif
170 %dir %{_libexecdir}/lcrso
171 %{_libexecdir}/lcrso/coroparse.lcrso
172 %{_libexecdir}/lcrso/service_cfg.lcrso
173 %{_libexecdir}/lcrso/service_cpg.lcrso
174 %{_libexecdir}/lcrso/service_evs.lcrso
175 %{_libexecdir}/lcrso/service_cmap.lcrso
176 %{_libexecdir}/lcrso/service_pload.lcrso
177 %{_libexecdir}/lcrso/quorum_votequorum.lcrso
178 %{_libexecdir}/lcrso/quorum_testquorum.lcrso
179 %{_libexecdir}/lcrso/vsf_quorum.lcrso
180 %{_libexecdir}/lcrso/vsf_ykd.lcrso
181 %if %{with watchdog}
182 %{_libexecdir}/lcrso/service_wd.lcrso
183 %endif
184 %if %{with monitoring}
185 %{_libexecdir}/lcrso/service_mon.lcrso
186 %endif
187 %dir %{_localstatedir}/lib/corosync
188 %dir %{_localstatedir}/log/cluster
189 %{_mandir}/man8/corosync_overview.8*
190 %{_mandir}/man8/corosync.8*
191 %{_mandir}/man8/corosync-blackbox.8*
192 %{_mandir}/man8/corosync-objctl.8*
193 %{_mandir}/man8/corosync-keygen.8*
194 %{_mandir}/man8/corosync-cfgtool.8*
195 %{_mandir}/man8/corosync-cpgtool.8*
196 %{_mandir}/man8/corosync-fplay.8*
197 %{_mandir}/man8/corosync-pload.8*
198 %{_mandir}/man8/corosync-notifyd.8*
199 %{_mandir}/man8/corosync-quorumtool.8*
200 %{_mandir}/man5/corosync.conf.5*
201
202
203 # optional testagent rpm
204 #
205 %if %{with testagents}
206
207 %package -n corosync-testagents
208 Summary: The Corosync Cluster Engine Test Agents
209 Group: Development/Libraries
210 Requires: %{name} = %{version}-%{release}
211
212 %description -n corosync-testagents
213 This package contains corosync test agents.
214
215 %files -n corosync-testagents
216 %defattr(755,root,root,-)
217 %{_datadir}/corosync/tests/mem_leak_test.sh
218 %{_datadir}/corosync/tests/net_breaker.sh
219 %{_bindir}/cpg_test_agent
220 %{_bindir}/sam_test_agent
221 %{_bindir}/votequorum_test_agent
222 %{_libexecdir}/lcrso/service_syncv2.lcrso
223
224 %endif
225
226 # library
227 #
228 %package -n corosynclib
229 Summary: The Corosync Cluster Engine Libraries
230 Group: System Environment/Libraries
231 Requires: %{name} = %{version}-%{release}
232
233 %description -n corosynclib
234 This package contains corosync libraries.
235
236 %files -n corosynclib
237 %defattr(-,root,root,-)
238 %doc LICENSE
239 %{_libdir}/libcfg.so.*
240 %{_libdir}/libcpg.so.*
241 %{_libdir}/libcmap.so.*
242 %{_libdir}/libevs.so.*
243 %{_libdir}/libtotem_pg.so.*
244 %{_libdir}/liblogsys.so.*
245 %{_libdir}/libicmap.so.*
246 %{_libdir}/libquorum.so.*
247 %{_libdir}/libvotequorum.so.*
248 %{_libdir}/libpload.so.*
249 %{_libdir}/libsam.so.*
250
251 %post -n corosynclib -p /sbin/ldconfig
252
253 %postun -n corosynclib -p /sbin/ldconfig
254
255 %package -n corosynclib-devel
256 Summary: The Corosync Cluster Engine Development Kit
257 Group: Development/Libraries
258 Requires: corosynclib = %{version}-%{release}
259 Requires: pkgconfig
260 Provides: corosync-devel = %{version}
261 Obsoletes: corosync-devel < 0.92-7
262
263 %description -n corosynclib-devel
264 This package contains include files and man pages used to develop using
265 The Corosync Cluster Engine APIs.
266
267 %files -n corosynclib-devel
268 %defattr(-,root,root,-)
269 %doc LICENSE
270 %dir %{_includedir}/corosync/
271 %{_includedir}/corosync/cs_config.h
272 %{_includedir}/corosync/corodefs.h
273 %{_includedir}/corosync/cfg.h
274 %{_includedir}/corosync/cmap.h
275 %{_includedir}/corosync/corotypes.h
276 %{_includedir}/corosync/cpg.h
277 %{_includedir}/corosync/evs.h
278 %{_includedir}/corosync/hdb.h
279 %{_includedir}/corosync/list.h
280 %{_includedir}/corosync/mar_gen.h
281 %{_includedir}/corosync/sam.h
282 %{_includedir}/corosync/swab.h
283 %{_includedir}/corosync/quorum.h
284 %{_includedir}/corosync/votequorum.h
285 %dir %{_includedir}/corosync/totem/
286 %{_includedir}/corosync/totem/totem.h
287 %{_includedir}/corosync/totem/totemip.h
288 %{_includedir}/corosync/totem/totempg.h
289 %dir %{_includedir}/corosync/lcr/
290 %{_includedir}/corosync/lcr/lcr_ckpt.h
291 %{_includedir}/corosync/lcr/lcr_comp.h
292 %{_includedir}/corosync/lcr/lcr_ifact.h
293 %dir %{_includedir}/corosync/engine
294 %{_includedir}/corosync/engine/config.h
295 %{_includedir}/corosync/engine/coroapi.h
296 %{_includedir}/corosync/engine/logsys.h
297 %{_includedir}/corosync/engine/icmap.h
298 %{_includedir}/corosync/engine/quorum.h
299 %{_libdir}/libcfg.so
300 %{_libdir}/libcpg.so
301 %{_libdir}/libcmap.so
302 %{_libdir}/libevs.so
303 %{_libdir}/libtotem_pg.so
304 %{_libdir}/liblogsys.so
305 %{_libdir}/libquorum.so
306 %{_libdir}/libvotequorum.so
307 %{_libdir}/libpload.so
308 %{_libdir}/libsam.so
309 %{_libdir}/pkgconfig/*.pc
310 %{_mandir}/man3/cpg_*3*
311 %{_mandir}/man3/evs_*3*
312 %{_mandir}/man3/confdb_*3*
313 %{_mandir}/man3/votequorum_*3*
314 %{_mandir}/man3/sam_*3*
315 %{_mandir}/man8/cpg_overview.8*
316 %{_mandir}/man8/evs_overview.8*
317 %{_mandir}/man8/confdb_overview.8*
318 %{_mandir}/man8/votequorum_overview.8*
319 %{_mandir}/man8/sam_overview.8*
320
321 %changelog
322 * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
323 - Autotools generated version