2 # - be reasonable about devel dependencies - you do not need all of them to
4 # - spatialite (--with-spatialite; libspatialite: http://www.gaia-gis.it/gaia-sins/)
5 # - freexl (http://www.gaia-gis.it/FreeXL/)
6 # - rasdaman (--with-rasdaman; http://rasdaman.eecs.jacobs-university.de/trac/rasdaman/wiki/Download)
7 # - armadillo (--with-armadillo; http://arma.sourceforge.net/)
8 # - openjpeg (unreleased post-1.5 or 2? needs opj_decode_tile_data symbol, not available in 1.3-1.5)
9 # - libjpeg12 (needs patching to use system one)
10 # - libkml (1.3.0 needed, not released yet)
11 # - wait for newer pcidsk, switch to external again
12 # - csharp, java, mysql
13 # - additional, proprietary(?) formats support:
14 # - FMEObjects (http://www.safe.com/support/support-resources/fme-downloads/)
15 # - ESRI FileGDBAPI (http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api)
16 # - ECW (http://www.erdas.com/products/ecw/ERDASECWJPEG2000SDK/Details.aspx)
17 # - Kakadu/JPEG2000 (http://www.kakadusoftware.com/)
18 # - MrSID (http://www.lizardtech.com/developer/)
19 # - MSG/EUMETSAT (http://www.eumetsat.int/Home/Main/DataAccess/SupportSoftwareTools/index.htm)
20 # - Oracle/OCI >= 10.0.1 (for georaster); Oracle/OCI >= 8.1.7 (as DB)
21 # - Ingres (--with-ingres=/path)
23 # - DWGdirect (members only? http://www.opendwg.org/)
24 # - ESRI SDE (http://www.esri.com/software/arcgis/arcsde/index.html)
25 # - OpenCL (--with-opencl; no free Linux implementation yet?)
28 %bcond_without epsilon # EPSILON wavelet compression support
29 %bcond_without gta # GTA format support
30 %bcond_without odbc # disable ODBC DB support
31 %bcond_with podofo # PDF support via podofo instead of poppler
32 %bcond_without poppler # PDF support via poppler
33 %bcond_without xerces # disable xerces support
34 %bcond_without java # disable Java and MDB support
35 %bcond_without php # disable PHP binding
36 %bcond_without ruby # disable ruby binding
39 %undefine with_poppler
41 Summary: Geospatial Data Abstraction Library
42 Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
48 Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
49 # Source0-md5: 1853f3d8eb5232ae030abe007840cade
50 Patch0: %{name}-perl.patch
51 Patch1: %{name}-python_install.patch
52 Patch2: %{name}-doxy.patch
53 Patch3: %{name}-sh.patch
54 Patch4: %{name}-php.patch
55 Patch5: %{name}-fpic.patch
56 URL: http://www.gdal.org/
57 BuildRequires: autoconf >= 2.52
58 BuildRequires: automake
59 BuildRequires: cfitsio-devel
60 BuildRequires: curl-devel
61 BuildRequires: doxygen >= 1.4.2
62 %{?with_epsilon:BuildRequires: epsilon-compressor-devel}
63 BuildRequires: expat-devel >= 1.95.0
64 BuildRequires: geos-devel >= 2.2.0
65 BuildRequires: giflib-devel >= 4.0
66 BuildRequires: hdf-devel >= 4.0
67 BuildRequires: hdf5-devel
68 BuildRequires: jasper-devel
69 %{?with_java:BuildRequires: jdk}
70 %{?with_java:BuildRequires: jpackage-utils}
71 BuildRequires: libcsf-devel
72 BuildRequires: libdap-devel >= 3.10
73 BuildRequires: libgeotiff-devel >= 1.2.1
74 %{?with_gta:BuildRequires: libgta-devel}
75 BuildRequires: libjpeg-devel >= 6b
76 #BuildRequires: libkml-devel >= 1.3.0
77 BuildRequires: libpng-devel >= 2:1.2.8
78 BuildRequires: libstdc++-devel
79 BuildRequires: libtiff-devel >= 4.0
80 BuildRequires: libtool
81 BuildRequires: libuuid-devel
82 BuildRequires: libwebp-devel
83 BuildRequires: libxml2-devel
84 BuildRequires: netcdf-devel >= 4
85 BuildRequires: ogdi-devel >= 3.1
86 #BuildRequires: pcidsk-devel > 0.3
87 BuildRequires: perl-devel
88 %{?with_php:BuildRequires: php-devel}
89 %{?with_podofo:BuildRequires: podofo-devel}
90 %{?with_poppler:BuildRequires: poppler-devel}
91 # ensure it's compiled with PQescapeStringConn support
92 BuildRequires: postgresql-backend-devel >= 8.1.4
93 BuildRequires: postgresql-devel >= 8.1.4
94 BuildRequires: proj-devel >= 4
95 BuildRequires: python-devel >= 1:2.5
96 BuildRequires: python-numpy-devel >= 1:1.0.0
97 BuildRequires: python-setuptools
98 BuildRequires: rpm-pythonprov
99 BuildRequires: rpmbuild(macros) >= 1.344
100 %{?with_ruby:BuildRequires: ruby-devel}
101 BuildRequires: sed >= 4.0
102 BuildRequires: sqlite3-devel >= 3.0.0
103 BuildRequires: swig-perl
104 BuildRequires: swig-python >= 1.3
105 %{?with_ruby:BuildRequires: swig-ruby}
106 %if "%{pld_release}" == "ti"
107 BuildRequires: tetex-format-latex
108 BuildRequires: tetex-dvips
110 BuildRequires: texlive-dvips
111 BuildRequires: texlive-latex
113 %{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15}
114 %{?with_xerces:BuildRequires: xerces-c-devel >= 2.7.0}
115 BuildRequires: xz-devel
116 BuildRequires: zlib-devel >= 1.1.4
117 Requires: geos >= 2.2.0
118 Requires: libgeotiff >= 1.2.1
119 Requires: libpng >= 2:1.2.8
120 Requires: libtiff >= 4.0
121 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
124 GDAL is a translator library for raster geospatial data formats that
125 is released under an Open Source license. As a library, it presents a
126 single abstract data model to the calling application for all
127 supported formats. The related OGR library (which lives within the
128 GDAL source tree) provides a similar capability for simple features
131 %description -l pl.UTF-8
132 GDAL to biblioteka konwertująca między formatami rastrowych danych
133 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
134 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
135 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
136 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
137 możliwości dla danych wektorowych.
140 Summary: GDAL library header files
141 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
142 Group: Development/Libraries
143 Requires: %{name} = %{version}-%{release}
144 Requires: cfitsio-devel
146 %{?with_epsilon:Requires: epsilon-compressor-devel}
147 Requires: expat-devel >= 1.95.0
148 Requires: geos-devel >= 2.2.0
149 Requires: giflib-devel >= 4.0
150 Requires: hdf-devel >= 4.0
152 Requires: jasper-devel
153 Requires: libcsf-devel
154 Requires: libdap-devel >= 3.10
155 Requires: libgeotiff-devel >= 1.2.1
156 %{?with_gta:Requires: libgta-devel}
157 Requires: libjpeg-devel >= 6b
158 Requires: libpng-devel >= 2:1.2.8
159 Requires: libstdc++-devel
160 Requires: libtiff-devel >= 4.0
161 Requires: libuuid-devel
162 Requires: libwebp-devel
163 Requires: libxml2-devel
164 Requires: netcdf-devel >= 4
165 Requires: ogdi-devel >= 3.1
166 #Requires: pcidsk-devel > 0.3
167 %{?with_podofo:Requires: podofo-devel}
168 %{?with_poppler:Requires: poppler-devel}
169 Requires: postgresql-devel
170 Requires: proj-devel >= 4
171 Requires: sqlite3-devel >= 3.0.0
172 %{?with_odbc:Requires: unixODBC-devel}
173 %{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
175 Requires: zlib-devel >= 1.1.4
178 GDAL library header files.
180 %description devel -l pl.UTF-8
181 Pliki nagłówkowe biblioteki GDAL.
184 Summary: GDAL static libraries
185 Summary(pl.UTF-8): Statyczne biblioteki GDAL
186 Group: Development/Libraries
187 Requires: %{name}-devel = %{version}-%{release}
190 GDAL static libraries.
192 %description static -l pl.UTF-8
193 Statyczne biblioteki GDAL.
195 %package -n perl-gdal
196 Summary: Perl bindings for GDAL
197 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
198 Group: Development/Languages/Perl
199 Requires: %{name} = %{version}-%{release}
201 %description -n perl-gdal
202 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
204 %description -n perl-gdal -l pl.UTF-8
205 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
208 Summary: PHP bindings for GDAL library
209 Summary(pl.UTF-8): Wiązania PHP do biblioteki GDAL
210 Group: Development/Languages/PHP
211 Requires: %{name} = %{version}-%{release}
212 %{?requires_php_extension}
214 %description -n php-gdal
215 PHP bindings for GDAL library
217 %description -n php-gdal -l pl.UTF-8
218 Wiązania PHP do biblioteki GDAL.
220 %package -n python-gdal
221 Summary: GDAL Python module
222 Summary(pl.UTF-8): Moduł Pythona GDAL
223 Group: Libraries/Python
224 Requires: %{name} = %{version}-%{release}
225 %pyrequires_eq python-libs
227 %description -n python-gdal
230 %description -n python-gdal -l pl.UTF-8
233 %package -n ruby-gdal
234 Summary: Ruby bindings for GDAL
235 Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
236 Group: Development/Languages
237 Requires: %{name} = %{version}-%{release}
238 %{?ruby_mod_ver_requires_eq}
240 %description -n ruby-gdal
241 Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
243 %description -n ruby-gdal -l pl.UTF-8
244 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
256 # need to regenerate (old ones don't support perl 5.10)
257 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
261 %{__sed} -i -e 's,DODS_INC="-I.*,DODS_INC="$(pkg-config --cflags libdap)",' configure.in
267 # disable grass/libgrass here, it can be built from separate gdal-grass package
269 --datadir=%{_datadir}/gdal \
270 --with-dods-root=/usr \
271 %{?with_epsilon:--with-epsilon} \
272 %{!?with_gta:--without-gta} \
273 --with-hide-internal-symbols \
274 %{?with_java:--with-java=%{java_home}} \
276 %{?with_java:--with-mdb --with-jvm-lib-add-rpath} \
278 %{?with_php:--with-php} \
279 %{?with_podofo:--with-podofo} \
280 %{?with_poppler:--with-poppler} \
282 %{?with_ruby:--with-ruby} \
285 %{?with_xerces:--with-xerces} \
286 --with-xerces-inc=/usr/include/xercesc \
287 --with-xerces-lib="-lxerces-c" \
290 # --with-pcidsk=/usr (needs > 0.3)
291 # csharp builds, but has no configure option
293 # regenerate where needed
294 %{__make} -j1 -C swig/perl generate
295 %{?with_ruby:%{__make} -j1 -C swig/ruby generate}
304 rm -rf $RPM_BUILD_ROOT
306 %{__make} -j1 install install-man \
307 DESTDIR=$RPM_BUILD_ROOT
311 cp -a ogr/html _html/ogr
314 # missing in make install
315 install -D swig/php/php_gdal.so $RPM_BUILD_ROOT%{php_extensiondir}/gdal.so
316 install -D swig/php/php_gdalconst.so $RPM_BUILD_ROOT%{php_extensiondir}/gdalconst.so
317 install -D swig/php/php_ogr.so $RPM_BUILD_ROOT%{php_extensiondir}/ogr.so
318 install -D swig/php/php_osr.so $RPM_BUILD_ROOT%{php_extensiondir}/osr.so
319 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
320 cat <<'EOF' >$RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/gdal.ini
321 ; Enable gdal extension module
323 extension=gdalconst.so
329 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
330 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
333 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
334 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
335 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
336 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
337 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
340 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/{GDAL.dox,GDAL/Const.dox,OGR.dox,OSR.dox}
341 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/check_dox.pl
342 %{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal_{fillnodata,sieve}.dox
345 rm -rf $RPM_BUILD_ROOT
347 %post -p /sbin/ldconfig
348 %postun -p /sbin/ldconfig
351 %defattr(644,root,root,755)
352 %doc NEWS PROVENANCE.TXT
353 %attr(755,root,root) %{_bindir}/epsg_tr.py
354 %attr(755,root,root) %{_bindir}/esri2wkt.py
355 %attr(755,root,root) %{_bindir}/gcps2vec.py
356 %attr(755,root,root) %{_bindir}/gcps2wld.py
357 %attr(755,root,root) %{_bindir}/gdal2tiles.py
358 %attr(755,root,root) %{_bindir}/gdal2xyz.py
359 %attr(755,root,root) %{_bindir}/gdal_contour
360 %attr(755,root,root) %{_bindir}/gdal_calc.py
361 %attr(755,root,root) %{_bindir}/gdal_fillnodata.py
362 %attr(755,root,root) %{_bindir}/gdal_grid
363 %attr(755,root,root) %{_bindir}/gdal_merge.py
364 %attr(755,root,root) %{_bindir}/gdal_polygonize.py
365 %attr(755,root,root) %{_bindir}/gdal_proximity.py
366 %attr(755,root,root) %{_bindir}/gdal_rasterize
367 %attr(755,root,root) %{_bindir}/gdal_retile.py
368 %attr(755,root,root) %{_bindir}/gdal_sieve.py
369 %attr(755,root,root) %{_bindir}/gdal_translate
370 %attr(755,root,root) %{_bindir}/gdaladdo
371 %attr(755,root,root) %{_bindir}/gdalbuildvrt
372 %attr(755,root,root) %{_bindir}/gdalchksum.py
373 %attr(755,root,root) %{_bindir}/gdaldem
374 %attr(755,root,root) %{_bindir}/gdalenhance
375 %attr(755,root,root) %{_bindir}/gdalident.py
376 %attr(755,root,root) %{_bindir}/gdalimport.py
377 %attr(755,root,root) %{_bindir}/gdalinfo
378 %attr(755,root,root) %{_bindir}/gdallocationinfo
379 %attr(755,root,root) %{_bindir}/gdalmanage
380 %attr(755,root,root) %{_bindir}/gdalsrsinfo
381 %attr(755,root,root) %{_bindir}/gdaltindex
382 %attr(755,root,root) %{_bindir}/gdaltransform
383 %attr(755,root,root) %{_bindir}/gdalwarp
384 %attr(755,root,root) %{_bindir}/mkgraticule.py
385 %attr(755,root,root) %{_bindir}/nearblack
386 %attr(755,root,root) %{_bindir}/ogr2ogr
387 %attr(755,root,root) %{_bindir}/ogrinfo
388 %attr(755,root,root) %{_bindir}/ogrtindex
389 %attr(755,root,root) %{_bindir}/pct2rgb.py
390 %attr(755,root,root) %{_bindir}/rgb2pct.py
391 %attr(755,root,root) %{_bindir}/testepsg
392 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
393 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
395 %{_mandir}/man1/gdal2tiles.1*
396 %{_mandir}/man1/gdal_contour.1*
397 %{_mandir}/man1/gdal_fillnodata.1*
398 %{_mandir}/man1/gdal_grid.1*
399 %{_mandir}/man1/gdal_merge.1*
400 %{_mandir}/man1/gdal_rasterize.1*
401 %{_mandir}/man1/gdal_retile.1*
402 %{_mandir}/man1/gdal_sieve.1*
403 %{_mandir}/man1/gdal_translate.1*
404 %{_mandir}/man1/gdal_utilities.1*
405 %{_mandir}/man1/gdaladdo.1*
406 %{_mandir}/man1/gdalbuildvrt.1*
407 %{_mandir}/man1/gdaldem.1*
408 %{_mandir}/man1/gdalinfo.1*
409 %{_mandir}/man1/gdallocationinfo.1*
410 %{_mandir}/man1/gdalsrsinfo.1*
411 %{_mandir}/man1/gdaltindex.1*
412 %{_mandir}/man1/gdaltransform.1*
413 %{_mandir}/man1/gdalwarp.1*
414 %{_mandir}/man1/nearblack.1*
415 %{_mandir}/man1/ogr2ogr.1*
416 %{_mandir}/man1/ogr_utilities.1*
417 %{_mandir}/man1/ogrinfo.1*
418 %{_mandir}/man1/ogrtindex.1*
419 %{_mandir}/man1/pct2rgb.1*
420 %{_mandir}/man1/rgb2pct.1*
423 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_bindir}/gdal-config
426 %attr(755,root,root) %{_libdir}/libgdal.so
427 %{_libdir}/libgdal.la
428 %{_includedir}/cpl_*.h
429 %{_includedir}/cplkeywordparser.h
430 %{_includedir}/gdal*.h
431 %{_includedir}/gvgcpfit.h
432 %{_includedir}/memdataset.h
433 %{_includedir}/ogr_*.h
434 %{_includedir}/ogrsf_frmts.h
435 %{_includedir}/rawdataset.h
436 %{_includedir}/thinplatespline.h
437 %{_includedir}/vrtdataset.h
438 %{_mandir}/man1/gdal-config.1*
441 %defattr(644,root,root,755)
445 %defattr(644,root,root,755)
446 %dir %{perl_vendorarch}/Geo
447 %{perl_vendorarch}/Geo/GDAL.pm
448 %dir %{perl_vendorarch}/Geo/GDAL
449 %{perl_vendorarch}/Geo/GDAL/Const.pm
450 %{perl_vendorarch}/Geo/OGR.pm
451 %{perl_vendorarch}/Geo/OSR.pm
452 %dir %{perl_vendorarch}/auto/Geo
453 %dir %{perl_vendorarch}/auto/Geo/GDAL
454 %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
455 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
456 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
457 %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
458 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
459 %dir %{perl_vendorarch}/auto/Geo/OGR
460 %{perl_vendorarch}/auto/Geo/OGR/OGR.bs
461 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
462 %dir %{perl_vendorarch}/auto/Geo/OSR
463 %{perl_vendorarch}/auto/Geo/OSR/OSR.bs
464 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
468 %defattr(644,root,root,755)
469 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/gdal.ini
470 %attr(755,root,root) %{php_extensiondir}/gdal.so
471 %attr(755,root,root) %{php_extensiondir}/gdalconst.so
472 %attr(755,root,root) %{php_extensiondir}/ogr.so
473 %attr(755,root,root) %{php_extensiondir}/osr.so
476 %files -n python-gdal
477 %defattr(644,root,root,755)
478 %{py_sitedir}/gdal.py[co]
479 %{py_sitedir}/gdalconst.py[co]
480 %{py_sitedir}/gdalnumeric.py[co]
481 %{py_sitedir}/ogr.py[co]
482 %{py_sitedir}/osr.py[co]
483 %{py_sitedir}/GDAL-*.egg-info
484 %dir %{py_sitedir}/osgeo
485 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
486 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
487 %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
488 %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
489 %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
490 %{py_sitedir}/osgeo/*.py[co]
494 %defattr(644,root,root,755)
495 %dir %{ruby_sitearchdir}/gdal
496 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
497 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
498 %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
499 %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so