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