[521] | 1 | Name: hdf |
---|
[9294] | 2 | Version: 4.2.10 |
---|
[521] | 3 | Release: 1%{?_dist_release} |
---|
| 4 | Summary: A general purpose library and file format for storing scientific data |
---|
[9294] | 5 | |
---|
[521] | 6 | License: BSD-ish |
---|
| 7 | Group: System Environment/Libraries |
---|
[9294] | 8 | URL: http://hdfgroup.org/products/hdf4/index.html |
---|
[521] | 9 | |
---|
[9294] | 10 | Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}-%{version}.tar.bz2 |
---|
| 11 | Patch0: hdf-4.2.5-maxavailfiles.patch |
---|
| 12 | Patch1: hdf-ppc.patch |
---|
| 13 | Patch2: hdf-4.2.4-sparc.patch |
---|
| 14 | Patch3: hdf-s390.patch |
---|
| 15 | Patch4: hdf-arm.patch |
---|
| 16 | # Support DESTDIR in install-examples |
---|
| 17 | Patch5: hdf-destdir.patch |
---|
| 18 | # Install examples into the right location |
---|
| 19 | Patch6: hdf-examplesdir.patch |
---|
| 20 | # Fix build with -Werror=format-security |
---|
| 21 | # https://bugzilla.redhat.com/show_bug.cgi?id=1037120 |
---|
| 22 | Patch7: hdf-format.patch |
---|
| 23 | # Add AArch64 definitions |
---|
| 24 | Patch8: hdf-4.2.10-aarch64.patch |
---|
| 25 | # ppc64le support |
---|
| 26 | # https://bugzilla.redhat.com/show_bug.cgi?id=1134385 |
---|
| 27 | Patch9: hdf-ppc64le.patch |
---|
| 28 | |
---|
[521] | 29 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[9294] | 30 | # For destdir/examplesdir patches |
---|
| 31 | BuildRequires: automake libtool |
---|
| 32 | BuildRequires: flex byacc libjpeg-turbo-devel zlib-devel |
---|
[521] | 33 | BuildRequires: gcc-gfortran |
---|
| 34 | |
---|
| 35 | %description |
---|
| 36 | HDF is a general purpose library and file format for storing scientific data. |
---|
| 37 | HDF can store two primary objects: datasets and groups. A dataset is |
---|
| 38 | essentially a multidimensional array of data elements, and a group is a |
---|
| 39 | structure for organizing objects in an HDF file. Using these two basic |
---|
| 40 | objects, one can create and store almost any kind of scientific data |
---|
| 41 | structure, such as images, arrays of vectors, and structured and unstructured |
---|
| 42 | grids. You can also mix and match them in HDF files according to your needs. |
---|
| 43 | |
---|
| 44 | %package devel |
---|
| 45 | Summary: HDF development files |
---|
| 46 | Group: Development/Libraries |
---|
| 47 | Requires: %{name} = %{version}-%{release} |
---|
[9294] | 48 | Requires: libjpeg-devel |
---|
| 49 | Requires: zlib-devel |
---|
[521] | 50 | |
---|
| 51 | %description devel |
---|
| 52 | HDF development headers and libraries. |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | %prep |
---|
[9294] | 56 | %setup -q |
---|
| 57 | %patch0 -p1 -b .maxavailfiles |
---|
[521] | 58 | %patch1 -p1 -b .ppc |
---|
[9294] | 59 | %patch5 -p1 -b .destdir |
---|
| 60 | %patch6 -p1 -b .examplesdir |
---|
| 61 | %patch7 -p1 -b .format |
---|
[521] | 62 | |
---|
| 63 | chmod a-x *hdf/*/*.c hdf/*/*.h |
---|
[9294] | 64 | # restore include file timestamps modified by patching |
---|
| 65 | touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h |
---|
[521] | 66 | |
---|
| 67 | |
---|
| 68 | %build |
---|
[9294] | 69 | # For destdir/examplesdir patches |
---|
| 70 | autoreconf -vif |
---|
| 71 | # avoid upstream compiler flags settings |
---|
[521] | 72 | rm config/*linux-gnu |
---|
| 73 | export CFLAGS="$RPM_OPT_FLAGS -fPIC" |
---|
[9294] | 74 | export FFLAGS="$RPM_OPT_FLAGS -fPIC -ffixed-line-length-none" |
---|
| 75 | %configure --disable-production --disable-netcdf \ |
---|
[521] | 76 | --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name} |
---|
[9294] | 77 | |
---|
[521] | 78 | make |
---|
[9294] | 79 | # correct the timestamps based on files used to generate the header files |
---|
| 80 | touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90 |
---|
| 81 | touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90 |
---|
| 82 | touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90 |
---|
| 83 | # netcdf fortran include need same treatement, but they are not shipped |
---|
[521] | 84 | |
---|
| 85 | %install |
---|
| 86 | rm -rf $RPM_BUILD_ROOT |
---|
[9294] | 87 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' |
---|
[521] | 88 | #Don't conflict with netcdf |
---|
[9294] | 89 | #rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc* |
---|
| 90 | for file in ncdump ncgen; do |
---|
| 91 | mv $RPM_BUILD_ROOT%{_bindir}/$file $RPM_BUILD_ROOT%{_bindir}/h$file |
---|
| 92 | # man pages are the same than netcdf ones |
---|
| 93 | rm $RPM_BUILD_ROOT%{_mandir}/man1/${file}.1 |
---|
| 94 | done |
---|
[521] | 95 | |
---|
[9294] | 96 | # this is done to have the same timestamp on multiarch setups |
---|
| 97 | touch -c -r README.txt $RPM_BUILD_ROOT/%{_includedir}/hdf/h4config.h |
---|
[521] | 98 | |
---|
[9294] | 99 | # Remove an autoconf conditional from the API that is unused and cause |
---|
| 100 | # the API to be different on x86 and x86_64 |
---|
| 101 | pushd $RPM_BUILD_ROOT/%{_includedir}/hdf |
---|
| 102 | grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp |
---|
| 103 | touch -c -r h4config.h h4config.h.tmp |
---|
| 104 | mv h4config.h.tmp h4config.h |
---|
| 105 | popd |
---|
| 106 | |
---|
[521] | 107 | %check |
---|
| 108 | make check |
---|
| 109 | |
---|
| 110 | %clean |
---|
| 111 | rm -rf $RPM_BUILD_ROOT |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | %files |
---|
| 115 | %defattr(-,root,root,0755) |
---|
[9294] | 116 | %doc COPYING MANIFEST README.txt release_notes/*.txt |
---|
[521] | 117 | %{_bindir}/* |
---|
| 118 | %{_mandir}/man1/*.gz |
---|
[9294] | 119 | %exclude %{_defaultdocdir}/%{name}/examples |
---|
[521] | 120 | |
---|
| 121 | %files devel |
---|
| 122 | %defattr(-,root,root,0755) |
---|
| 123 | %{_includedir}/%{name}/ |
---|
| 124 | %{_libdir}/%{name}/ |
---|
[9294] | 125 | %{_defaultdocdir}/%{name}/examples |
---|
[521] | 126 | |
---|
| 127 | |
---|
| 128 | %changelog |
---|
[9294] | 129 | * Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.10-1 |
---|
| 130 | - updated to 4.2.10 |
---|
| 131 | - built on current VineSeed |
---|
| 132 | |
---|
[521] | 133 | * Sat Oct 25 2008 Shu KONNO <owa@bg.wakwak.com> 4.2r2-1vl5 |
---|
| 134 | - applied new versioning policy |
---|
| 135 | |
---|
| 136 | * Fri Feb 01 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2r2-0vl1 |
---|
| 137 | - updated to 4.2r2 (imported patches from 4.2r2-2.fc8) |
---|
| 138 | |
---|
| 139 | * Thu Dec 20 2007 Shu KONNO <owa@bg.wakwak.com> 4.2r1-0vl2 |
---|
| 140 | - s/gcc-g77/gcc-gfortran/ |
---|
| 141 | |
---|
| 142 | * Sat Oct 22 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2r1-0vl1 |
---|
| 143 | - initial build for Vine Linux |
---|
| 144 | |
---|
| 145 | * Wed Oct 05 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-5 |
---|
| 146 | - Add Requires: libjpeg-devel zlib-devel to -devel package |
---|
| 147 | |
---|
| 148 | * Tue Aug 23 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-4 |
---|
| 149 | - Use -fPIC |
---|
| 150 | - Fix project URL |
---|
| 151 | |
---|
| 152 | * Fri Jul 29 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-3 |
---|
| 153 | - Exclude ppc/ppc64 - HDF does not recognize it |
---|
| 154 | |
---|
| 155 | * Wed Jul 20 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-2 |
---|
| 156 | - Fix BuildRequires to have autoconf |
---|
| 157 | |
---|
| 158 | * Fri Jul 15 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-1 |
---|
| 159 | - inital package for Fedora Extras |
---|