]> git.pld-linux.org Git - packages/hdf.git/blob - hdf.spec
- new URLs, updated to 4.2.13
[packages/hdf.git] / hdf.spec
1 #
2 # Conditional build:
3 %bcond_without  szip    # build without SZIP support
4 #
5 Summary:        Hierarchical Data Format library
6 Summary(pl.UTF-8):      Biblioteka HDF (Hierarchical Data Format)
7 Name:           hdf
8 Version:        4.2.13
9 Release:        1
10 Epoch:          1
11 Group:          Libraries
12 License:        Nearly BSD, but changed sources must be marked
13 Source0:        https://support.hdfgroup.org/ftp/HDF/releases/HDF%{version}/src/hdf-%{version}.tar.bz2
14 # Source0-md5:  2c1b6c7fdf97738251154680b37bd86a
15 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
16 # Source1-md5:  607df78cacc131b37dfdb443e61e789a
17 Patch0:         %{name}-shared.patch
18 Patch1:         %{name}-morearchs.patch
19 Patch2:         %{name}-link.patch
20 Patch3:         %{name}-szip.patch
21 URL:            https://support.hdfgroup.org/products/hdf4/
22 BuildRequires:  autoconf >= 2.50
23 BuildRequires:  automake
24 BuildRequires:  bison
25 BuildRequires:  flex
26 BuildRequires:  gcc-fortran
27 BuildRequires:  groff
28 BuildRequires:  libjpeg-devel >= 6b
29 BuildRequires:  libtool >= 2:1.4d-3
30 BuildRequires:  netcdf-devel
31 %{?with_szip:BuildRequires:     szip-devel >= 2.0}
32 BuildRequires:  which
33 BuildRequires:  zlib-devel >= 1.1.4
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 # because of mfhdf/hdfimport/hdfimport.c false positives (const strings as format arguments)
37 %define         filterout_c     -Werror=format-security
38
39 %description
40 HDF is a multi-object file format that facilitates the transfer of
41 various types of scientific data between machines and operating
42 systems. Machines currently supported include the Cray, HP, Vax, Sun,
43 IBM RS/6000, Silicon Graphics, Macintosh, and IBM PC computers. HDF
44 allows self-definitions of data content and easy extensibility for
45 future enhancements or compatibility with other standard formats. HDF
46 includes Fortran and C calling interfaces,and utilities to prepare raw
47 image of data files or for use with other NCSA software. The HDF
48 library contains interfaces for storing and retrieving compressed or
49 uncompressed 8-bit and 24-bit raster images with palettes,
50 n-Dimensional scientific datasets and binary tables. An interface is
51 also included that allows arbitray grouping of other HDF objects.
52
53 %description -l pl.UTF-8
54 HDF jest wieloobiektowym formatem plików ułatwiającym przenoszenie
55 różnych danych naukowych pomiędzy różnymi komputerami i systemami
56 operacyjnymi. Aktualnie obsługiwane są m.in. Cray, HP, Vax, Sun, IBM
57 RS/6000, Silicon Graphics, Macintosh i IBM PC. HDF zawiera interfejsy
58 do Fortranu i C oraz narzędzia do przygotowywania plików z danymi.
59 Biblioteka pozwala na przechowywanie i odczytywanie skompresowanych
60 lub nie 8-bitowych i 24-bitowych obrazków z paletą, wielowymiarowych
61 zestawów danych itp.
62
63 %package devel
64 Summary:        HDF library development package
65 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki HDF
66 Group:          Development/Libraries
67 Requires:       %{name} = %{epoch}:%{version}-%{release}
68 Requires:       libjpeg-devel >= 6b
69 %{?with_szip:Requires:  szip-devel >= 2.0}
70 Requires:       zlib-devel >= 1.1.4
71
72 %description devel
73 Header files for HDF library.
74
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki HDF.
77
78 %package static
79 Summary:        HDF static library
80 Summary(pl.UTF-8):      Statyczna biblioteka HDF
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
83
84 %description static
85 Static version of HDF library.
86
87 %description static -l pl.UTF-8
88 Statyczna wersja biblioteki HDF.
89
90 %package progs
91 Summary:        HDF utilities
92 Summary(pl.UTF-8):      Narzędzia do plików HDF
93 Group:          Applications/File
94 Requires:       %{name} = %{epoch}:%{version}-%{release}
95
96 %description progs
97 Utilities to convert from/to HDF format.
98
99 %description progs -l pl.UTF-8
100 Narzędzia do konwersji z i do formatu HDF.
101
102 %package examples
103 Summary:        HDF example programs (source code)
104 Summary(pl.UTF-8):      Przykładowe programy dla biblioteki HDF (w postaci źródłowej)
105 Group:          Documentation
106
107 %description examples
108 HDF example programs (source code).
109
110 %description examples -l pl.UTF-8
111 Przykładowe programy dla biblioteki HDF (w postaci źródłowej).
112
113 %prep
114 %setup -q
115 %patch0 -p1
116 %patch1 -p1
117 %patch2 -p1
118 %patch3 -p1
119
120 # evil -R
121 sed -i '/^if HDF_BUILD_XDR/,/^endif/d;/^if HDF_BUILD_SHARED/,/^endif/d' config/commence.am
122
123 %build
124 %{__libtoolize}
125 %{__aclocal}
126 %{__autoconf}
127 %{__autoheader}
128 %{__automake}
129 # need to pass F77 to override F77=g77 in config/linux-gnu
130 %configure \
131 %ifarch x32
132         F77="x86_64-pld-linux-gnux32-gfortran" \
133 %else
134         F77="%{_target_cpu}-pld-linux-gfortran" \
135 %endif
136         --enable-shared \
137         %{?with_szip:--with-szlib}
138
139 %{__make}
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143 install -d $RPM_BUILD_ROOT{%{_mandir}/man{3,7},%{_includedir}/hdf}
144
145 %{__make} install \
146         DESTDIR=$RPM_BUILD_ROOT \
147         EXAMPLETOPDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
148         EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c \
149
150 mv -f $RPM_BUILD_ROOT%{_includedir}/*.{h,inc,f90} $RPM_BUILD_ROOT%{_includedir}/hdf
151
152 install man/gr_chunk.3 $RPM_BUILD_ROOT%{_mandir}/man3
153 mv -f $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7
154
155 # resolve conflict with netcdf
156 for i in ncdump ncgen ; do
157         mv -f $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i
158         mv -f $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1
159 done
160
161 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
162 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.hdf-man-pages
163 %{__rm} $RPM_BUILD_ROOT%{_mandir}/diff.*
164
165 %clean
166 rm -rf $RPM_BUILD_ROOT
167
168 %post   -p /sbin/ldconfig
169 %postun -p /sbin/ldconfig
170
171 %files
172 %defattr(644,root,root,755)
173 %doc COPYING README.txt release_notes/{HISTORY,RELEASE,bugs_fixed,misc_docs}.txt
174 %attr(755,root,root) %{_libdir}/libdf.so.*.*.*
175 %attr(755,root,root) %ghost %{_libdir}/libdf.so.0
176 %attr(755,root,root) %{_libdir}/libmfhdf.so.*.*.*
177 %attr(755,root,root) %ghost %{_libdir}/libmfhdf.so.0
178 %{_libdir}/libhdf4.settings
179
180 %files devel
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libdf.so
183 %attr(755,root,root) %{_libdir}/libmfhdf.so
184 %{_libdir}/libdf.la
185 %{_libdir}/libmfhdf.la
186 %{_includedir}/hdf
187 %{_mandir}/man3/gr_chunk.3*
188 %{_mandir}/man7/hdf.7*
189
190 %files static
191 %defattr(644,root,root,755)
192 %{_libdir}/libdf.a
193 %{_libdir}/libmfhdf.a
194
195 %files progs
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/gif2hdf
198 %attr(755,root,root) %{_bindir}/h4cc
199 %attr(755,root,root) %{_bindir}/h4fc
200 %attr(755,root,root) %{_bindir}/h4redeploy
201 %attr(755,root,root) %{_bindir}/hdf24to8
202 %attr(755,root,root) %{_bindir}/hdf2gif
203 %attr(755,root,root) %{_bindir}/hdf2jpeg
204 %attr(755,root,root) %{_bindir}/hdf8to24
205 %attr(755,root,root) %{_bindir}/hdfcomp
206 %attr(755,root,root) %{_bindir}/hdfed
207 %attr(755,root,root) %{_bindir}/hdfimport
208 %attr(755,root,root) %{_bindir}/hdfls
209 %attr(755,root,root) %{_bindir}/hdfncdump
210 %attr(755,root,root) %{_bindir}/hdfncgen
211 %attr(755,root,root) %{_bindir}/hdfpack
212 %attr(755,root,root) %{_bindir}/hdftopal
213 %attr(755,root,root) %{_bindir}/hdftor8
214 %attr(755,root,root) %{_bindir}/hdfunpac
215 %attr(755,root,root) %{_bindir}/hdiff
216 %attr(755,root,root) %{_bindir}/hdp
217 %attr(755,root,root) %{_bindir}/hrepack
218 %attr(755,root,root) %{_bindir}/jpeg2hdf
219 %attr(755,root,root) %{_bindir}/paltohdf
220 %attr(755,root,root) %{_bindir}/r8tohdf
221 %attr(755,root,root) %{_bindir}/ristosds
222 %attr(755,root,root) %{_bindir}/vmake
223 %attr(755,root,root) %{_bindir}/vshow
224 %{_mandir}/man1/fp2hdf.1*
225 %{_mandir}/man1/gif2hdf.1*
226 %{_mandir}/man1/hdf24to8.1*
227 %{_mandir}/man1/hdf2gif.1*
228 %{_mandir}/man1/hdf2jpeg.1*
229 %{_mandir}/man1/hdf8to24.1*
230 %{_mandir}/man1/hdfcomp.1*
231 %{_mandir}/man1/hdfed.1*
232 %{_mandir}/man1/hdfls.1*
233 %{_mandir}/man1/hdfncdump.1*
234 %{_mandir}/man1/hdfncgen.1*
235 %{_mandir}/man1/hdfpack.1*
236 %{_mandir}/man1/hdftopal.1*
237 %{_mandir}/man1/hdftor8.1*
238 %{_mandir}/man1/hdp.1*
239 %{_mandir}/man1/jpeg2hdf.1*
240 %{_mandir}/man1/paltohdf.1*
241 %{_mandir}/man1/r8tohdf.1*
242 %{_mandir}/man1/ristosds.1*
243 %{_mandir}/man1/vmake.1*
244 %{_mandir}/man1/vshow.1*
245
246 %files examples
247 %defattr(644,root,root,755)
248 %dir %{_examplesdir}/%{name}-%{version}
249 %{_examplesdir}/%{name}-%{version}/README
250 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/run-all-ex.sh
251 %dir %{_examplesdir}/%{name}-%{version}/c
252 %{_examplesdir}/%{name}-%{version}/c/*.c
253 %{_examplesdir}/%{name}-%{version}/c/*.f
254 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/c/run-c-ex.sh
255 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/c/run-fortran-ex.sh
This page took 0.104057 seconds and 3 git commands to generate.