-
Notifications
You must be signed in to change notification settings - Fork 1
/
hdf.spec
349 lines (266 loc) · 11.3 KB
/
hdf.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
%global shortname hdf
%global ver 4.2.11
%{?altcc_init:%altcc_init -n %{shortname} -v %{ver}}
Name: hdf%{?altcc_pkg_suffix}
Version: %{ver}
Release: 4%{?dist}
Summary: A general purpose library and file format for storing scientific data
License: BSD
Group: System Environment/Libraries
URL: http://hdfgroup.org/products/hdf4/index.html
Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{shortname}-%{version}.tar.bz2
Source1: %{shortname}.module.in
Patch0: hdf-4.2.5-maxavailfiles.patch
Patch1: hdf-ppc.patch
Patch2: hdf-4.2.4-sparc.patch
Patch3: hdf-s390.patch
Patch4: hdf-arm.patch
# Support DESTDIR in install-examples
Patch5: hdf-destdir.patch
# Install examples into the right location
Patch6: hdf-examplesdir.patch
# Fix calling of fixname subroutine
Patch7: hdf-fixname.patch
# Add AArch64 definitions
Patch8: hdf-4.2.10-aarch64.patch
# ppc64le support
# https://bugzilla.redhat.com/show_bug.cgi?id=1134385
Patch9: hdf-ppc64le.patch
# For destdir/examplesdir patches
BuildRequires: automake libtool
BuildRequires: flex byacc libjpeg-devel zlib-devel
%if "%{?dist}" != ".el4"
BuildRequires: gcc-gfortran
%else
BuildRequires: gcc-g77
%endif
%{?altcc_reqmodules}
%{?altcc_provide}
%description
HDF is a general purpose library and file format for storing scientific data.
HDF can store two primary objects: datasets and groups. A dataset is
essentially a multidimensional array of data elements, and a group is a
structure for organizing objects in an HDF file. Using these two basic
objects, one can create and store almost any kind of scientific data
structure, such as images, arrays of vectors, and structured and unstructured
grids. You can also mix and match them in HDF files according to your needs.
%package devel
Summary: HDF development files
Group: Development/Libraries
Provides: %{name}-static = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: libjpeg-devel zlib-devel
%{?altcc:%altcc_provide devel}
%{?altcc:%altcc_provide static}
%description devel
HDF development headers and libraries.
%prep
%setup -q -n %{shortname}-%{version}
%patch0 -p1 -b .maxavailfiles
%patch1 -p1 -b .ppc
%patch2 -p1 -b .sparc
%patch3 -p1 -b .s390
%patch4 -p1 -b .arm
%patch5 -p1 -b .destdir
%patch6 -p1 -b .examplesdir
%patch7 -p1 -b .fixname
%patch8 -p1 -b .aarch64
%patch9 -p1 -b .ppc64le
chmod a-x *hdf/*/*.c hdf/*/*.h
# restore include file timestamps modified by patching
touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
%build
# For destdir/examplesdir patches
autoreconf -vif
# avoid upstream compiler flags settings
rm config/*linux-gnu
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
if [ -n "$FFLAGS" ]
then
export FFLAGS="$FFLAGS -fPIC"
else
export FFLAGS="$RPM_OPT_FLAGS -fPIC -ffixed-line-length-none"
fi
[ -n "$FC" ] && export F77=$FC
%configure --disable-production --disable-netcdf \
%{!?altcc:--includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}}
make
# correct the timestamps based on files used to generate the header files
touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90
touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
# netcdf fortran include need same treatement, but they are not shipped
%install
make install DESTDIR=%{buildroot} INSTALL='install -p'
rm %{buildroot}%{_libdir}%{!?altcc:/%{name}}/*.la
#Don't conflict with netcdf
for file in ncdump ncgen; do
mv %{buildroot}%{_bindir}/$file %{buildroot}%{_bindir}/h$file
# man pages are the same than netcdf ones
rm %{buildroot}%{_mandir}/man1/${file}.1
done
# this is done to have the same timestamp on multiarch setups
touch -c -r README.txt %{buildroot}/%{_includedir}/h4config.h
# Remove an autoconf conditional from the API that is unused and cause
# the API to be different on x86 and x86_64
pushd %{buildroot}/%{_includedir}
grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp
touch -c -r h4config.h h4config.h.tmp
mv h4config.h.tmp h4config.h
popd
%{?altcc:%altcc_writemodule %SOURCE1}
%{?altcc:%altcc_license}
%check
make check
%files
%license COPYING
%doc MANIFEST README.txt release_notes/*.txt
%exclude %{_defaultdocdir}/%{shortname}/
%{?altcc:%altcc_files -dlm %{_bindir} %{_mandir}/man1}
%{_bindir}/*
%{_mandir}/man1/*.1*
%files devel
%{?altcc:%altcc_files %{_includedir} %{_libdir}}
%{_includedir}
%{_libdir}
%{_defaultdocdir}/%{shortname}/
%changelog
* Wed May 25 2016 Orion Poplawski <[email protected]> 4.2.11-4
- Cleanup spec
- Remove .la files
- Use %%license
* Wed Feb 03 2016 Fedora Release Engineering <[email protected]> - 4.2.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <[email protected]> - 4.2.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Feb 13 2015 Orion Poplawski <[email protected]> 4.2.11-1
- Update to 4.2.11
- Drop format patch applied upstream
- Update destdir patch
* Mon Sep 8 2014 Orion Poplawski <[email protected]> - 4.2.10-7
- Updated patch for ppc64le support (bug #1134385)
* Wed Sep 3 2014 Orion Poplawski <[email protected]> - 4.2.10-6
- Add initial attempt at ppc64le support (bug #1134385)
* Sat Aug 16 2014 Fedora Release Engineering <[email protected]> - 4.2.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Jun 25 2014 Marcin Juszkiewicz <[email protected]> 4.2.10-4
- Add AArch64 support.
* Sat Jun 07 2014 Fedora Release Engineering <[email protected]> - 4.2.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 22 2014 Jakub Čajka <[email protected]> 4.2.10-2
- Fixed build/tests on s390x
- Tests enabled on ppc
* Fri Feb 14 2014 Orion Poplawski <[email protected]> 4.2.10-1
- Update to 4.2.10
- Rebase arm, ppc, and s390 patches
- Add destdir, examplesdir patches to fix installation of examples
* Sat Feb 1 2014 Orion Poplawski <[email protected]> 4.2.9-4
- Fix build with -Werror=format-security (bug #1037120)
* Tue Aug 13 2013 Karsten Hopp <[email protected]> 4.2.9-3
- temporarily skip checks on ppc* (#961007)
* Sat Aug 03 2013 Fedora Release Engineering <[email protected]> - 4.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Orion Poplawski <[email protected]> 4.2.9-1
- Update to 4.2.9
- Add patch for some missing declarations
- Add patch to fix integer wrapping in test
* Thu Feb 14 2013 Fedora Release Engineering <[email protected]> - 4.2.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 4.2.8-3
- rebuild due to "jpeg8-ABI" feature drop
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 4.2.8-2
- rebuild against new libjpeg
* Wed Aug 15 2012 Orion Poplawski <[email protected]> 4.2.8-1
- Update to 4.2.8
* Thu Jul 19 2012 Fedora Release Engineering <[email protected]> - 4.2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Mar 06 2012 DJ Delorie <[email protected]> 4.2.7-2
- Add patch for ARM support
* Wed Feb 15 2012 Orion Poplawski <[email protected]> 4.2.7-1
- Update to 4.2.7
* Fri Jan 13 2012 Fedora Release Engineering <[email protected]> - 4.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Jun 21 2011 Orion Poplawski <[email protected]> 4.2.6-1
- Update to 4.2.6
- Drop jpeg patch, fixed upstream
- Update ppc,s390 patches
* Wed Feb 09 2011 Fedora Release Engineering <[email protected]> - 4.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Dec 10 2010 Orion Poplawski <[email protected]> 4.2.5-2
- Add patch to disable jpeg tests due to change to jpeg-turbo, FTBFS bug 631337
* Tue Mar 2 2010 Orion Poplawski <[email protected]> 4.2.5-1
- Update to 4.2.5
* Fri Sep 18 2009 Orion Poplawski <[email protected]> 4.2r4-5
- Add EL4 build conditionals
* Thu Aug 13 2009 Orion Poplawski <[email protected]> 4.2r4-4
- Add -fPIC to FFLAGS
* Fri Jul 24 2009 Fedora Release Engineering <[email protected]> - 4.2r4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Apr 7 2009 Orion Poplawski <[email protected]> 4.2r4-2
- Add Provides hdf-static to hdf-devel (bug #494529)
* Wed Feb 25 2009 Orion Poplawski <[email protected]> 4.2r4-1
- Update to 4.2r4
- Add patch to increase buffer size in test
- Drop upstreamed libm patch
* Tue Feb 24 2009 Fedora Release Engineering <[email protected]> - 4.2r3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Oct 1 2008 Orion Poplawski <[email protected]> 4.2r3-4
- Rebase maxavailfiles patch
* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 4.2r3-3
- Fix Patch0:/%%patch mismatch.
* Sun Mar 2 2008 Patrice Dumas <[email protected]> 4.2r3-2
- don't ship an empty netcdf.h file. The related definitions are now
in hdf4_netcdf.h
* Tue Feb 5 2008 Orion Poplawski <[email protected]> 4.2.r3-1
- Update to 4.2r3
* Tue Feb 5 2008 Orion Poplawski <[email protected]> 4.2.r2-7
- Add patch to add -lm to hdiff link
* Tue Feb 5 2008 Orion Poplawski <[email protected]> 4.2.r2-6
- Add patch for s390 support (bug #431511)
* Mon Jan 7 2008 Orion Poplawski <[email protected]> 4.2.r2-5
- Add patches for sparc support (bug #427639)
* Mon Oct 29 2007 Patrice Dumas <[email protected]> 4.2r2-4
- install the netcdf.h file that describes the netcdf2 hdf enabled
API
* Mon Oct 29 2007 Patrice Dumas <[email protected]> 4.2r2-3
- ship hdf enabled nc* utils as hnc*
- add --disable-netcdf that replaces HAVE_NETCDF
- keep include files timestamps, and have the same accross arches
- fix multiarch difference in include files (#341491)
* Wed Oct 17 2007 Patrice Dumas <[email protected]> 4.2r2-2
- update to 4.2r2
* Fri Aug 24 2007 Orion Poplawski <[email protected]> 4.2r1-15
- Update license tag to BSD
- Rebuild for BuildID
* Thu May 10 2007 Balint Cristian <[email protected]> 4.2r1-14
- Fix ppc64 too.
* Thu May 10 2007 Orion Poplawski <[email protected]> 4.2r1-13
- Remove netcdf-devel requires. (bug #239631)
* Fri Apr 20 2007 Orion Poplawski <[email protected]> 4.2r1-12
- Use 4.2r1-hrepack-p4.tar.gz for hrepack patch
- Remove configure patch applied upstream
- Use --disable-production configure flag to avoid stripping -g compile flag
- Add patch to fix open file test when run under mock
* Tue Aug 29 2006 Orion Poplawski <[email protected]> 4.2r1-11
- Rebuild for FC6
* Thu Apr 20 2006 Orion Poplawski <[email protected]> 4.2r1-10
- Add Requires netcdf-devel for hdf-devel (bug #189337)
* Mon Feb 13 2006 Orion Poplawski <[email protected]> 4.2r1-9
- Rebuild for gcc/glibc changes
* Wed Feb 8 2006 Orion Poplawski <[email protected]> 4.2r1-8
- Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility
* Thu Feb 2 2006 Orion Poplawski <[email protected]> 4.2r1-7
- Add patch to build on ppc
* Wed Dec 21 2005 Orion Poplawski <[email protected]> 4.2r1-6
- Rebuild
* Wed Oct 05 2005 Orion Poplawski <[email protected]> 4.2r1-5
- Add Requires: libjpeg-devel zlib-devel to -devel package
* Tue Aug 23 2005 Orion Poplawski <[email protected]> 4.2r1-4
- Use -fPIC
- Fix project URL
* Fri Jul 29 2005 Orion Poplawski <[email protected]> 4.2r1-3
- Exclude ppc/ppc64 - HDF does not recognize it
* Wed Jul 20 2005 Orion Poplawski <[email protected]> 4.2r1-2
- Fix BuildRequires to have autoconf
* Fri Jul 15 2005 Orion Poplawski <[email protected]> 4.2r1-1
- inital package for Fedora Extras