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