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