]> git.pld-linux.org Git - packages/hdf.git/blob - hdf.spec
- BR which
[packages/hdf.git] / hdf.spec
1 Summary:        Hierarchical Data Format library
2 Summary(pl):    Biblioteka HDF (Hierarchical Data Format)
3 Name:           hdf
4 Version:        4.1r5
5 Release:        2.2
6 Group:          Libraries
7 License:        Nearly BSD, but changed sources must be marked
8 Source0:        ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/tar/HDF%{version}.tar.gz
9 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
10 Patch0:         %{name}-system-libs.patch
11 Patch1:         %{name}-strdup.patch
12 Patch2:         %{name}-shared.patch
13 Patch3:         %{name}-athlon.patch
14 URL:            http://hdf.ncsa.uiuc.edu/
15 BuildRequires:  bison
16 BuildRequires:  flex
17 BuildRequires:  gcc-g77
18 BuildRequires:  groff
19 BuildRequires:  libjpeg-devel >= 6b
20 BuildRequires:  libtool >= 0:1.4.2
21 BuildRequires:  which
22 BuildRequires:  zlib-devel >= 1.1.3
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 ExclusiveArch:  %{ix86} alpha
25
26 %description
27 HDF is a multi-object file format that facilitates the transfer of
28 various types of scientific data between machines and operating
29 systems. Machines currently supported include the Cray, HP, Vax, Sun,
30 IBM RS/6000, Silicon Graphics, Macintosh, and IBM PC computers. HDF
31 allows self-definitions of data content and easy extensibility for
32 future enhancements or compatibility with other standard formats. HDF
33 includes Fortran and C calling interfaces,and utilities to prepare raw
34 image of data files or for use with other NCSA software. The HDF
35 library contains interfaces for storing and retrieving compressed or
36 uncompressed 8-bit and 24-bit raster images with palettes,
37 n-Dimensional scientific datasets and binary tables. An interface is
38 also included that allows arbitray grouping of other HDF objects.
39
40 %description -l pl
41 HDF jest wieloobiektowym formatem plików u³atwiaj±cym przenoszenie
42 ró¿nych danych naukowych pomiêdzy ró¿nymi komputerami i systemami
43 operacyjnymi. Aktualnie obs³ugiwane s± m.in. Cray, HP, Vax, Sun, IBM
44 RS/6000, Silicon Graphics, Macintosh i IBM PC. HDF zawiera interfejsy
45 do Fortranu i C oraz narzêdzia do przygotowywania plików z danymi.
46 Biblioteka pozwala na przechowywanie i odczytywanie skompresowanych
47 lub nie 8-bitowych i 24-bitowych obrazków z palet±, wielowymiarowych
48 zestawów danych itp.
49
50 %package devel
51 Summary:        HDF library development package
52 Summary(pl):    Pliki nag³ówkowe biblioteki HDF
53 Group:          Development/Libraries
54 Requires:       %{name} = %{version}
55
56 %description devel
57 Header files for HDF library.
58
59 %description devel -l pl
60 Pliki nag³ówkowe biblioteki HDF.
61
62 %package static
63 Summary:        HDF static library
64 Summary(pl):    Statyczna biblioteka HDF
65 Group:          Development/Libraries
66 Requires:       %{name}-devel = %{version}
67
68 %description static
69 Static version of HDF library.
70
71 %description static -l pl
72 Statyczna wersja biblioteki HDF.
73
74 %package progs
75 Summary:        HDF utilities
76 Summary(pl):    Narzêdzia do plików HDF
77 Group:          Applications/File
78 Requires:       %{name} = %{version}
79
80 %description progs
81 Utilities to convert from/to HDF format.
82
83 %description progs -l pl
84 Narzêdzia do konwersji z i to formatu HDF.
85
86 %prep
87 %setup -q -n HDF%{version}
88 %patch0 -p1
89 %patch1 -p1
90 %patch2 -p1
91 %patch3 -p1
92
93 %build
94 install -m755 /usr/share/libtool/config.{guess,sub} .
95 install -m755 /usr/share/libtool/config.{guess,sub} hdf/fmpool
96 install -m755 /usr/share/libtool/config.{guess,sub} hdf/jpeg
97 ./configure %{_target_platform} \
98         --prefix=%{_prefix} --exec-prefix=%{_exec_prefix}
99
100 # libtool 1.4d requires --tag for g77, but doesn't have good tag for g77
101 grep -q -e '--tag' `which libtool` && LTTAG="--tag=dummy"
102
103 %{__make} CFLAGS="%{rpmcflags} -ansi -D_BSD_SOURCE -DHAVE_NETCDF" \
104         FFLAGS="%{rpmcflags}" YACC="bison -y" LTTAG="$LTTAG"
105
106 # avoid relinking
107 cd mfhdf/libsrc
108 sed -e '/^relink_command/d' libmfhdf.la > libmfhdf.la.tmp
109 mv -f libmfhdf.la.tmp libmfhdf.la
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT{%{_libdir},%{_mandir}/man{3,7},%{_includedir}/hdf}
114
115 %{__make} install \
116         prefix=$RPM_BUILD_ROOT%{_prefix} \
117         exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
118         mandir=$RPM_BUILD_ROOT%{_mandir} \
119         infodir=$RPM_BUILD_ROOT%{_infodir}
120
121 mv -f $RPM_BUILD_ROOT%{_includedir}/*.{h,inc,f90} $RPM_BUILD_ROOT%{_includedir}/hdf
122
123 install man/gr_chunk.3 $RPM_BUILD_ROOT%{_mandir}/man3
124 mv -f $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7
125
126 # resolve conflict with netcdf and move manuals to FHS location
127 # NOTE: don't let adapter change %%{_prefix}/man to %%{_mandir}
128 for i in ncdump ncgen ; do
129         mv -f $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i
130         mv -f $RPM_BUILD_ROOT/usr/man/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1
131 done
132
133 # remove unwanted path from libtool script
134 cat $RPM_BUILD_ROOT%{_libdir}/libmfhdf.la | \
135         awk '/^dependency_libs/ { gsub("-L[ \t]*[^ \t]*/\.libs ","") } //' \
136         > $RPM_BUILD_ROOT%{_libdir}/libmfhdf.la.tmp
137 mv -f $RPM_BUILD_ROOT%{_libdir}/libmfhdf.la.tmp $RPM_BUILD_ROOT%{_libdir}/libmfhdf.la
138
139 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %post   -p /sbin/ldconfig
145 %postun -p /sbin/ldconfig
146
147 %files
148 %defattr(644,root,root,755)
149 %doc COPYING README release_notes/bugs* release_notes/ABOUT*
150 %attr(755,root,root) %{_libdir}/lib*.so.*.*
151
152 %files devel
153 %defattr(644,root,root,755)
154 %doc release_notes/compile*
155 %attr(755,root,root) %{_libdir}/lib*.so
156 %{_libdir}/lib*.la
157 %{_includedir}/hdf
158 %{_mandir}/man[37]/*
159
160 %files static
161 %defattr(644,root,root,755)
162 %{_libdir}/lib*.a
163
164 %files progs
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_bindir}/*
167 %{_mandir}/man1/*
This page took 0.040429 seconds and 3 git commands to generate.