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