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