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