]> git.pld-linux.org Git - packages/gdal.git/blame_incremental - gdal.spec
- python %install fix
[packages/gdal.git] / gdal.spec
... / ...
CommitLineData
1# TODO: csharp, java
2#
3# Conditional build:
4%bcond_without odbc # disable odbc support
5%bcond_without xerces # disable xerces support
6%bcond_without ruby # disable ruby support
7#
8Summary: Geospatial Data Abstraction Library
9Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
10Name: gdal
11Version: 1.5.4
12Release: 3
13License: BSD-like
14Group: Libraries
15Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
16# Source0-md5: d5e411b6f11bd1f144af67d2045d2606
17Patch0: %{name}-dods.patch
18Patch1: %{name}-perl.patch
19Patch2: %{name}-ruby.patch
20Patch3: %{name}-asneeded.patch
21Patch4: %{name}-ogdi.patch
22Patch5: %{name}-python_install.patch
23URL: http://www.gdal.org/
24BuildRequires: autoconf >= 2.52
25BuildRequires: automake
26BuildRequires: cfitsio-devel
27BuildRequires: doxygen
28BuildRequires: expat-devel >= 1.95.0
29BuildRequires: geos-devel >= 2.0
30BuildRequires: giflib-devel >= 4.0
31BuildRequires: hdf-devel >= 4.0
32BuildRequires: hdf5-devel
33BuildRequires: jasper-devel
34BuildRequires: libcsf-devel
35BuildRequires: libdap-devel >= 3.5
36BuildRequires: libgeotiff-devel >= 1.2.1
37BuildRequires: libjpeg-devel >= 6b
38BuildRequires: libpng-devel >= 2:1.2.8
39BuildRequires: libstdc++-devel
40BuildRequires: libtiff-devel >= 3.6.0
41BuildRequires: libtool
42BuildRequires: netcdf-devel
43BuildRequires: ogdi-devel >= 3.1
44BuildRequires: perl-devel
45BuildRequires: postgresql-backend-devel
46BuildRequires: postgresql-devel
47BuildRequires: python-devel >= 1:2.5
48BuildRequires: python-numpy-devel >= 1:1.0.0
49%{?with_ruby:BuildRequires: ruby-devel}
50BuildRequires: sqlite3-devel >= 3
51BuildRequires: swig-python >= 1.3
52%{?with_ruby:BuildRequires: swig-ruby}
53%{?with_odbc:BuildRequires: unixODBC-devel}
54%{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
55BuildRequires: zlib-devel >= 1.1.4
56Requires: geos >= 2.0
57Requires: libgeotiff >= 1.2.1
58Requires: libpng >= 2:1.2.8
59Requires: libtiff >= 3.6.0
60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62%description
63GDAL is a translator library for raster geospatial data formats that
64is released under an Open Source license. As a library, it presents a
65single abstract data model to the calling application for all
66supported formats. The related OGR library (which lives within the
67GDAL source tree) provides a similar capability for simple features
68vector data.
69
70%description -l pl.UTF-8
71GDAL to biblioteka konwertująca między formatami rastrowych danych
72dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
73Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
74do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
75(której źródła są dołączone do drzewa źródeł GDAL) daje podobne
76możliwości dla danych wektorowych.
77
78%package devel
79Summary: GDAL library header files
80Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
81Group: Development/Libraries
82Requires: %{name} = %{version}-%{release}
83Requires: cfitsio-devel
84Requires: expat-devel >= 1.95.0
85Requires: geos-devel >= 2.0
86Requires: giflib-devel
87Requires: hdf-devel >= 4.0
88Requires: hdf5-devel
89Requires: jasper-devel
90Requires: libcsf-devel
91Requires: libdap-devel >= 3.5
92Requires: libgeotiff-devel >= 1.2.1
93Requires: libjpeg-devel
94Requires: libpng-devel >= 2:1.2.8
95Requires: libstdc++-devel
96Requires: libtiff-devel >= 3.6.0
97Requires: netcdf-devel
98Requires: ogdi-devel >= 3.1
99Requires: postgresql-devel
100Requires: sqlite3-devel >= 3
101%{?with_odbc:Requires: unixODBC-devel}
102%{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
103
104%description devel
105GDAL library header files.
106
107%description devel -l pl.UTF-8
108Pliki nagłówkowe biblioteki GDAL.
109
110%package static
111Summary: GDAL static libraries
112Summary(pl.UTF-8): Statyczne biblioteki GDAL
113Group: Development/Libraries
114Requires: %{name}-devel = %{version}-%{release}
115
116%description static
117GDAL static libraries.
118
119%description static -l pl.UTF-8
120Statyczne biblioteki GDAL.
121
122%package -n perl-gdal
123Summary: Perl bindings for GDAL
124Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
125Group: Development/Languages/Perl
126Requires: %{name} = %{version}-%{release}
127
128%description -n perl-gdal
129Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
130
131%description -n perl-gdal -l pl.UTF-8
132Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
133
134%package -n python-gdal
135Summary: GDAL Python module
136Summary(pl.UTF-8): Moduł Pythona GDAL
137Group: Libraries/Python
138Requires: %{name} = %{version}-%{release}
139%pyrequires_eq python-libs
140
141%description -n python-gdal
142GDAL Python module.
143
144%description -n python-gdal -l pl.UTF-8
145Moduł Pythona GDAL.
146
147%package -n ruby-gdal
148Summary: Ruby bindings for GDAL
149Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
150Group: Development/Languages
151Requires: %{name} = %{version}-%{release}
152%{?ruby_mod_ver_requires_eq}
153
154%description -n ruby-gdal
155Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
156
157%description -n ruby-gdal -l pl.UTF-8
158Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
159osr.
160
161%prep
162%setup -q
163%patch0 -p1
164%patch1 -p1
165%patch2 -p1
166%patch3 -p1
167%patch4 -p1
168
169# need to regenerate (old ones don't support perl 5.10)
170rm swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
171
172%build
173# $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
174# and $PYTHON_INCLUDES is needed to detect numpy properly
175export PYTHON_INCLUDES=-I%{py_incdir}
176
177%{__libtoolize}
178cp -f /usr/share/automake/config.* .
179%{__aclocal} -I m4
180%{__autoconf}
181# disable grass/libgrass here, it can be built from separate gdal-grass package
182%configure \
183 --datadir=%{_datadir}/gdal \
184 --with-dods-root=/usr \
185 --with-hide-internal-symbols \
186 --with-perl \
187 --with-python \
188 %{?with_ruby:--with-ruby} \
189 --with-sqlite3 \
190 %{?with_xerces:--with-xerces} \
191 --with-xerces-inc=/usr/include/xercesc \
192 --with-xerces-lib="-lxerces-c" \
193 --without-grass \
194 --without-libgrass
195# --with-php needs Zend API update
196# java broken, no configure option
197# csharp builds, but has no configure option
198
199# regenerate where needed
200%{__make} -j1 -C swig/perl generate
201
202%{__make} -j1
203
204%{__make} -j1 docs
205
206%install
207rm -rf $RPM_BUILD_ROOT
208
209%{__make} -j1 install install-man \
210 DESTDIR=$RPM_BUILD_ROOT
211
212rm -rf _html
213cp -a html _html
214cp -a ogr/html _html/ogr
215
216%py_comp $RPM_BUILD_ROOT%{py_sitedir}
217%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
218%py_postclean
219
220%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
221%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
222%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
223%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
224%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
225
226# some doxygen trash
227%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL.dox
228%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL/Const.dox
229%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OGR.dox
230%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OSR.dox
231
232%if %{with ruby}
233%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
234%endif
235
236%clean
237rm -rf $RPM_BUILD_ROOT
238
239%post -p /sbin/ldconfig
240%postun -p /sbin/ldconfig
241
242%files
243%defattr(644,root,root,755)
244%doc NEWS PROVENANCE.TXT
245%attr(755,root,root) %{_bindir}/*
246%exclude %{_bindir}/gdal-config
247%attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
248%attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
249%{_datadir}/gdal
250%{_mandir}/man1/*
251%exclude %{_mandir}/man1/gdal-config.1*
252
253%files devel
254%defattr(644,root,root,755)
255%doc _html/*
256%attr(755,root,root) %{_bindir}/gdal-config
257%attr(755,root,root) %{_libdir}/libgdal.so
258%{_libdir}/libgdal.la
259%{_includedir}/*.h
260%{_mandir}/man1/gdal-config.1*
261
262%files static
263%defattr(644,root,root,755)
264%{_libdir}/libgdal.a
265
266%files -n perl-gdal
267%defattr(644,root,root,755)
268%dir %{perl_vendorarch}/Geo
269%{perl_vendorarch}/Geo/GDAL.pm
270%dir %{perl_vendorarch}/Geo/GDAL
271%{perl_vendorarch}/Geo/GDAL/Const.pm
272%{perl_vendorarch}/Geo/OGR.pm
273%{perl_vendorarch}/Geo/OSR.pm
274%dir %{perl_vendorarch}/auto/Geo
275%dir %{perl_vendorarch}/auto/Geo/GDAL
276%{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
277%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
278%dir %{perl_vendorarch}/auto/Geo/GDAL/Const
279%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
280%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
281%dir %{perl_vendorarch}/auto/Geo/OGR
282%{perl_vendorarch}/auto/Geo/OGR/OGR.bs
283%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
284%dir %{perl_vendorarch}/auto/Geo/OSR
285%{perl_vendorarch}/auto/Geo/OSR/OSR.bs
286%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
287
288%files -n python-gdal
289%defattr(644,root,root,755)
290%{py_sitedir}/gdal.py[co]
291%{py_sitedir}/gdalconst.py[co]
292%{py_sitedir}/gdalnumeric.py[co]
293%{py_sitedir}/ogr.py[co]
294%{py_sitedir}/osr.py[co]
295%{py_sitedir}/GDAL-*.egg-info
296%dir %{py_sitedir}/osgeo
297%attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
298%attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
299%attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
300%attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
301%attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
302%{py_sitedir}/osgeo/*.py[co]
303
304%if %{with ruby}
305%files -n ruby-gdal
306%defattr(644,root,root,755)
307%dir %{ruby_sitearchdir}/gdal
308%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
309%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
310%attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
311%attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so
312%endif
This page took 0.049034 seconds and 4 git commands to generate.