1 # TODO: csharp, java, mysql
4 %bcond_without odbc # disable odbc support
5 %bcond_without xerces # disable xerces support
6 %bcond_without ruby # disable ruby support
8 Summary: Geospatial Data Abstraction Library
9 Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
15 Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
16 # Source0-md5: c4673970bd2285032de9ae9bbd82754a
17 Patch0: %{name}-perl.patch
18 Patch1: %{name}-ruby.patch
19 Patch2: %{name}-asneeded.patch
20 Patch3: %{name}-python_install.patch
21 Patch4: %{name}-libdap.patch
22 URL: http://www.gdal.org/
23 BuildRequires: autoconf >= 2.52
24 BuildRequires: automake
25 BuildRequires: cfitsio-devel
26 BuildRequires: doxygen
27 BuildRequires: expat-devel >= 1.95.0
28 BuildRequires: geos-devel >= 2.2
29 BuildRequires: giflib-devel >= 4.0
30 BuildRequires: hdf-devel >= 4.0
31 BuildRequires: hdf5-devel
32 BuildRequires: jasper-devel
33 BuildRequires: libcsf-devel
34 BuildRequires: libdap-devel >= 3.10
35 BuildRequires: libgeotiff-devel >= 1.2.1
36 BuildRequires: libjpeg-devel >= 6b
37 BuildRequires: libpng-devel >= 2:1.2.8
38 BuildRequires: libstdc++-devel
39 BuildRequires: libtiff-devel >= 3.6.0
40 BuildRequires: libtool
41 BuildRequires: netcdf-devel
42 BuildRequires: ogdi-devel >= 3.1
43 BuildRequires: pcidsk-devel
44 BuildRequires: perl-devel
45 BuildRequires: postgresql-backend-devel
46 BuildRequires: postgresql-devel
47 BuildRequires: proj-devel
48 BuildRequires: python-devel >= 1:2.5
49 BuildRequires: python-numpy-devel >= 1:1.0.0
50 BuildRequires: rpm-pythonprov
51 %{?with_ruby:BuildRequires: ruby-devel}
52 BuildRequires: sqlite3-devel >= 3
53 BuildRequires: swig-perl
54 BuildRequires: swig-python >= 1.3
55 %{?with_ruby:BuildRequires: swig-ruby}
56 %if "%{pld_release}" == "ti"
57 BuildRequires: tetex-format-latex
58 BuildRequires: tetex-dvips
60 BuildRequires: texlive-dvips
61 BuildRequires: texlive-latex
63 %{?with_odbc:BuildRequires: unixODBC-devel}
64 %{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
65 BuildRequires: zlib-devel >= 1.1.4
67 Requires: libgeotiff >= 1.2.1
68 Requires: libpng >= 2:1.2.8
69 Requires: libtiff >= 3.6.0
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 GDAL is a translator library for raster geospatial data formats that
74 is released under an Open Source license. As a library, it presents a
75 single abstract data model to the calling application for all
76 supported formats. The related OGR library (which lives within the
77 GDAL source tree) provides a similar capability for simple features
80 %description -l pl.UTF-8
81 GDAL to biblioteka konwertująca między formatami rastrowych danych
82 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
83 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
84 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
85 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
86 możliwości dla danych wektorowych.
89 Summary: GDAL library header files
90 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
91 Group: Development/Libraries
92 Requires: %{name} = %{version}-%{release}
93 Requires: cfitsio-devel
94 Requires: expat-devel >= 1.95.0
95 Requires: geos-devel >= 2.2
96 Requires: giflib-devel
97 Requires: hdf-devel >= 4.0
99 Requires: jasper-devel
100 Requires: libcsf-devel
101 Requires: libdap-devel >= 3.10
102 Requires: libgeotiff-devel >= 1.2.1
103 Requires: libjpeg-devel
104 Requires: libpng-devel >= 2:1.2.8
105 Requires: libstdc++-devel
106 Requires: libtiff-devel >= 3.6.0
107 Requires: netcdf-devel
108 Requires: ogdi-devel >= 3.1
109 Requires: pcidsk-devel
110 Requires: postgresql-devel
111 Requires: sqlite3-devel >= 3
112 %{?with_odbc:Requires: unixODBC-devel}
113 %{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
116 GDAL library header files.
118 %description devel -l pl.UTF-8
119 Pliki nagłówkowe biblioteki GDAL.
122 Summary: GDAL static libraries
123 Summary(pl.UTF-8): Statyczne biblioteki GDAL
124 Group: Development/Libraries
125 Requires: %{name}-devel = %{version}-%{release}
128 GDAL static libraries.
130 %description static -l pl.UTF-8
131 Statyczne biblioteki GDAL.
133 %package -n perl-gdal
134 Summary: Perl bindings for GDAL
135 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
136 Group: Development/Languages/Perl
137 Requires: %{name} = %{version}-%{release}
139 %description -n perl-gdal
140 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
142 %description -n perl-gdal -l pl.UTF-8
143 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
145 %package -n python-gdal
146 Summary: GDAL Python module
147 Summary(pl.UTF-8): Moduł Pythona GDAL
148 Group: Libraries/Python
149 Requires: %{name} = %{version}-%{release}
150 %pyrequires_eq python-libs
152 %description -n python-gdal
155 %description -n python-gdal -l pl.UTF-8
158 %package -n ruby-gdal
159 Summary: Ruby bindings for GDAL
160 Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
161 Group: Development/Languages
162 Requires: %{name} = %{version}-%{release}
163 %{?ruby_mod_ver_requires_eq}
165 %description -n ruby-gdal
166 Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
168 %description -n ruby-gdal -l pl.UTF-8
169 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
180 # need to regenerate (old ones don't support perl 5.10)
181 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
182 # includes updated for Ruby 1.9
183 %{__rm} swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
188 # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
189 # and $PYTHON_INCLUDES is needed to detect numpy properly
190 export PYTHON_INCLUDES=-I%{py_incdir}
195 # disable grass/libgrass here, it can be built from separate gdal-grass package
197 --datadir=%{_datadir}/gdal \
198 --with-dods-root=/usr \
199 --with-hide-internal-symbols \
203 %{?with_ruby:--with-ruby} \
205 %{?with_xerces:--with-xerces} \
206 --with-xerces-inc=/usr/include/xercesc \
207 --with-xerces-lib="-lxerces-c" \
210 # --with-php needs Zend API update
211 # java broken, no configure option
212 # csharp builds, but has no configure option
214 # regenerate where needed
215 %{__make} -j1 -C swig/perl generate
216 %{?with_ruby:%{__make} -j1 -C swig/ruby generate}
225 rm -rf $RPM_BUILD_ROOT
227 %{__make} -j1 install install-man \
228 DESTDIR=$RPM_BUILD_ROOT
232 cp -a ogr/html _html/ogr
234 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
235 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
238 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
239 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
240 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
241 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
242 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
245 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL.dox
246 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL/Const.dox
247 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OGR.dox
248 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OSR.dox
251 %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
255 rm -rf $RPM_BUILD_ROOT
257 %post -p /sbin/ldconfig
258 %postun -p /sbin/ldconfig
261 %defattr(644,root,root,755)
262 %doc NEWS PROVENANCE.TXT
263 %attr(755,root,root) %{_bindir}/epsg_tr.py
264 %attr(755,root,root) %{_bindir}/esri2wkt.py
265 %attr(755,root,root) %{_bindir}/gcps2vec.py
266 %attr(755,root,root) %{_bindir}/gcps2wld.py
267 %attr(755,root,root) %{_bindir}/gdal2tiles.py
268 %attr(755,root,root) %{_bindir}/gdal2xyz.py
269 %attr(755,root,root) %{_bindir}/gdal_contour
270 %attr(755,root,root) %{_bindir}/gdal_fillnodata.py
271 %attr(755,root,root) %{_bindir}/gdal_grid
272 %attr(755,root,root) %{_bindir}/gdal_merge.py
273 %attr(755,root,root) %{_bindir}/gdal_polygonize.py
274 %attr(755,root,root) %{_bindir}/gdal_proximity.py
275 %attr(755,root,root) %{_bindir}/gdal_rasterize
276 %attr(755,root,root) %{_bindir}/gdal_retile.py
277 %attr(755,root,root) %{_bindir}/gdal_sieve.py
278 %attr(755,root,root) %{_bindir}/gdal_translate
279 %attr(755,root,root) %{_bindir}/gdaladdo
280 %attr(755,root,root) %{_bindir}/gdalbuildvrt
281 %attr(755,root,root) %{_bindir}/gdalchksum.py
282 %attr(755,root,root) %{_bindir}/gdaldem
283 %attr(755,root,root) %{_bindir}/gdalenhance
284 %attr(755,root,root) %{_bindir}/gdalident.py
285 %attr(755,root,root) %{_bindir}/gdalimport.py
286 %attr(755,root,root) %{_bindir}/gdalinfo
287 %attr(755,root,root) %{_bindir}/gdalmanage
288 %attr(755,root,root) %{_bindir}/gdaltindex
289 %attr(755,root,root) %{_bindir}/gdaltransform
290 %attr(755,root,root) %{_bindir}/gdalwarp
291 %attr(755,root,root) %{_bindir}/mkgraticule.py
292 %attr(755,root,root) %{_bindir}/nearblack
293 %attr(755,root,root) %{_bindir}/ogr2ogr
294 %attr(755,root,root) %{_bindir}/ogrinfo
295 %attr(755,root,root) %{_bindir}/ogrtindex
296 %attr(755,root,root) %{_bindir}/pct2rgb.py
297 %attr(755,root,root) %{_bindir}/rgb2pct.py
298 %attr(755,root,root) %{_bindir}/testepsg
299 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
300 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
302 %{_mandir}/man1/gdal2tiles.1*
303 %{_mandir}/man1/gdal_contour.1*
304 %{_mandir}/man1/gdal_fillnodata.1*
305 %{_mandir}/man1/gdal_grid.1*
306 %{_mandir}/man1/gdal_merge.1*
307 %{_mandir}/man1/gdal_rasterize.1*
308 %{_mandir}/man1/gdal_retile.1*
309 %{_mandir}/man1/gdal_sieve.1*
310 %{_mandir}/man1/gdal_translate.1*
311 %{_mandir}/man1/gdal_utilities.1*
312 %{_mandir}/man1/gdaladdo.1*
313 %{_mandir}/man1/gdalbuildvrt.1*
314 %{_mandir}/man1/gdaldem.1*
315 %{_mandir}/man1/gdalinfo.1*
316 %{_mandir}/man1/gdaltindex.1*
317 %{_mandir}/man1/gdaltransform.1*
318 %{_mandir}/man1/gdalwarp.1*
319 %{_mandir}/man1/nearblack.1*
320 %{_mandir}/man1/ogr2ogr.1*
321 %{_mandir}/man1/ogr_utilities.1*
322 %{_mandir}/man1/ogrinfo.1*
323 %{_mandir}/man1/ogrtindex.1*
324 %{_mandir}/man1/pct2rgb.1*
325 %{_mandir}/man1/rgb2pct.1*
328 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_bindir}/gdal-config
331 %attr(755,root,root) %{_libdir}/libgdal.so
332 %{_libdir}/libgdal.la
333 %{_includedir}/cpl_*.h
334 %{_includedir}/cplkeywordparser.h
335 %{_includedir}/gdal*.h
336 %{_includedir}/gvgcpfit.h
337 %{_includedir}/memdataset.h
338 %{_includedir}/ogr_*.h
339 %{_includedir}/ogrsf_frmts.h
340 %{_includedir}/rawdataset.h
341 %{_includedir}/thinplatespline.h
342 %{_includedir}/vrtdataset.h
343 %{_mandir}/man1/gdal-config.1*
346 %defattr(644,root,root,755)
350 %defattr(644,root,root,755)
351 %dir %{perl_vendorarch}/Geo
352 %{perl_vendorarch}/Geo/GDAL.pm
353 %dir %{perl_vendorarch}/Geo/GDAL
354 %{perl_vendorarch}/Geo/GDAL/Const.pm
355 %{perl_vendorarch}/Geo/OGR.pm
356 %{perl_vendorarch}/Geo/OSR.pm
357 %dir %{perl_vendorarch}/auto/Geo
358 %dir %{perl_vendorarch}/auto/Geo/GDAL
359 %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
360 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
361 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
362 %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
363 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
364 %dir %{perl_vendorarch}/auto/Geo/OGR
365 %{perl_vendorarch}/auto/Geo/OGR/OGR.bs
366 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
367 %dir %{perl_vendorarch}/auto/Geo/OSR
368 %{perl_vendorarch}/auto/Geo/OSR/OSR.bs
369 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
371 %files -n python-gdal
372 %defattr(644,root,root,755)
373 %{py_sitedir}/gdal.py[co]
374 %{py_sitedir}/gdalconst.py[co]
375 %{py_sitedir}/gdalnumeric.py[co]
376 %{py_sitedir}/ogr.py[co]
377 %{py_sitedir}/osr.py[co]
378 %{py_sitedir}/GDAL-*.egg-info
379 %dir %{py_sitedir}/osgeo
380 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
381 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
382 %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
383 %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
384 %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
385 %{py_sitedir}/osgeo/*.py[co]
389 %defattr(644,root,root,755)
390 %dir %{ruby_sitearchdir}/gdal
391 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
392 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
393 %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
394 %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so