]> git.pld-linux.org Git - packages/corosync.git/blob - corosync.spec
- PLD init scripts added (from corosync-1_4 branch)
[packages/corosync.git] / corosync.spec
1 #
2 # TODO:
3 #       - wait for openais compatible with corosync 2.0 before setting full Release
4 #
5 # Conditional build:
6 %bcond_with     apidocs         # build apidocs (man3 pages are provided anyway)
7 %bcond_without  dbus            # DBus events
8 %bcond_without  rdma            # RDMA support
9 %bcond_without  snmp            # SNMP protocol support
10 %bcond_with testagents
11 %bcond_with watchdog
12 %bcond_with monitoring
13 %bcond_with xmlconf
14 #
15 Summary:        Corosync - OSI Certified implementation of a complete cluster engine
16 Summary(pl.UTF-8):      Corosync - implementacja silnika klastrowego certyfikowana przez OSI
17 Name:           corosync
18 Version:        2.0.1
19 Release:        0.1
20 License:        BSD
21 Group:          Base
22 Source0:        ftp://ftp:downloads@corosync.org/downloads/%{name}-%{version}/corosync-%{version}.tar.gz
23 # Source0-md5:  9e23f3f5594676455ff39ff363658155
24 Source1:        %{name}.init
25 Source2:        %{name}-notifyd.init
26 Source3:        %{name}-notifyd.sysconfig
27 Patch0:         %{name}-makefile.patch
28 Patch1:         %{name}-lib_deps.patch
29 Patch2:         %{name}-install.patch
30 URL:            http://www.corosync.org/
31 BuildRequires:  autoconf >= 2.61
32 BuildRequires:  automake
33 %{?with_dbus:BuildRequires:     dbus-devel}
34 %{?with_apidocs:BuildRequires:  doxygen}
35 BuildRequires:  libqb-devel
36 %if %{with rdma}
37 BuildRequires:  libibverbs-devel
38 BuildRequires:  librdmacm-devel
39 %endif
40 %{?with_xmlconf:BuildRequires:  libxslt}
41 %{?with_snmp:BuildRequires:     net-snmp-devel}
42 BuildRequires:  nss-devel
43 BuildRequires:  pkgconfig
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 %patch0 -p1
121 %patch1 -p1
122 %patch2 -p1
123
124 %build
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 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
146 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
147 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
152
153 %{__make} install \
154         DESTDIR=$RPM_BUILD_ROOT
155
156 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
157
158 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
159         >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
160 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
161
162 %{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3}
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %post
168 /sbin/chkconfig --add %{name}
169 /sbin/chkconfig --add %{name}-notifyd
170 %service %{name} restart
171 %service %{name}-notifyd restart
172 %systemd_post %{name}.service
173 %systemd_post %{name}-notifyd.service
174
175 %preun
176 if [ "$1" = "0" ]; then
177         %service -q %{name} stop
178         /sbin/chkconfig --del %{name}
179         %service -q %{name}-notifyd stop
180         /sbin/chkconfig --del %{name}-notifyd
181 fi
182 %systemd_preun %{name}.service
183 %systemd_preun %{name}-notifyd.service
184
185 %postun
186 %systemd_reload
187
188 %post   libs -p /sbin/ldconfig
189 %postun libs -p /sbin/ldconfig
190
191 %files
192 %defattr(644,root,root,755)
193 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY TODO conf/corosync.conf.example*
194 %if %{with xmlconf}
195 %doc conf/corosync.xml.example*
196 %endif
197 %attr(754,root,root) /etc/rc.d/init.d/corosync
198 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
199 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
200 %dir %{_sysconfdir}/corosync
201 %{systemdunitdir}/corosync.service
202 %{systemdunitdir}/corosync-notifyd.service
203 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
204 %attr(755,root,root) %{_bindir}/corosync-blackbox
205 %attr(755,root,root) %{_sbindir}/corosync
206 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
207 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
208 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
209 %attr(755,root,root) %{_sbindir}/corosync-fplay
210 %attr(755,root,root) %{_sbindir}/corosync-keygen
211 %attr(755,root,root) %{_sbindir}/corosync-notifyd
212 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
213 %{_mandir}/man5/corosync.conf.5*
214 %{_mandir}/man8/corosync.8*
215 %{_mandir}/man8/corosync-blackbox.8*
216 %{_mandir}/man8/corosync-cmapctl.8*
217 %{_mandir}/man8/corosync-cfgtool.8*
218 %{_mandir}/man8/corosync-cpgtool.8*
219 %{_mandir}/man8/corosync-fplay.8*
220 %{_mandir}/man8/corosync-keygen.8*
221 %{_mandir}/man8/corosync-notifyd.8*
222 %{_mandir}/man8/corosync-quorumtool.8*
223 %if %{with xmlconf}
224 %attr(755,root,root) %{_bindir}/corosync-xmlproc
225 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
226 %dir %{_datadir}/corosync
227 %dir %{_datadir}/corosync/xml2conf.xsl
228 %{_mandir}/man8/corosync-xmlproc.8*
229 %{_mandir}/man5/corosync.xml.5*
230 %endif
231 %if %{with dbus}
232 /etc/dbus-1/system.d/corosync-signals.conf
233 %endif
234
235 %files libs
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
238 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
239 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
240 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
241 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
242 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
243 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
244 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
245 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
246 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
247 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
248 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
249 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
250 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
251 %attr(755,root,root) %{_libdir}/libvotequorum.so.5.*.*
252 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.5
253
254 %files devel
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/libcfg.so
257 %attr(755,root,root) %{_libdir}/libcmap.so
258 %attr(755,root,root) %{_libdir}/libcorosync_common.so
259 %attr(755,root,root) %{_libdir}/libcpg.so
260 %attr(755,root,root) %{_libdir}/libsam.so
261 %attr(755,root,root) %{_libdir}/libquorum.so
262 %attr(755,root,root) %{_libdir}/libtotem_pg.so
263 %attr(755,root,root) %{_libdir}/libvotequorum.so
264 %{_includedir}/corosync
265 %{_pkgconfigdir}/corosync.pc
266 %{_pkgconfigdir}/libcfg.pc
267 %{_pkgconfigdir}/libcmap.pc
268 %{_pkgconfigdir}/libcorosync_common.pc
269 %{_pkgconfigdir}/libcpg.pc
270 %{_pkgconfigdir}/libquorum.pc
271 %{_pkgconfigdir}/libsam.pc
272 %{_pkgconfigdir}/libtotem_pg.pc
273 %{_pkgconfigdir}/libvotequorum.pc
274 %{_mandir}/man3/cmap_*.3*
275 %{_mandir}/man3/cpg_*.3*
276 %{_mandir}/man3/quorum_*.3*
277 %{_mandir}/man3/sam_*.3*
278 %{_mandir}/man3/votequorum_*.3*
279 %{_mandir}/man5/votequorum.5*
280 # should be man7...
281 %{_mandir}/man8/cmap_keys.8*
282 %{_mandir}/man8/cmap_overview.8*
283 %{_mandir}/man8/corosync_overview.8*
284 %{_mandir}/man8/cpg_overview.8*
285 %{_mandir}/man8/sam_overview.8*
286 %{_mandir}/man8/votequorum_overview.8*
287 %{_mandir}/man8/quorum_overview.8*
288 %files static
289 %defattr(644,root,root,755)
290 %{_libdir}/libcfg.a
291 %{_libdir}/libcmap.a
292 %{_libdir}/libcorosync_common.a
293 %{_libdir}/libcpg.a
294 %{_libdir}/libsam.a
295 %{_libdir}/libquorum.a
296 %{_libdir}/libtotem_pg.a
297 %{_libdir}/libvotequorum.a
298
299 %if %{with snmp}
300 %files -n mibs-corosync
301 %defattr(644,root,root,755)
302 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
303 %endif
304
305 %if %{with testagents}
306 %files -n corosync-testagents
307 %defattr(644,root,root,755)
308 %{_datadir}/corosync/tests/mem_leak_test.sh
309 %{_datadir}/corosync/tests/net_breaker.sh
310 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
311 %{_datadir}/corosync/tests/shm_leak_audit.sh
312 %attr(755,root,root) %{_bindir}/cpg_test_agent
313 %attr(755,root,root) %{_bindir}/sam_test_agent
314 %attr(755,root,root) %{_bindir}/votequorum_test_agent
315 %endif
This page took 0.061579 seconds and 4 git commands to generate.