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