]> git.proxmox.com Git - mirror_corosync.git/blob - corosync.spec.in
Remove mar_gen.h from global header install since it is not needed
[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 %bcond_with xmlconf
17
18 Name: corosync
19 Summary: The Corosync Cluster Engine and Application Programming Interfaces
20 Version: @version@
21 Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
22 License: BSD
23 Group: System Environment/Base
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
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
34 # Build bits
35
36 %define buildtrunk 0
37 %{?_with_buildtrunk: %define buildtrunk 1}
38
39 BuildRequires: libqb-devel
40 %if %{buildtrunk}
41 BuildRequires: autoconf automake
42 %endif
43 %if %{with nss}
44 BuildRequires: nss-devel
45 %endif
46 %if %{with rdma}
47 BuildRequires: libibverbs-devel librdmacm-devel
48 %endif
49 %if %{with snmp}
50 BuildRequires: net-snmp-devel
51 %endif
52 %if %{with dbus}
53 BuildRequires: dbus-devel
54 %endif
55 %if %{with systemd}
56 BuildRequires: systemd-units
57 %endif
58 %if %{with xmlconf}
59 Requires: libxslt
60 %endif
61
62 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
63
64 %prep
65 %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
66
67 %build
68 %if %{buildtrunk}
69 ./autogen.sh
70 %endif
71
72 %if %{with rdma}
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 \
77 %endif
78 %{configure} \
79 %if %{with nss}
80 --enable-nss \
81 %else
82 --disable-nss \
83 %endif
84 %if %{with testagents}
85 --enable-testagents \
86 %endif
87 %if %{with watchdog}
88 --enable-watchdog \
89 %endif
90 %if %{with monitoring}
91 --enable-monitoring \
92 %endif
93 %if %{with snmp}
94 --enable-snmp \
95 %endif
96 %if %{with dbus}
97 --enable-dbus \
98 %endif
99 %if %{with rdma}
100 --enable-rdma \
101 %endif
102 %if %{with systemd}
103 --enable-systemd \
104 %endif
105 --with-initddir=%{_initrddir}
106
107 make %{_smp_mflags}
108
109 %install
110 rm -rf %{buildroot}
111
112 make install DESTDIR=%{buildroot}
113
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
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
128 %description
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
133 if [ $1 -eq 1 ]; then
134 /sbin/chkconfig --add corosync || :
135 fi
136
137 %preun
138 if [ $1 -eq 0 ]; then
139 /sbin/service corosync stop &>/dev/null || :
140 /sbin/chkconfig --del corosync || :
141 fi
142
143 %files
144 %defattr(-,root,root,-)
145 %doc LICENSE SECURITY
146 %{_sbindir}/corosync
147 %{_sbindir}/corosync-keygen
148 %{_sbindir}/corosync-cmapctl
149 %{_sbindir}/corosync-cfgtool
150 %{_sbindir}/corosync-fplay
151 %{_sbindir}/corosync-pload
152 %{_sbindir}/corosync-cpgtool
153 %{_sbindir}/corosync-quorumtool
154 %{_sbindir}/corosync-notifyd
155 %{_bindir}/corosync-blackbox
156 %if %{with xmlconf}
157 %{_bindir}/corosync-xmlproc
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*
163 %endif
164 %dir %{_sysconfdir}/corosync
165 %dir %{_sysconfdir}/corosync/uidgid.d
166 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
167 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
168 %if %{with dbus}
169 %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
170 %endif
171 %if %{with snmp}
172 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
173 %endif
174 %if %{with systemd}
175 %{_unitdir}/corosync.service
176 %{_unitdir}/corosync-notifyd.service
177 %else
178 %{_initrddir}/corosync
179 %{_initrddir}/corosync-notifyd
180 %endif
181 %dir %{_localstatedir}/lib/corosync
182 %dir %{_localstatedir}/log/cluster
183 %{_mandir}/man8/corosync_overview.8*
184 %{_mandir}/man8/corosync.8*
185 %{_mandir}/man8/corosync-blackbox.8*
186 %{_mandir}/man8/corosync-cmapctl.8*
187 %{_mandir}/man8/corosync-keygen.8*
188 %{_mandir}/man8/corosync-cfgtool.8*
189 %{_mandir}/man8/corosync-cpgtool.8*
190 %{_mandir}/man8/corosync-fplay.8*
191 %{_mandir}/man8/corosync-pload.8*
192 %{_mandir}/man8/corosync-notifyd.8*
193 %{_mandir}/man8/corosync-quorumtool.8*
194 %{_mandir}/man5/corosync.conf.5*
195 %{_mandir}/man5/votequorum.5*
196
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
214 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
215 %{_datadir}/corosync/tests/shm_leak_audit.sh
216 %{_bindir}/cpg_test_agent
217 %{_bindir}/sam_test_agent
218 %{_bindir}/votequorum_test_agent
219
220 %endif
221
222 # library
223 #
224 %package -n corosynclib
225 Summary: The Corosync Cluster Engine Libraries
226 Group: System Environment/Libraries
227 Requires: %{name} = %{version}-%{release}
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.*
237 %{_libdir}/libcmap.so.*
238 %{_libdir}/libevs.so.*
239 %{_libdir}/libtotem_pg.so.*
240 %{_libdir}/libquorum.so.*
241 %{_libdir}/libvotequorum.so.*
242 %{_libdir}/libpload.so.*
243 %{_libdir}/libsam.so.*
244
245 %post -n corosynclib -p /sbin/ldconfig
246
247 %postun -n corosynclib -p /sbin/ldconfig
248
249 %package -n corosynclib-devel
250 Summary: The Corosync Cluster Engine Development Kit
251 Group: Development/Libraries
252 Requires: corosynclib = %{version}-%{release}
253 Requires: pkgconfig
254 Provides: corosync-devel = %{version}
255 Obsoletes: corosync-devel < 0.92-7
256
257 %description -n corosynclib-devel
258 This package contains include files and man pages used to develop using
259 The Corosync Cluster Engine APIs.
260
261 %files -n corosynclib-devel
262 %defattr(-,root,root,-)
263 %doc LICENSE
264 %dir %{_includedir}/corosync/
265 %{_includedir}/corosync/cs_config.h
266 %{_includedir}/corosync/corodefs.h
267 %{_includedir}/corosync/cfg.h
268 %{_includedir}/corosync/cmap.h
269 %{_includedir}/corosync/corotypes.h
270 %{_includedir}/corosync/cpg.h
271 %{_includedir}/corosync/evs.h
272 %{_includedir}/corosync/hdb.h
273 %{_includedir}/corosync/list.h
274 %{_includedir}/corosync/sam.h
275 %{_includedir}/corosync/swab.h
276 %{_includedir}/corosync/quorum.h
277 %{_includedir}/corosync/votequorum.h
278 %dir %{_includedir}/corosync/totem/
279 %{_includedir}/corosync/totem/totem.h
280 %{_includedir}/corosync/totem/totemip.h
281 %{_includedir}/corosync/totem/totempg.h
282 %dir %{_includedir}/corosync/engine
283 %{_includedir}/corosync/engine/quorum.h
284 %{_libdir}/libcfg.so
285 %{_libdir}/libcpg.so
286 %{_libdir}/libcmap.so
287 %{_libdir}/libevs.so
288 %{_libdir}/libtotem_pg.so
289 %{_libdir}/libquorum.so
290 %{_libdir}/libvotequorum.so
291 %{_libdir}/libpload.so
292 %{_libdir}/libsam.so
293 %{_libdir}/pkgconfig/*.pc
294 %{_mandir}/man3/cpg_*3*
295 %{_mandir}/man3/evs_*3*
296 %{_mandir}/man3/quorum_*3*
297 %{_mandir}/man3/votequorum_*3*
298 %{_mandir}/man3/sam_*3*
299 %{_mandir}/man8/cpg_overview.8*
300 %{_mandir}/man8/evs_overview.8*
301 %{_mandir}/man8/votequorum_overview.8*
302 %{_mandir}/man8/sam_overview.8*
303 %{_mandir}/man3/cmap_*3*
304 %{_mandir}/man8/cmap_overview.8*
305
306 %changelog
307 * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
308 - Autotools generated version