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