source: projects/specs/trunk/h/hdf/hdf-vl.spec @ 9294

Revision 9294, 4.8 KB checked in by inagaki, 7 years ago (diff)

2015-01-26 Ryoichi INAGAKI <ryo1@…>

  • hdf: updated
  • tcl, tk: split development files into devel subpackage


Line 
1Name: hdf
2Version: 4.2.10
3Release: 1%{?_dist_release}
4Summary: A general purpose library and file format for storing scientific data
5
6License: BSD-ish
7Group: System Environment/Libraries
8URL: http://hdfgroup.org/products/hdf4/index.html
9
10Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}-%{version}.tar.bz2
11Patch0: hdf-4.2.5-maxavailfiles.patch
12Patch1: hdf-ppc.patch
13Patch2: hdf-4.2.4-sparc.patch
14Patch3: hdf-s390.patch
15Patch4: hdf-arm.patch
16# Support DESTDIR in install-examples
17Patch5: hdf-destdir.patch
18# Install examples into the right location
19Patch6: hdf-examplesdir.patch
20# Fix build with -Werror=format-security
21# https://bugzilla.redhat.com/show_bug.cgi?id=1037120
22Patch7: hdf-format.patch
23# Add AArch64 definitions
24Patch8: hdf-4.2.10-aarch64.patch
25# ppc64le support
26# https://bugzilla.redhat.com/show_bug.cgi?id=1134385
27Patch9: hdf-ppc64le.patch
28
29BuildRoot: %{_tmppath}/%{name}-%{version}-root
30# For destdir/examplesdir patches
31BuildRequires: automake libtool
32BuildRequires: flex byacc libjpeg-turbo-devel zlib-devel
33BuildRequires: gcc-gfortran
34
35%description
36HDF is a general purpose library and file format for storing scientific data.
37HDF can store two primary objects: datasets and groups. A dataset is
38essentially a multidimensional array of data elements, and a group is a
39structure for organizing objects in an HDF file. Using these two basic
40objects, one can create and store almost any kind of scientific data
41structure, such as images, arrays of vectors, and structured and unstructured
42grids. You can also mix and match them in HDF files according to your needs.
43
44%package devel
45Summary: HDF development files
46Group: Development/Libraries
47Requires: %{name} = %{version}-%{release}
48Requires: libjpeg-devel
49Requires: zlib-devel
50
51%description devel
52HDF development headers and libraries.
53
54
55%prep
56%setup -q
57%patch0 -p1 -b .maxavailfiles
58%patch1 -p1 -b .ppc
59%patch5 -p1 -b .destdir
60%patch6 -p1 -b .examplesdir
61%patch7 -p1 -b .format
62
63chmod a-x *hdf/*/*.c hdf/*/*.h
64# restore include file timestamps modified by patching
65touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
66
67
68%build
69# For destdir/examplesdir patches
70autoreconf -vif
71# avoid upstream compiler flags settings
72rm config/*linux-gnu
73export CFLAGS="$RPM_OPT_FLAGS -fPIC"
74export FFLAGS="$RPM_OPT_FLAGS -fPIC -ffixed-line-length-none"
75%configure --disable-production --disable-netcdf \
76 --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}
77
78make
79# correct the timestamps based on files used to generate the header files
80touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90
81touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
82touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
83# netcdf fortran include need same treatement, but they are not shipped
84
85%install
86rm -rf $RPM_BUILD_ROOT
87make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
88#Don't conflict with netcdf
89#rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc*
90for 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
94done
95
96# this is done to have the same timestamp on multiarch setups
97touch -c -r README.txt $RPM_BUILD_ROOT/%{_includedir}/hdf/h4config.h
98
99# Remove an autoconf conditional from the API that is unused and cause
100# the API to be different on x86 and x86_64
101pushd $RPM_BUILD_ROOT/%{_includedir}/hdf
102grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp
103touch -c -r h4config.h h4config.h.tmp
104mv h4config.h.tmp h4config.h
105popd
106
107%check
108make check
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113
114%files
115%defattr(-,root,root,0755)
116%doc COPYING MANIFEST README.txt release_notes/*.txt
117%{_bindir}/*
118%{_mandir}/man1/*.gz
119%exclude %{_defaultdocdir}/%{name}/examples
120
121%files devel
122%defattr(-,root,root,0755)
123%{_includedir}/%{name}/
124%{_libdir}/%{name}/
125%{_defaultdocdir}/%{name}/examples
126
127
128%changelog
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
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
Note: See TracBrowser for help on using the repository browser.