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