]> git.pld-linux.org Git - packages/corosync.git/blob - corosync.spec
add static_libs bcond
[packages/corosync.git] / corosync.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # build apidocs (some man3 pages are provided anyway)
4 %bcond_without  augeas          # augeas lens support
5 %bcond_without  dbus            # DBus events
6 %bcond_without  rdma            # RDMA support
7 %bcond_without  snmp            # SNMP protocol support
8 %bcond_without  testagents      # test agents build
9 %bcond_without  watchdog        # watchdog support
10 %bcond_without  monitoring      # resource monitoring
11 %bcond_with     qdevices        # Quorum devices support [NOP as of 2.3.1]
12 %bcond_without  xmlconf         # XML configuration support
13 #
14 Summary:        Corosync - OSI Certified implementation of a complete cluster engine
15 Summary(pl.UTF-8):      Corosync - implementacja silnika klastrowego certyfikowana przez OSI
16 Name:           corosync
17 Version:        2.4.2
18 Release:        1
19 License:        BSD
20 Group:          Base
21 #Source0Download: http://corosync.org/download/
22 Source0:        http://build.clusterlabs.org/corosync/releases/%{name}-%{version}.tar.gz
23 # Source0-md5:  547fa78704da53aa35912be58d31035f
24 Source1:        %{name}.init
25 Source2:        %{name}-notifyd.init
26 Source3:        %{name}-notifyd.sysconfig
27 URL:            http://www.corosync.org/
28 BuildRequires:  autoconf >= 2.61
29 BuildRequires:  automake >= 1:1.11
30 %{?with_dbus:BuildRequires:     dbus-devel}
31 %{?with_apidocs:BuildRequires:  doxygen}
32 %{?with_apidocs:BuildRequires:  graphviz}
33 BuildRequires:  groff
34 BuildRequires:  libqb-devel
35 %{?with_monitoring:BuildRequires:       libstatgrab-devel}
36 %if %{with rdma}
37 BuildRequires:  libibverbs-devel
38 BuildRequires:  librdmacm-devel
39 %endif
40 BuildRequires:  libtool >= 2:2.2.6
41 %{?with_snmp:BuildRequires:     net-snmp-devel}
42 BuildRequires:  nss-devel
43 BuildRequires:  pkgconfig
44 BuildRequires:  rpmbuild(macros) >= 1.644
45 # only for cpghum test program
46 #BuildRequires: zlib-devel
47 %{?with_xmlconf:Requires:       libxslt-progs}
48 Requires:       rc-scripts
49 Requires:       systemd-units >= 38
50 Requires(post,preun):   /sbin/chkconfig
51 Requires:       %{name}-libs = %{version}-%{release}
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 # short_service_name_get() is defined in executable
55 %define         skip_post_check_so      libcoroipcs\.so.*
56
57 %description
58 The Corosync Cluster Engine is an OSI Certified implementation of a
59 complete cluster engine.
60
61 %description -l pl.UTF-8
62 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
63 certyfikowana przez OSI.
64
65 %package libs
66 Summary:        Corosync Cluster Engine libraries
67 Summary(pl.UTF-8):      Biblioteki silnika klastrowego Corosync
68 Group:          Libraries
69
70 %description libs
71 This package contains the libraries of Corosync Cluster Engine, an OSI
72 Certified implementation of a complete cluster engine.
73
74 %description libs -l pl.UTF-8
75 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
76 silnika klastrowego certyfikowanego przez OSI.
77
78 %package devel
79 Summary:        Header files for Corosync libraries
80 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Corosync
81 Group:          Development/Libraries
82 Requires:       %{name}-libs = %{version}-%{release}
83 Conflicts:      openais-devel < 1.0
84
85 %description devel
86 This package contains the include files used to develop using Corosync
87 APIs.
88
89 %description devel -l pl.UTF-8
90 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
91 użyciem API Corosync.
92
93 %package static
94 Summary:        Corosync static libraries
95 Summary(pl.UTF-8):      Statyczne biblioteki Corosync
96 Group:          Development/Libraries
97 Requires:       %{name}-devel = %{version}-%{release}
98
99 %description static
100 This package contains the Corosync static libraries.
101
102 %description static -l pl.UTF-8
103 Ten pakiet zawiera statyczne biblioteki Corosync.
104
105 %package testagents
106 Summary:        The Corosync Cluster Engine test agents
107 Summary(pl.UTF-8):      Testowi agenci silnika klastrowego Corosync
108 Group:          Development/Libraries
109 Requires:       %{name} = %{version}-%{release}
110
111 %description testagents
112 This package contains Corosync test agents.
113
114 %description testagents -l pl.UTF-8
115 Ten pakiet zawiera testowych agentów silnika Corosync.
116
117 %package -n mibs-corosync
118 Summary:        Corosync SNMP MIB data
119 Summary(pl.UTF-8):      Dane SNMP MIB dla Corosync
120 Group:          Applications/System
121 Requires:       mibs-dirs
122
123 %description -n mibs-corosync
124 Corosync SNMP MIB data.
125
126 %description -n mibs-corosync -l pl.UTF-8
127 Dane SNMP MIB dla Corosync.
128
129 %prep
130 %setup -q
131
132 %build
133 %{__libtoolize}
134 %{__aclocal}
135 %{__autoconf}
136 %{__autoheader}
137 %{__automake}
138 %configure \
139         %{?with_augeas:--enable-augeas} \
140         %{?with_dbus:--enable-dbus} \
141         %{?with_monitoring:--enable-monitoring} \
142         %{?with_qdevices:--enable-qdevices} \
143         %{?with_rdma:--enable-rdma} \
144         --disable-silent-rules \
145         %{?with_snmp:--enable-snmp} \
146         --enable-systemd \
147         %{?with_testagents:--enable-testagents} \
148         %{?with_watchdog:--enable-watchdog} \
149         %{?with_xmlconf:--enable-xmlconf} \
150         --with-initddir=/etc/rc.d/init.d \
151         --with-systemddir=%{systemdunitdir}
152
153 %{__make}
154
155 %{?with_apidocs:%{__make} doxygen}
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
160 install -d $RPM_BUILD_ROOT/var/log/cluster
161
162 %{__make} install \
163         mibdir=%{_datadir}/mibs \
164         DESTDIR=$RPM_BUILD_ROOT
165
166 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
167
168 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
169         >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
170 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
171
172 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
173 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
174 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
175
176 # obsoleted by pkg-config
177 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post
183 /sbin/chkconfig --add %{name}
184 /sbin/chkconfig --add %{name}-notifyd
185 %service %{name}-notifyd restart
186 %systemd_post %{name}-notifyd.service
187 export NORESTART=1
188 %systemd_post %{name}.service
189
190 %preun
191 if [ "$1" = "0" ]; then
192         %service -q %{name} stop
193         /sbin/chkconfig --del %{name}
194         %service -q %{name}-notifyd stop
195         /sbin/chkconfig --del %{name}-notifyd
196 fi
197 %systemd_preun %{name}.service
198 %systemd_preun %{name}-notifyd.service
199
200 %postun
201 %systemd_reload
202
203 %post   libs -p /sbin/ldconfig
204 %postun libs -p /sbin/ldconfig
205
206 %files
207 %defattr(644,root,root,755)
208 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
209 %if %{with xmlconf}
210 %doc conf/corosync.xml.example*
211 %endif
212 %attr(754,root,root) /etc/rc.d/init.d/corosync
213 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
214 %verify(not md5 mtime size) %config(noreplace) /etc/logrotate.d/%{name}
215 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
216 %dir %{_sysconfdir}/corosync
217 %{systemdunitdir}/corosync.service
218 %{systemdunitdir}/corosync-notifyd.service
219 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
220 %attr(755,root,root) %{_bindir}/corosync-blackbox
221 %attr(755,root,root) %{_sbindir}/corosync
222 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
223 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
224 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
225 %attr(755,root,root) %{_sbindir}/corosync-keygen
226 %attr(755,root,root) %{_sbindir}/corosync-notifyd
227 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
228 %{_mandir}/man5/corosync.conf.5*
229 %{_mandir}/man5/votequorum.5*
230 %{_mandir}/man8/corosync.8*
231 %{_mandir}/man8/corosync-blackbox.8*
232 %{_mandir}/man8/corosync-cmapctl.8*
233 %{_mandir}/man8/corosync-cfgtool.8*
234 %{_mandir}/man8/corosync-cpgtool.8*
235 %{_mandir}/man8/corosync-keygen.8*
236 %{_mandir}/man8/corosync-notifyd.8*
237 %{_mandir}/man8/corosync-quorumtool.8*
238 # should be man7...
239 %{_mandir}/man8/cmap_keys.8*
240 %{_mandir}/man8/cmap_overview.8*
241 %{_mandir}/man8/corosync_overview.8*
242 %{_mandir}/man8/cpg_overview.8*
243 %{_mandir}/man8/sam_overview.8*
244 %{_mandir}/man8/votequorum_overview.8*
245 %{_mandir}/man8/quorum_overview.8*
246 %dir %{_datadir}/corosync
247 %attr(755,root,root) %{_datadir}/%{name}/corosync
248 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
249 %if %{with xmlconf}
250 %attr(755,root,root) %{_bindir}/corosync-xmlproc
251 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
252 %dir %{_datadir}/corosync/xml2conf.xsl
253 %{_mandir}/man8/corosync-xmlproc.8*
254 %{_mandir}/man5/corosync.xml.5*
255 %endif
256 %if %{with augeas}
257 %{_datadir}/augeas/lenses/corosync.aug
258 %{_datadir}/augeas/lenses/tests/test_corosync.aug
259 %endif
260 %if %{with dbus}
261 /etc/dbus-1/system.d/corosync-signals.conf
262 %endif
263 /var/lib/corosync
264 %attr(700,root,root) %dir /var/log/cluster
265
266 %files libs
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
269 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
270 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
271 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
272 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
273 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
274 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
275 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
276 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
277 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
278 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
279 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
280 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
281 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
282 %attr(755,root,root) %{_libdir}/libvotequorum.so.8.*.*
283 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.8
284
285 %files devel
286 %defattr(644,root,root,755)
287 %{?with_apidocs:%doc doc/api/html/*}
288 %attr(755,root,root) %{_libdir}/libcfg.so
289 %attr(755,root,root) %{_libdir}/libcmap.so
290 %attr(755,root,root) %{_libdir}/libcorosync_common.so
291 %attr(755,root,root) %{_libdir}/libcpg.so
292 %attr(755,root,root) %{_libdir}/libsam.so
293 %attr(755,root,root) %{_libdir}/libquorum.so
294 %attr(755,root,root) %{_libdir}/libtotem_pg.so
295 %attr(755,root,root) %{_libdir}/libvotequorum.so
296 %{_includedir}/corosync
297 %{_pkgconfigdir}/corosync.pc
298 %{_pkgconfigdir}/libcfg.pc
299 %{_pkgconfigdir}/libcmap.pc
300 %{_pkgconfigdir}/libcorosync_common.pc
301 %{_pkgconfigdir}/libcpg.pc
302 %{_pkgconfigdir}/libquorum.pc
303 %{_pkgconfigdir}/libsam.pc
304 %{_pkgconfigdir}/libtotem_pg.pc
305 %{_pkgconfigdir}/libvotequorum.pc
306 %{_mandir}/man3/cmap_*.3*
307 %{_mandir}/man3/cpg_*.3*
308 %{_mandir}/man3/quorum_*.3*
309 %{_mandir}/man3/sam_*.3*
310 %{_mandir}/man3/votequorum_*.3*
311
312 %files static
313 %defattr(644,root,root,755)
314 %{_libdir}/libcfg.a
315 %{_libdir}/libcmap.a
316 %{_libdir}/libcorosync_common.a
317 %{_libdir}/libcpg.a
318 %{_libdir}/libsam.a
319 %{_libdir}/libquorum.a
320 %{_libdir}/libtotem_pg.a
321 %{_libdir}/libvotequorum.a
322
323 %if %{with testagents}
324 %files testagents
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{_bindir}/cpg_test_agent
327 %attr(755,root,root) %{_bindir}/sam_test_agent
328 %attr(755,root,root) %{_bindir}/votequorum_test_agent
329 %dir %{_datadir}/corosync/tests
330 %{_datadir}/corosync/tests/mem_leak_test.sh
331 %{_datadir}/corosync/tests/net_breaker.sh
332 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
333 %{_datadir}/corosync/tests/shm_leak_audit.sh
334 %endif
335
336 %if %{with snmp}
337 %files -n mibs-corosync
338 %defattr(644,root,root,755)
339 %{_datadir}/mibs/COROSYNC-MIB.txt
340 %endif
This page took 0.157131 seconds and 3 git commands to generate.