]> git.pld-linux.org Git - packages/hdf5.git/blob - hdf5.spec
- partial mpi bcond
[packages/hdf5.git] / hdf5.spec
1 # TODO:
2 # - finish (optional) MPI support (1.8.14: fails on mpi_file_open check)
3 # - check missing file
4 #
5 # Conditional build:
6 %bcond_without  fortran2003     # Fortran 2003 interface
7 %bcond_without  szip            # SZIP compression support
8 %bcond_with     mpi             # parallel version of library using MPI
9 #
10 Summary:        Hierarchical Data Format 5 library
11 Summary(pl.UTF-8):      Biblioteka HDF5 (Hierarchical Data Format 5)
12 Name:           hdf5
13 Version:        1.8.14
14 Release:        2
15 License:        Nearly BSD, but changed sources must be marked
16 Group:          Libraries
17 Source0:        ftp://ftp.hdfgroup.org/HDF5/current/src/%{name}-%{version}.tar.bz2
18 # Source0-md5:  719df6d46eea52e42dd97d59dcbf5311
19 Patch0:         %{name}-config.patch
20 Patch1:         %{name}-sig.patch
21 Patch2:         %{name}-cmake.patch
22 Patch3:         %{name}-link.patch
23 URL:            http://www.hdfgroup.org/HDF5/
24 BuildRequires:  autoconf >= 2.69
25 BuildRequires:  automake >= 1:1.11
26 BuildRequires:  gcc-fortran >= %{?with_fortran2003:6:4.2}%{!?with_fortran2003:5:4.0}
27 BuildRequires:  libjpeg-devel >= 6b
28 BuildRequires:  libstdc++-devel
29 BuildRequires:  libtool >= 2:2.2
30 %{?with_mpi:BuildRequires:      mpi-devel}
31 %{?with_szip:BuildRequires:     szip-devel >= 2.0}
32 BuildRequires:  zlib-devel >= 1.1.3
33 Obsoletes:      hdf5_hl
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 HDF5 is a completely new Hierarchical Data Format product consisting
38 of a data format specification and a supporting library
39 implementation. HDF5 is designed to address some of the limitations of
40 the older HDF product and to address current and anticipated
41 requirements of modern systems and applications.
42
43 %description -l pl.UTF-8
44 HDF5 jest całkowicie nowym produktem Hierarchiczego Formatu Danych,
45 składającym się ze specyfikacji formatu danych oraz obsługującej go
46 biblioteki. HDF5 został zaprojektowany aby pozbyć się ograniczeń
47 poprzedniego HDF oraz żeby zaspokoić bieżące i przyszłe potrzeby
48 współczesnych systemów i aplikacji.
49
50 %package devel
51 Summary:        HDF5 library development package
52 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki HDF5
53 Group:          Development/Libraries
54 Requires:       %{name} = %{version}-%{release}
55 %{?with_szip:Requires:  szip-devel >= 2.0}
56 Requires:       zlib-devel
57 Obsoletes:      hdf5_hl-devel
58 Obsoletes:      hdf5_hl-tutor
59
60 %description devel
61 Header files for HDF5 library and HDF5 documentation.
62
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe biblioteki HDF5 oraz dokumentacja HDF5.
65
66 %package static
67 Summary:        HDF5 static library
68 Summary(pl.UTF-8):      Statyczna biblioteka HDF5
69 Group:          Development/Libraries
70 Requires:       %{name}-devel = %{version}-%{release}
71 Obsoletes:      hdf5_hl-static
72
73 %description static
74 Static version of HDF5 library.
75
76 %description static -l pl.UTF-8
77 Statyczna wersja biblioteki HDF5.
78
79 %package c++
80 Summary:        C++ APIs for HDF5
81 Summary(pl.UTF-8):      API C++ bibliotek HDF5
82 Group:          Libraries
83 Requires:       %{name} = %{version}-%{release}
84
85 %description c++
86 C++ APIs for HDF5 (both base hdf5 and hdf5_hl).
87
88 %description c++ -l pl.UTF-8
89 API C++ dla bibliotek HDF5 (zarówno podstawowej hdf5, jak i hdf5_hl).
90
91 %package c++-devel
92 Summary:        Header files for HDF5 C++ APIs
93 Summary(pl.UTF-8):      Pliki nagłówkowe API C++ bibliotek HDF5
94 Group:          Development/Libraries
95 Requires:       %{name}-c++ = %{version}-%{release}
96 Requires:       %{name}-devel = %{version}-%{release}
97 Requires:       libstdc++-devel
98
99 %description c++-devel
100 Header files for HDF5 C++ APIs (both base hdf5 and hdf5_hl).
101
102 %description c++-devel -l pl.UTF-8
103 Pliki nagłówkowe API C++ bibliotek HDF5 (zarówno podstawowej hdf5, jak
104 i hdf5_hl).
105
106 %package c++-static
107 Summary:        C++ APIs for HDF5 - static libraries
108 Summary(pl.UTF-8):      API C++ bibliotek HDF5 - biblioteki statyczne
109 Group:          Development/Libraries
110 Requires:       %{name}-c++-devel = %{version}-%{release}
111
112 %description c++-static
113 C++ APIs for HDF5 (both base hdf5 and hdf5_hl) - static libraries.
114
115 %description c++-static -l pl.UTF-8
116 API C++ dla bibliotek HDF5 (zarówno podstawowej hdf5, jak i hdf5_hl) -
117 biblioteki statyczne.
118
119 %package fortran
120 Summary:        Fortran APIs for HDF5
121 Summary(pl.UTF-8):      API Fortran bibliotek HDF5
122 Group:          Libraries
123 Requires:       %{name} = %{version}-%{release}
124
125 %description fortran
126 Fortran APIs for HDF5 (both base hdf5 and hdf5_hl).
127
128 %description fortran -l pl.UTF-8
129 API Fortran dla bibliotek HDF5 (zarówno podstawowej hdf5, jak i
130 hdf5_hl).
131
132 %package fortran-devel
133 Summary:        Header files for HDF5 Fortran APIs
134 Summary(pl.UTF-8):      Pliki nagłówkowe API Fortran bibliotek HDF5
135 Group:          Development/Libraries
136 Requires:       %{name}-devel = %{version}-%{release}
137 Requires:       %{name}-fortran = %{version}-%{release}
138 Requires:       gcc-fortran >= %{?with_fortran2003:6:4.2}%{!?with_fortran2003:5:4.0}
139
140 %description fortran-devel
141 Module and header files for HDF5 Fortran APIs (both base hdf5 and
142 hdf5_hl).
143
144 %description fortran-devel -l pl.UTF-8
145 Moduły i pliki nagłówkowe API C++ bibliotek HDF5 (zarówno podstawowej
146 hdf5, jak i hdf5_hl).
147
148 %package fortran-static
149 Summary:        Fortran APIs for HDF5 - static libraries
150 Summary(pl.UTF-8):      API Fortran bibliotek HDF5 - biblioteki statyczne
151 Group:          Development/Libraries
152 Requires:       %{name}-fortran-devel = %{version}-%{release}
153
154 %description fortran-static
155 Fortran APIs for HDF5 (both base hdf5 and hdf5_hl) - static libraries.
156
157 %description fortran-static -l pl.UTF-8
158 API Fortran dla bibliotek HDF5 (zarówno podstawowej hdf5, jak i
159 hdf5_hl) - biblioteki statyczne.
160
161 %package progs
162 Summary:        HDF5 utilities
163 Summary(pl.UTF-8):      Narzędzia do plików HDF5
164 Group:          Applications/File
165 Requires:       %{name} = %{version}-%{release}
166
167 %description progs
168 Utilities to convert from/to HDF5 format.
169
170 %description progs -l pl.UTF-8
171 Narzędzia do konwersji z i to formatu HDF5.
172
173 %prep
174 %setup -q
175 %patch0 -p1
176 %patch1 -p1
177 %patch2 -p1
178 %patch3 -p1
179
180 %build
181 %{__libtoolize}
182 %{__aclocal}
183 %{__autoconf}
184 %{__autoheader}
185 %{__automake}
186 %configure \
187         --docdir=%{_docdir} \
188         --disable-silent-rules \
189         --enable-cxx \
190         --enable-fortran \
191         %{?with_fortran2003:--enable-fortran2003} \
192         --enable-linux-lfs \
193         %{?with_mpi:--enable-parallel --enable-unsupported} \
194         --enable-production \
195         --enable-shared \
196         --with-pthread \
197         %{?with_szip:--with-szlib}
198
199 #       --enable-threadsafe is incompatible with cxx/fortran
200
201 %{__make}
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT%{_includedir}
206
207 %{__make} install-recursive \
208         DESTDIR=$RPM_BUILD_ROOT
209
210 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/hl
211 %{__make} -C examples install-examples \
212         EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c \
213         EXAMPLETOPDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
214 %{__make} -C c++/examples install-examples \
215         EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c++
216 %{__make} -C hl/examples install-examples \
217         EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/hl/c \
218         EXAMPLETOPDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/hl
219 %{__make} -C hl/c++/examples install-examples \
220         EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/hl/c++
221
222 install -d $RPM_BUILD_ROOT%{_datadir}/cmake/hdf5
223 vmajor=$(sed -ne 's/^#define H5_VERS_MAJOR\s*\([0-9]\+\).*/\1/p' src/H5public.h)
224 vminor=$(sed -ne 's/^#define H5_VERS_MINOR\s*\([0-9]\+\).*/\1/p' src/H5public.h)
225 vrel=$(sed -ne 's/^#define H5_VERS_RELEASE\s*\([0-9]\+\).*/\1/p' src/H5public.h)
226 vsubr=$(sed -ne 's/^#define H5_VERS_SUBRELEASE\s*\([^ \t]\+\).*/\1/p' src/H5public.h)
227 for f in FindHDF5.cmake hdf5-config-version.cmake hdf5-config.cmake.install hdf5-targets.cmake hdf5-targets-noconfig.cmake ; do
228         sed -e 's,@HDF5_PACKAGE@,hdf5,' \
229             -e 's,@HDF_PACKAGE_EXT@,,' \
230             -e "s,@HDF5_VERSION_STRING@,%{version}," \
231             -e "s,@HDF5_VERSION_MAJOR@,1.8," \
232             -e "s,@HDF5_VERSION_MINOR@,$vrel," \
233             -e "s,@H5_VERS_MAJOR@,$vmajor," \
234             -e "s,@H5_VERS_MINOR@,$vminor," \
235             -e "s,@H5_VERS_RELEASE@,$vrel," \
236             -e "s,@H5_VERS_SUBRELEASE@,$vsubr," \
237             -e 's,@HDF5_ENABLE_PARALLEL@,OFF,' \
238             -e 's,@HDF5_BUILD_FORTRAN@,ON,' \
239             -e 's,@HDF5_ENABLE_F2003@,%{?with_fortran2003:ON}%{!?with_fortran2003:OFF},' \
240             -e 's,@HDF5_BUILD_CPP_LIB@,ON,' \
241             -e 's,@HDF5_BUILD_TOOLS@,ON,' \
242             -e 's,@HDF5_BUILD_HL_LIB@,ON,' \
243             -e 's,@HDF5_ENABLE_Z_LIB_SUPPORT@,ON,' \
244             -e 's,@HDF5_ENABLE_SZIP_SUPPORT@,%{?with_szip:ON}%{!?with_szip:OFF},' \
245             -e 's,@HDF5_ENABLE_SZIP_ENCODING@,%{?with_szip:ON}%{!?with_szip:OFF},' \
246             -e 's,@BUILD_SHARED_LIBS@,ON,' \
247             -e 's,@HDF5_PACKAGE_EXTLIBS@,OFF,' \
248             -e 's,@ZLIB_PACKAGE_NAME@,zlib,' \
249             -e 's,@SZIP_PACKAGE_NAME@,szip,' \
250             -e 's,@HDF5_LIBRARIES_TO_EXPORT@,hdf5,' \
251             -e "s,@lib@,%{_lib}," \
252                 config/cmake/${f}.in > $RPM_BUILD_ROOT%{_datadir}/cmake/hdf5/$f
253 done
254 mv $RPM_BUILD_ROOT%{_datadir}/cmake/hdf5/hdf5-config.cmake{.install,}
255
256 %clean
257 rm -rf $RPM_BUILD_ROOT
258
259 %post   -p /sbin/ldconfig
260 %postun -p /sbin/ldconfig
261
262 %post   c++ -p /sbin/ldconfig
263 %postun c++ -p /sbin/ldconfig
264
265 %post   fortran -p /sbin/ldconfig
266 %postun fortran -p /sbin/ldconfig
267
268 %files
269 %defattr(644,root,root,755)
270 %doc COPYING README.txt release_docs/{HISTORY*.txt,RELEASE.txt}
271 %attr(755,root,root) %{_libdir}/libhdf5.so.*.*.*
272 %attr(755,root,root) %ghost %{_libdir}/libhdf5.so.9
273 %attr(755,root,root) %{_libdir}/libhdf5_hl.so.*.*.*
274 %attr(755,root,root) %ghost %{_libdir}/libhdf5_hl.so.9
275 # used to show configuration at runtime
276 %{_libdir}/libhdf5.settings
277
278 %files devel
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_bindir}/h5cc
281 %attr(755,root,root) %{_libdir}/libhdf5.so
282 %attr(755,root,root) %{_libdir}/libhdf5_hl.so
283 %{_libdir}/libhdf5.la
284 %{_libdir}/libhdf5_hl.la
285 %{_includedir}/H5ACpublic.h
286 %{_includedir}/H5Apublic.h
287 %{_includedir}/H5Cpublic.h
288 %{_includedir}/H5DOpublic.h
289 %{_includedir}/H5DSpublic.h
290 %{_includedir}/H5Dpublic.h
291 %{_includedir}/H5Epubgen.h
292 %{_includedir}/H5Epublic.h
293 %{_includedir}/H5FDcore.h
294 %{_includedir}/H5FDdirect.h
295 %{_includedir}/H5FDfamily.h
296 %{_includedir}/H5FDlog.h
297 %{_includedir}/H5FDmpi.h
298 %{_includedir}/H5FDmpio.h
299 %{_includedir}/H5FDmulti.h
300 %{_includedir}/H5FDpublic.h
301 %{_includedir}/H5FDsec2.h
302 %{_includedir}/H5FDstdio.h
303 %{_includedir}/H5Fpublic.h
304 %{_includedir}/H5Gpublic.h
305 %{_includedir}/H5IMpublic.h
306 %{_includedir}/H5Include.h
307 %{_includedir}/H5Ipublic.h
308 %{_includedir}/H5LTpublic.h
309 %{_includedir}/H5Lpublic.h
310 %{_includedir}/H5MMpublic.h
311 %{_includedir}/H5Opublic.h
312 %{_includedir}/H5PTpublic.h
313 %{_includedir}/H5Ppublic.h
314 %{_includedir}/H5PLextern.h
315 %{_includedir}/H5Rpublic.h
316 %{_includedir}/H5Spublic.h
317 %{_includedir}/H5TBpublic.h
318 %{_includedir}/H5Tpublic.h
319 %{_includedir}/H5Zpublic.h
320 %{_includedir}/H5api_adpt.h
321 %{_includedir}/H5overflow.h
322 %{_includedir}/H5pubconf.h
323 %{_includedir}/H5public.h
324 %{_includedir}/H5version.h
325 %{_includedir}/hdf5.h
326 %{_includedir}/hdf5_hl.h
327
328 %{_datadir}/cmake/hdf5
329 %dir %{_examplesdir}/%{name}-%{version}
330 %{_examplesdir}/%{name}-%{version}/README
331 %{_examplesdir}/%{name}-%{version}/run-all-ex.sh
332 %{_examplesdir}/%{name}-%{version}/c
333 %dir %{_examplesdir}/%{name}-%{version}/hl
334 %{_examplesdir}/%{name}-%{version}/hl/run-hl-ex.sh
335 %{_examplesdir}/%{name}-%{version}/hl/c
336
337 %files static
338 %defattr(644,root,root,755)
339 %{_libdir}/libhdf5.a
340 %{_libdir}/libhdf5_hl.a
341
342 %files c++
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/libhdf5_cpp.so.*.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libhdf5_cpp.so.9
346 %attr(755,root,root) %{_libdir}/libhdf5_hl_cpp.so.*.*.*
347 %attr(755,root,root) %ghost %{_libdir}/libhdf5_hl_cpp.so.9
348
349 %files c++-devel
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_bindir}/h5c++
352 %attr(755,root,root) %{_libdir}/libhdf5_cpp.so
353 %attr(755,root,root) %{_libdir}/libhdf5_hl_cpp.so
354 %{_libdir}/libhdf5_cpp.la
355 %{_libdir}/libhdf5_hl_cpp.la
356 %{_includedir}/H5AbstractDs.h
357 %{_includedir}/H5ArrayType.h
358 %{_includedir}/H5AtomType.h
359 %{_includedir}/H5Attribute.h
360 %{_includedir}/H5Classes.h
361 %{_includedir}/H5CommonFG.h
362 %{_includedir}/H5CompType.h
363 %{_includedir}/H5Cpp.h
364 %{_includedir}/H5CppDoc.h
365 %{_includedir}/H5DataSet.h
366 %{_includedir}/H5DataSpace.h
367 %{_includedir}/H5DataType.h
368 %{_includedir}/H5DcreatProp.h
369 %{_includedir}/H5DxferProp.h
370 %{_includedir}/H5EnumType.h
371 %{_includedir}/H5Exception.h
372 %{_includedir}/H5FaccProp.h
373 %{_includedir}/H5FcreatProp.h
374 %{_includedir}/H5File.h
375 %{_includedir}/H5FloatType.h
376 %{_includedir}/H5Group.h
377 %{_includedir}/H5IdComponent.h
378 %{_includedir}/H5IntType.h
379 %{_includedir}/H5Library.h
380 %{_includedir}/H5Location.h
381 %{_includedir}/H5Object.h
382 %{_includedir}/H5PacketTable.h
383 %{_includedir}/H5PredType.h
384 %{_includedir}/H5PropList.h
385 %{_includedir}/H5StrType.h
386 %{_includedir}/H5VarLenType.h
387 %{_examplesdir}/%{name}-%{version}/c++
388 %{_examplesdir}/%{name}-%{version}/hl/c++
389
390 %files c++-static
391 %defattr(644,root,root,755)
392 %{_libdir}/libhdf5_cpp.a
393 %{_libdir}/libhdf5_hl_cpp.a
394
395 %files fortran
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/libhdf5_fortran.so.*.*.*
398 %attr(755,root,root) %ghost %{_libdir}/libhdf5_fortran.so.9
399 %attr(755,root,root) %{_libdir}/libhdf5hl_fortran.so.*.*.*
400 %attr(755,root,root) %ghost %{_libdir}/libhdf5hl_fortran.so.9
401
402 %files fortran-devel
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_bindir}/h5fc
405 %attr(755,root,root) %{_libdir}/libhdf5_fortran.so
406 %attr(755,root,root) %{_libdir}/libhdf5hl_fortran.so
407 %{_libdir}/libhdf5_fortran.la
408 %{_libdir}/libhdf5hl_fortran.la
409 %{_includedir}/H5f90i.h
410 %{_includedir}/H5f90i_gen.h
411 %{_includedir}/h5_dble_interface.mod
412 %{_includedir}/h5a.mod
413 %{_includedir}/h5a_provisional.mod
414 %{_includedir}/h5d.mod
415 %{_includedir}/h5d_provisional.mod
416 %{_includedir}/h5ds.mod
417 %{_includedir}/h5e.mod
418 %{_includedir}/h5e_provisional.mod
419 %{_includedir}/h5f.mod
420 %{_includedir}/h5f_provisional.mod
421 %{_includedir}/h5fortran_types.mod
422 %{_includedir}/h5g.mod
423 %{_includedir}/h5global.mod
424 %{_includedir}/h5i.mod
425 %{_includedir}/h5im.mod
426 %{_includedir}/h5l.mod
427 %{_includedir}/h5l_provisional.mod
428 %{_includedir}/h5lib.mod
429 %{_includedir}/h5lib_provisional.mod
430 %{_includedir}/h5lt.mod
431 %{_includedir}/h5o.mod
432 %{_includedir}/h5o_provisional.mod
433 %{_includedir}/h5p.mod
434 %{_includedir}/h5p_provisional.mod
435 %{_includedir}/h5r.mod
436 %{_includedir}/h5r_provisional.mod
437 %{_includedir}/h5s.mod
438 %{_includedir}/h5t.mod
439 %{_includedir}/h5t_provisional.mod
440 %{_includedir}/h5tb.mod
441 %{_includedir}/h5test_kind_storage_size_mod.mod
442 %{_includedir}/h5z.mod
443 %{_includedir}/hdf5.mod
444
445 %files fortran-static
446 %defattr(644,root,root,755)
447 %{_libdir}/libhdf5_fortran.a
448 %{_libdir}/libhdf5hl_fortran.a
449
450 %files progs
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_bindir}/gif2h5
453 %attr(755,root,root) %{_bindir}/h52gif
454 %attr(755,root,root) %{_bindir}/h5copy
455 %attr(755,root,root) %{_bindir}/h5debug
456 %attr(755,root,root) %{_bindir}/h5diff
457 %attr(755,root,root) %{_bindir}/h5dump
458 %attr(755,root,root) %{_bindir}/h5import
459 %attr(755,root,root) %{_bindir}/h5jam
460 %attr(755,root,root) %{_bindir}/h5ls
461 %attr(755,root,root) %{_bindir}/h5mkgrp
462 %attr(755,root,root) %{_bindir}/h5perf_serial
463 %attr(755,root,root) %{_bindir}/h5redeploy
464 %attr(755,root,root) %{_bindir}/h5repack
465 %attr(755,root,root) %{_bindir}/h5repart
466 %attr(755,root,root) %{_bindir}/h5stat
467 %attr(755,root,root) %{_bindir}/h5unjam
This page took 0.096865 seconds and 3 git commands to generate.