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