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 # - MongoCXX (mongo/client/dbclient.h, -lmongoclient -lboost_system -lboost_thread -lboost_regex)
8 # - libjpeg12 (needs patching to use system one, --with-jpeg12 is not sufficient as of 1.9.2)
9 # - libkml (1.3.0 needed, not released yet)
10 # - wait for newer pcidsk, switch to external again
12 # - additional, proprietary(?) formats support:
13 # - FMEObjects (http://www.safe.com/support/support-resources/fme-downloads/)
14 # - ESRI FileGDBAPI (http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api)
15 # - ECW (http://www.erdas.com/products/ecw/ERDASECWJPEG2000SDK/Details.aspx)
16 # - Kakadu/JPEG2000 (http://www.kakadusoftware.com/)
17 # - MrSID (http://www.lizardtech.com/developer/)
19 # - MSG/EUMETSAT (http://www.eumetsat.int/Home/Main/DataAccess/SupportSoftwareTools/index.htm)
20 # - Ingres (--with-ingres=/path)
21 # - Informix DB (--with-idb)
22 # - DWGdirect (members only? http://www.opendwg.org/)
23 # - ESRI SDE (http://www.esri.com/software/arcgis/arcsde/index.html)
24 # - Teigha DWG/DGN (https://www.opendesign.com/products/drawings?)
27 %bcond_without armadillo # Armadillo support for faster TPS transform
28 %bcond_without crnlib # DDS support via crunch/crnlib
29 %bcond_without epsilon # EPSILON wavelet compression support
30 %bcond_without fyba # SOSI geodata support using FYBA
31 %bcond_with grass # GRASS support (note: dependency loop; use gdal-grass.spec instead)
32 %bcond_without gta # GTA format support
33 %bcond_without kea # KEA format support
34 %bcond_without mysql # MySQL DB support
35 %bcond_with oci # ORACLE OCI DB and Georaster support
36 %bcond_without odbc # ODBC DB support
37 %bcond_without opencl # OpenCL (GPU) support
38 %bcond_without openjpeg # OpenJPEG 2 (JPEG2000) support
39 %bcond_with podofo # PDF support via podofo instead of poppler
40 %bcond_without poppler # PDF support via poppler
41 %bcond_with rasdaman # Rasdaman support
42 %bcond_with spatialite # SpatiaLite support
43 %bcond_without xerces # Xerces support
44 %bcond_without java # Java and MDB support
47 %undefine with_poppler
49 Summary: Geospatial Data Abstraction Library
50 Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
56 Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz
57 # Source0-md5: 794096364a50df4bc7c5b710d997b6b4
58 Patch0: %{name}-perl.patch
59 Patch1: %{name}-poppler.patch
60 Patch2: %{name}-pc.patch
61 Patch9: %{name}-dds.patch
62 Patch12: %{name}-rasdaman.patch
63 Patch13: %{name}-pluginsdir.patch
65 URL: http://www.gdal.org/
66 # 1.x or 2.x supported
67 BuildRequires: CharLS-devel
68 %{?with_opencl:BuildRequires: OpenCL-devel >= 1.0}
69 %{?with_armadillo:BuildRequires: armadillo-devel}
70 BuildRequires: autoconf >= 2.52
71 BuildRequires: automake
72 BuildRequires: cfitsio-devel
73 %{?with_crnlib:BuildRequires: crnlib-devel}
74 BuildRequires: cryptopp-devel
75 BuildRequires: curl-devel
76 BuildRequires: doxygen >= 1.4.2
77 %{?with_epsilon:BuildRequires: epsilon-compressor-devel}
78 BuildRequires: expat-devel >= 1.95.0
79 %{?with_fyba:BuildRequires: fyba-devel}
80 BuildRequires: freexl-devel >= 1.0
81 BuildRequires: gcc >= 6:4.1
82 BuildRequires: geos-devel >= 3.1.0
83 BuildRequires: giflib-devel >= 4.0
84 %{?with_grass:BuildRequires: grass-devel >= 6.4}
85 BuildRequires: hdf-devel >= 4.2.5
86 BuildRequires: hdf5-devel
87 BuildRequires: jasper-devel
88 %{?with_java:BuildRequires: jdk}
89 %{?with_java:BuildRequires: jpackage-utils}
90 BuildRequires: json-c-devel >= 0.11
91 %{?with_kea:BuildRequires: kealib-devel}
92 BuildRequires: libcsf-devel >= 2.0-0.041111.6
93 BuildRequires: libdap-devel >= 3.10
94 BuildRequires: libgeotiff-devel >= 1.2.1
95 %{?with_gta:BuildRequires: libgta-devel}
96 BuildRequires: libjpeg-devel >= 6b
97 #BuildRequires: libkml-devel >= 1.3.0
98 BuildRequires: libpng-devel >= 2:1.2.8
99 %{?with_spatialite:BuildRequires: libspatialite-devel}
100 BuildRequires: libstdc++-devel
101 BuildRequires: libtiff-devel >= 4.0
102 BuildRequires: libtool
103 BuildRequires: libuuid-devel
104 BuildRequires: libwebp-devel
105 BuildRequires: libxml2-devel >= 2
106 #%{?with_mysql:BuildRequires: mysql-devel >= 4}
107 %{?with_mysql:BuildRequires: /usr/bin/mysql_config}
108 BuildRequires: netcdf-devel >= 4.1
109 BuildRequires: ogdi-devel >= 3.1
110 %{?with_openjpeg:BuildRequires: openjpeg2-devel >= 2.1.0}
111 # 8.1.7 for DB support, 10.0.1 for georaster
112 %{?with_oci:BuildRequires: oracle-instantclient-devel >= 10.0.1}
113 #BuildRequires: pcidsk-devel > 0.3
114 BuildRequires: pcre-devel
115 BuildRequires: perl-devel
116 BuildRequires: pkgconfig >= 1:0.21
117 %{?with_podofo:BuildRequires: podofo-devel}
118 %{?with_poppler:BuildRequires: poppler-devel >= 0.24}
119 # ensure it's compiled with PQescapeStringConn support
120 BuildRequires: postgresql-backend-devel >= 8.1.4
121 BuildRequires: postgresql-devel >= 8.1.4
122 BuildRequires: proj-devel >= 4
123 BuildRequires: python-devel >= 1:2.5
124 BuildRequires: python-numpy-devel >= 1:1.0.0
125 BuildRequires: python-setuptools
126 BuildRequires: qhull-devel >= 2012
127 %{?with_rasdaman:BuildRequires: rasdaman-devel}
128 BuildRequires: rpm-pythonprov
129 BuildRequires: rpmbuild(macros) >= 1.344
130 BuildRequires: sed >= 4.0
131 BuildRequires: sqlite3-devel >= 3.0.0
132 BuildRequires: swig-perl
133 BuildRequires: swig-python >= 1.3
134 BuildRequires: texlive-dvips
135 BuildRequires: texlive-latex
136 %{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15}
137 %{?with_xerces:BuildRequires: xerces-c-devel >= 3.1.0}
138 BuildRequires: xz-devel
139 BuildRequires: zlib-devel >= 1.1.4
140 # for ZSTD compression in TIFF
141 BuildRequires: zstd-devel
142 Requires: freexl >= 1.0
143 Requires: geos >= 3.1.0
144 Requires: hdf >= 4.2.5
145 Requires: libgeotiff >= 1.2.1
146 Requires: libpng >= 2:1.2.8
147 Requires: libtiff >= 4.0
148 %{?with_openjpeg:Requires: openjpeg2 >= 2.1.0}
149 Requires: qhull >= 2012
150 %{?with_xerces:Requires: xerces-c >= 3.1.0}
151 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
154 GDAL is a translator library for raster geospatial data formats that
155 is released under an Open Source license. As a library, it presents a
156 single abstract data model to the calling application for all
157 supported formats. The related OGR library (which lives within the
158 GDAL source tree) provides a similar capability for simple features
161 %description -l pl.UTF-8
162 GDAL to biblioteka konwertująca między formatami rastrowych danych
163 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
164 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
165 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
166 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
167 możliwości dla danych wektorowych.
170 Summary: GDAL library header files
171 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
172 Group: Development/Libraries
173 Requires: %{name} = %{version}-%{release}
174 Requires: CharLS-devel
175 %{?with_opencl:Requires: OpenCL-devel >= 1.0}
176 %{?with_armadillo:Requires: armadillo-devel}
177 Requires: cfitsio-devel
178 %{?with_crnlib:Requires: crnlib-devel}
179 Requires: cryptopp-devel
181 %{?with_epsilon:Requires: epsilon-compressor-devel}
182 %{?with_fyba:Requires: fyba-devel}
183 Requires: expat-devel >= 1.95.0
184 Requires: freexl-devel >= 1.0
185 Requires: geos-devel >= 3.1.0
186 Requires: giflib-devel >= 4.0
187 Requires: hdf-devel >= 4.2.5
189 Requires: jasper-devel
190 Requires: json-c-devel >= 0.11
191 %{?with_kea:Requires: kealib-devel}
192 Requires: libcsf-devel
193 Requires: libdap-devel >= 3.10
194 Requires: libgeotiff-devel >= 1.2.1
195 %{?with_gta:Requires: libgta-devel}
196 Requires: libjpeg-devel >= 6b
197 Requires: libpng-devel >= 2:1.2.8
198 %{?with_spatialite:Requires: libspatialite-devel}
199 Requires: libstdc++-devel
200 Requires: libtiff-devel >= 4.0
201 Requires: libuuid-devel
202 Requires: libwebp-devel
203 Requires: libxml2-devel >= 2
204 %{?with_mysql:Requires: /usr/bin/mysql_config}
205 Requires: netcdf-devel >= 4
206 Requires: ogdi-devel >= 3.1
207 %{?with_openjpeg:Requires: openjpeg2-devel >= 2.1.0}
208 #Requires: pcidsk-devel > 0.3
210 %{?with_podofo:Requires: podofo-devel}
211 %{?with_poppler:Requires: poppler-devel >= 0.24}
212 Requires: postgresql-devel
213 Requires: proj-devel >= 4
214 Requires: qhull-devel >= 2012
215 %{?with_rasdaman:Requires: rasdaman-devel}
216 Requires: sqlite3-devel >= 3.0.0
217 %{?with_odbc:Requires: unixODBC-devel}
218 %{?with_xerces:Requires: xerces-c-devel >= 3.1.0}
220 Requires: zlib-devel >= 1.1.4
224 GDAL library header files.
226 %description devel -l pl.UTF-8
227 Pliki nagłówkowe biblioteki GDAL.
230 Summary: GDAL static libraries
231 Summary(pl.UTF-8): Statyczne biblioteki GDAL
232 Group: Development/Libraries
233 Requires: %{name}-devel = %{version}-%{release}
236 GDAL static libraries.
238 %description static -l pl.UTF-8
239 Statyczne biblioteki GDAL.
241 %package -n perl-gdal
242 Summary: Perl bindings for GDAL
243 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
244 Group: Development/Languages/Perl
245 Requires: %{name} = %{version}-%{release}
247 %description -n perl-gdal
248 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
250 %description -n perl-gdal -l pl.UTF-8
251 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
253 %package -n python-gdal
254 Summary: GDAL Python module
255 Summary(pl.UTF-8): Moduł Pythona GDAL
256 Group: Libraries/Python
257 Requires: %{name} = %{version}-%{release}
258 Requires: python-libs
260 %description -n python-gdal
263 %description -n python-gdal -l pl.UTF-8
276 # need to regenerate (old ones don't support perl 5.10)
277 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
280 sed -i -e 's#^mandir=.*##g' configure.ac
284 %{__sed} -i -e 's,DODS_INC="-I.*,DODS_INC="$(pkg-config --cflags libdap)",' configure.ac
302 --includedir=%{_includedir}/gdal \
303 --datadir=%{_datadir}/gdal \
304 --with-dods-root=/usr \
305 %{?with_armadillo:--with-armadillo} \
306 %{?with_crnlib:--with-dds} \
307 %{?with_epsilon:--with-epsilon} \
308 %{?with_grass:--with-grass} \
309 %{!?with_gta:--without-gta} \
310 --with-hide-internal-symbols \
311 %{?with_java:--with-java=%{java_home}} \
313 %{!?with_kea:--without-kea} \
314 %{?with_java:--with-mdb --with-jvm-lib-add-rpath --with-jvm-lib=%{java_home}/jre/lib/$jvm_arch/server} \
315 %{?with_mysql:--with-mysql} \
316 %{?with_oci:--with-oci --with-oci-include=/usr/include/oracle/client --with-oci-lib=%{_libdir}} \
317 %{?with_opencl:--with-opencl} \
319 %{?with_podofo:--with-podofo} \
320 %{?with_poppler:--with-poppler} \
322 %{?with_rasdaman:--with-rasdaman=%{_libdir}/rasdaman} \
323 %{?with_fyba:--with-sosi} \
324 %{?with_spatialite:--with-spatialite} \
327 %{?with_xerces:--with-xerces} \
328 --with-xerces-inc=/usr/include \
329 --with-xerces-lib="-lxerces-c" \
331 # --with-pcidsk=/usr (needs > 0.3)
332 # csharp builds, but has no configure option nor install target
334 # regenerate where needed
335 %{__make} -j1 -C swig/perl generate
338 %{?with_grass:GRASS_INCLUDE="-I/usr/include/grass64"} \
339 %{?with_fyba:SOSI_INC="-I/usr/include/fyba"}
346 rm -rf $RPM_BUILD_ROOT
348 %{__make} -j1 install install-man \
349 DESTDIR=$RPM_BUILD_ROOT
351 # TODO: remove libgdal.la when gdal.pc gets maintained Requires.private/Libs.private list
356 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
357 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
360 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
361 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
362 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
363 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
364 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
367 rm -rf $RPM_BUILD_ROOT
369 %post -p /sbin/ldconfig
370 %postun -p /sbin/ldconfig
373 %defattr(644,root,root,755)
374 %doc NEWS PROVENANCE.TXT
375 %attr(755,root,root) %{_bindir}/epsg_tr.py
376 %attr(755,root,root) %{_bindir}/esri2wkt.py
377 %attr(755,root,root) %{_bindir}/gcps2vec.py
378 %attr(755,root,root) %{_bindir}/gcps2wld.py
379 %attr(755,root,root) %{_bindir}/gdal2tiles.py
380 %attr(755,root,root) %{_bindir}/gdal2xyz.py
381 %attr(755,root,root) %{_bindir}/gdaladdo
382 %attr(755,root,root) %{_bindir}/gdal_auth.py
383 %attr(755,root,root) %{_bindir}/gdalbuildvrt
384 %attr(755,root,root) %{_bindir}/gdal_calc.py
385 %attr(755,root,root) %{_bindir}/gdalchksum.py
386 %attr(755,root,root) %{_bindir}/gdalcompare.py
387 %attr(755,root,root) %{_bindir}/gdal_contour
388 %attr(755,root,root) %{_bindir}/gdaldem
389 %attr(755,root,root) %{_bindir}/gdal_edit.py
390 %attr(755,root,root) %{_bindir}/gdalenhance
391 %attr(755,root,root) %{_bindir}/gdal_fillnodata.py
392 %attr(755,root,root) %{_bindir}/gdal_grid
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}/gdal_merge.py
399 %attr(755,root,root) %{_bindir}/gdalmove.py
400 %attr(755,root,root) %{_bindir}/gdal_pansharpen.py
401 %attr(755,root,root) %{_bindir}/gdal_polygonize.py
402 %attr(755,root,root) %{_bindir}/gdal_proximity.py
403 %attr(755,root,root) %{_bindir}/gdal_rasterize
404 %attr(755,root,root) %{_bindir}/gdal_retile.py
405 %attr(755,root,root) %{_bindir}/gdalserver
406 %attr(755,root,root) %{_bindir}/gdal_sieve.py
407 %attr(755,root,root) %{_bindir}/gdalsrsinfo
408 %attr(755,root,root) %{_bindir}/gdaltindex
409 %attr(755,root,root) %{_bindir}/gdaltransform
410 %attr(755,root,root) %{_bindir}/gdal_translate
411 %attr(755,root,root) %{_bindir}/gdalwarp
412 %attr(755,root,root) %{_bindir}/gnmanalyse
413 %attr(755,root,root) %{_bindir}/gnmmanage
414 %attr(755,root,root) %{_bindir}/mkgraticule.py
415 %attr(755,root,root) %{_bindir}/nearblack
416 %attr(755,root,root) %{_bindir}/ogr2ogr
417 %attr(755,root,root) %{_bindir}/ogrinfo
418 %attr(755,root,root) %{_bindir}/ogrlineref
419 %attr(755,root,root) %{_bindir}/ogrmerge.py
420 %attr(755,root,root) %{_bindir}/ogrtindex
421 %attr(755,root,root) %{_bindir}/pct2rgb.py
422 %attr(755,root,root) %{_bindir}/rgb2pct.py
423 %attr(755,root,root) %{_bindir}/testepsg
424 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
425 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.20
426 %dir %{_libdir}/gdalplugins
428 %{_mandir}/man1/gdal2tiles.1*
429 %{_mandir}/man1/gdal_calc.1*
430 %{_mandir}/man1/gdal_contour.1*
431 %{_mandir}/man1/gdal_edit.1*
432 %{_mandir}/man1/gdal_fillnodata.1*
433 %{_mandir}/man1/gdal_grid.1*
434 %{_mandir}/man1/gdal_merge.1*
435 %{_mandir}/man1/gdal_polygonize.1*
436 %{_mandir}/man1/gdal_proximity.1*
437 %{_mandir}/man1/gdal_rasterize.1*
438 %{_mandir}/man1/gdal_retile.1*
439 %{_mandir}/man1/gdal_sieve.1*
440 %{_mandir}/man1/gdal_translate.1*
441 %{_mandir}/man1/gdal_utilities.1*
442 %{_mandir}/man1/gdaladdo.1*
443 %{_mandir}/man1/gdalbuildvrt.1*
444 %{_mandir}/man1/gdalcompare.1*
445 %{_mandir}/man1/gdaldem.1*
446 %{_mandir}/man1/gdalinfo.1*
447 %{_mandir}/man1/gdallocationinfo.1*
448 %{_mandir}/man1/gdalmanage.1*
449 %{_mandir}/man1/gdalmove.1*
450 %{_mandir}/man1/gdalsrsinfo.1*
451 %{_mandir}/man1/gdaltindex.1*
452 %{_mandir}/man1/gdaltransform.1*
453 %{_mandir}/man1/gdalwarp.1*
454 %{_mandir}/man1/nearblack.1*
455 %{_mandir}/man1/ogr2ogr.1*
456 %{_mandir}/man1/ogr_utilities.1*
457 %{_mandir}/man1/ogrinfo.1*
458 %{_mandir}/man1/ogrlineref.1*
459 %{_mandir}/man1/ogrtindex.1*
460 %{_mandir}/man1/pct2rgb.1*
461 %{_mandir}/man1/rgb2pct.1*
462 %{_mandir}/man1/gdal_pansharpen.1*
463 %{_mandir}/man1/gnm_utilities.1*
464 %{_mandir}/man1/gnmanalyse.1*
465 %{_mandir}/man1/gnmmanage.1*
466 %{_mandir}/man1/ogrmerge.1*
469 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_bindir}/gdal-config
472 %attr(755,root,root) %{_libdir}/libgdal.so
473 %{_libdir}/libgdal.la
474 %{_pkgconfigdir}/gdal.pc
476 %{_mandir}/man1/gdal-config.1*
479 %defattr(644,root,root,755)
483 %defattr(644,root,root,755)
484 %dir %{perl_vendorarch}/Geo
485 %{perl_vendorarch}/Geo/GDAL.pm
486 %dir %{perl_vendorarch}/Geo/GDAL
487 %{perl_vendorarch}/Geo/GDAL/Const.pm
488 %{perl_vendorarch}/Geo/OGR.pm
489 %{perl_vendorarch}/Geo/OSR.pm
490 %dir %{perl_vendorarch}/auto/Geo
491 %dir %{perl_vendorarch}/auto/Geo/GDAL
492 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
493 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
494 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
495 %dir %{perl_vendorarch}/auto/Geo/GNM
496 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GNM/GNM.so
497 %dir %{perl_vendorarch}/auto/Geo/OGR
498 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
499 %dir %{perl_vendorarch}/auto/Geo/OSR
500 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
501 %{_mandir}/man3/Geo::GDAL.3pm*
502 %{perl_vendorarch}/Geo/GNM.pm
504 %files -n python-gdal
505 %defattr(644,root,root,755)
506 %{py_sitedir}/gdal.py[co]
507 %{py_sitedir}/gdalconst.py[co]
508 %{py_sitedir}/gdalnumeric.py[co]
509 %{py_sitedir}/ogr.py[co]
510 %{py_sitedir}/osr.py[co]
511 %{py_sitedir}/GDAL-*.egg-info
512 %dir %{py_sitedir}/osgeo
513 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
514 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
515 %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
516 %attr(755,root,root) %{py_sitedir}/osgeo/_gnm.so
517 %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
518 %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
519 %{py_sitedir}/osgeo/*.py[co]