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: https://github.com/OSGeo/gdal/releases/download/v%{version}/%{name}-%{version}.tar.gz
57 # Source0-md5: 2b397c041e6b0b10ec7c49fd76e9fa99
58 Patch0: %{name}-perl.patch
59 Patch2: %{name}-pc.patch
60 Patch9: %{name}-dds.patch
61 Patch12: %{name}-rasdaman.patch
62 Patch13: %{name}-pluginsdir.patch
64 URL: http://www.gdal.org/
65 # 1.x or 2.x supported
66 BuildRequires: CharLS-devel
67 %{?with_opencl:BuildRequires: OpenCL-devel >= 1.0}
68 %{?with_armadillo:BuildRequires: armadillo-devel}
69 BuildRequires: autoconf >= 2.52
70 BuildRequires: automake
71 BuildRequires: cfitsio-devel
72 %{?with_crnlib:BuildRequires: crnlib-devel}
73 BuildRequires: cryptopp-devel
74 BuildRequires: curl-devel
75 BuildRequires: doxygen >= 1.4.2
76 %{?with_epsilon:BuildRequires: epsilon-compressor-devel}
77 BuildRequires: expat-devel >= 1.95.0
78 %{?with_fyba:BuildRequires: fyba-devel}
79 BuildRequires: freexl-devel >= 1.0
80 BuildRequires: gcc >= 6:4.1
81 BuildRequires: geos-devel >= 3.1.0
82 BuildRequires: giflib-devel >= 4.0
83 %{?with_grass:BuildRequires: grass-devel >= 6.4}
84 BuildRequires: hdf-devel >= 4.2.5
85 BuildRequires: hdf5-devel
86 BuildRequires: jasper-devel
87 %{?with_java:BuildRequires: jdk}
88 %{?with_java:BuildRequires: jpackage-utils}
89 BuildRequires: json-c-devel >= 0.11
90 %{?with_kea:BuildRequires: kealib-devel}
91 BuildRequires: libcsf-devel >= 2.0-0.041111.6
92 BuildRequires: libdap-devel >= 3.10
93 BuildRequires: libgeotiff-devel >= 1.2.1
94 %{?with_gta:BuildRequires: libgta-devel}
95 BuildRequires: libjpeg-devel >= 6b
96 #BuildRequires: libkml-devel >= 1.3.0
97 BuildRequires: libpng-devel >= 2:1.2.8
98 %{?with_spatialite:BuildRequires: libspatialite-devel}
99 BuildRequires: libstdc++-devel
100 BuildRequires: libtiff-devel >= 4.0
101 BuildRequires: libtool
102 BuildRequires: libuuid-devel
103 BuildRequires: libwebp-devel
104 BuildRequires: libxml2-devel >= 2
105 #%{?with_mysql:BuildRequires: mysql-devel >= 4}
106 %{?with_mysql:BuildRequires: /usr/bin/mysql_config}
107 BuildRequires: netcdf-devel >= 4.1
108 BuildRequires: ogdi-devel >= 3.1
109 %{?with_openjpeg:BuildRequires: openjpeg2-devel >= 2.1.0}
110 # 8.1.7 for DB support, 10.0.1 for georaster
111 %{?with_oci:BuildRequires: oracle-instantclient-devel >= 10.0.1}
112 #BuildRequires: pcidsk-devel > 0.3
113 BuildRequires: pcre-devel
114 BuildRequires: perl-devel
115 BuildRequires: pkgconfig >= 1:0.21
116 %{?with_podofo:BuildRequires: podofo-devel}
117 %{?with_poppler:BuildRequires: poppler-devel >= 0.24}
118 # ensure it's compiled with PQescapeStringConn support
119 BuildRequires: postgresql-backend-devel >= 8.1.4
120 BuildRequires: postgresql-devel >= 8.1.4
121 BuildRequires: proj-devel >= 4
122 BuildRequires: python-devel >= 1:2.5
123 BuildRequires: python-numpy-devel >= 1:1.0.0
124 BuildRequires: python-setuptools
125 BuildRequires: qhull-devel >= 2012
126 %{?with_rasdaman:BuildRequires: rasdaman-devel}
127 BuildRequires: rpm-pythonprov
128 BuildRequires: rpmbuild(macros) >= 1.344
129 BuildRequires: sed >= 4.0
130 BuildRequires: sqlite3-devel >= 3.0.0
131 BuildRequires: swig-perl
132 BuildRequires: swig-python >= 1.3
133 BuildRequires: texlive-dvips
134 BuildRequires: texlive-latex
135 %{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15}
136 %{?with_xerces:BuildRequires: xerces-c-devel >= 3.1.0}
137 BuildRequires: xz-devel
138 BuildRequires: zlib-devel >= 1.1.4
139 # for ZSTD compression in TIFF
140 BuildRequires: zstd-devel
141 Requires: freexl >= 1.0
142 Requires: geos >= 3.1.0
143 Requires: hdf >= 4.2.5
144 Requires: libgeotiff >= 1.2.1
145 Requires: libpng >= 2:1.2.8
146 Requires: libtiff >= 4.0
147 %{?with_openjpeg:Requires: openjpeg2 >= 2.1.0}
148 Requires: qhull >= 2012
149 %{?with_xerces:Requires: xerces-c >= 3.1.0}
150 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
153 GDAL is a translator library for raster geospatial data formats that
154 is released under an Open Source license. As a library, it presents a
155 single abstract data model to the calling application for all
156 supported formats. The related OGR library (which lives within the
157 GDAL source tree) provides a similar capability for simple features
160 %description -l pl.UTF-8
161 GDAL to biblioteka konwertująca między formatami rastrowych danych
162 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
163 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
164 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
165 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
166 możliwości dla danych wektorowych.
169 Summary: GDAL library header files
170 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
171 Group: Development/Libraries
172 Requires: %{name} = %{version}-%{release}
173 Requires: CharLS-devel
174 %{?with_opencl:Requires: OpenCL-devel >= 1.0}
175 %{?with_armadillo:Requires: armadillo-devel}
176 Requires: cfitsio-devel
177 %{?with_crnlib:Requires: crnlib-devel}
178 Requires: cryptopp-devel
180 %{?with_epsilon:Requires: epsilon-compressor-devel}
181 %{?with_fyba:Requires: fyba-devel}
182 Requires: expat-devel >= 1.95.0
183 Requires: freexl-devel >= 1.0
184 Requires: geos-devel >= 3.1.0
185 Requires: giflib-devel >= 4.0
186 Requires: hdf-devel >= 4.2.5
188 Requires: jasper-devel
189 Requires: json-c-devel >= 0.11
190 %{?with_kea:Requires: kealib-devel}
191 Requires: libcsf-devel
192 Requires: libdap-devel >= 3.10
193 Requires: libgeotiff-devel >= 1.2.1
194 %{?with_gta:Requires: libgta-devel}
195 Requires: libjpeg-devel >= 6b
196 Requires: libpng-devel >= 2:1.2.8
197 %{?with_spatialite:Requires: libspatialite-devel}
198 Requires: libstdc++-devel
199 Requires: libtiff-devel >= 4.0
200 Requires: libuuid-devel
201 Requires: libwebp-devel
202 Requires: libxml2-devel >= 2
203 %{?with_mysql:Requires: /usr/bin/mysql_config}
204 Requires: netcdf-devel >= 4
205 Requires: ogdi-devel >= 3.1
206 %{?with_openjpeg:Requires: openjpeg2-devel >= 2.1.0}
207 #Requires: pcidsk-devel > 0.3
209 %{?with_podofo:Requires: podofo-devel}
210 %{?with_poppler:Requires: poppler-devel >= 0.24}
211 Requires: postgresql-devel
212 Requires: proj-devel >= 4
213 Requires: qhull-devel >= 2012
214 %{?with_rasdaman:Requires: rasdaman-devel}
215 Requires: sqlite3-devel >= 3.0.0
216 %{?with_odbc:Requires: unixODBC-devel}
217 %{?with_xerces:Requires: xerces-c-devel >= 3.1.0}
219 Requires: zlib-devel >= 1.1.4
223 GDAL library header files.
225 %description devel -l pl.UTF-8
226 Pliki nagłówkowe biblioteki GDAL.
229 Summary: GDAL static libraries
230 Summary(pl.UTF-8): Statyczne biblioteki GDAL
231 Group: Development/Libraries
232 Requires: %{name}-devel = %{version}-%{release}
235 GDAL static libraries.
237 %description static -l pl.UTF-8
238 Statyczne biblioteki GDAL.
240 %package -n perl-gdal
241 Summary: Perl bindings for GDAL
242 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
243 Group: Development/Languages/Perl
244 Requires: %{name} = %{version}-%{release}
246 %description -n perl-gdal
247 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
249 %description -n perl-gdal -l pl.UTF-8
250 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
252 %package -n python-gdal
253 Summary: GDAL Python module
254 Summary(pl.UTF-8): Moduł Pythona GDAL
255 Group: Libraries/Python
256 Requires: %{name} = %{version}-%{release}
257 Requires: python-libs
259 %description -n python-gdal
262 %description -n python-gdal -l pl.UTF-8
274 # need to regenerate (old ones don't support perl 5.10)
275 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
278 sed -i -e 's#^mandir=.*##g' configure.ac
282 %{__sed} -i -e 's,DODS_INC="-I.*,DODS_INC="$(pkg-config --cflags libdap)",' configure.ac
300 --includedir=%{_includedir}/gdal \
301 --datadir=%{_datadir}/gdal \
302 --with-dods-root=/usr \
303 %{?with_armadillo:--with-armadillo} \
304 %{?with_crnlib:--with-dds} \
305 %{?with_epsilon:--with-epsilon} \
306 %{?with_grass:--with-grass} \
307 %{!?with_gta:--without-gta} \
308 --with-hide-internal-symbols \
309 %{?with_java:--with-java=%{java_home}} \
311 %{!?with_kea:--without-kea} \
312 %{?with_java:--with-mdb --with-jvm-lib-add-rpath --with-jvm-lib=%{java_home}/jre/lib/$jvm_arch/server} \
313 %{?with_mysql:--with-mysql} \
314 %{?with_oci:--with-oci --with-oci-include=/usr/include/oracle/client --with-oci-lib=%{_libdir}} \
315 %{?with_opencl:--with-opencl} \
317 %{?with_podofo:--with-podofo} \
318 %{?with_poppler:--with-poppler} \
320 %{?with_rasdaman:--with-rasdaman=%{_libdir}/rasdaman} \
321 %{?with_fyba:--with-sosi} \
322 %{?with_spatialite:--with-spatialite} \
325 %{?with_xerces:--with-xerces} \
326 --with-xerces-inc=/usr/include \
327 --with-xerces-lib="-lxerces-c" \
329 # --with-pcidsk=/usr (needs > 0.3)
330 # csharp builds, but has no configure option nor install target
332 # regenerate where needed
333 %{__make} -j1 -C swig/perl generate
336 %{?with_grass:GRASS_INCLUDE="-I/usr/include/grass64"} \
337 %{?with_fyba:SOSI_INC="-I/usr/include/fyba"}
344 rm -rf $RPM_BUILD_ROOT
346 %{__make} -j1 install install-man \
347 DESTDIR=$RPM_BUILD_ROOT
349 # TODO: remove libgdal.la when gdal.pc gets maintained Requires.private/Libs.private list
354 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
355 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
358 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
359 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
360 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
361 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
362 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
365 rm -rf $RPM_BUILD_ROOT
367 %post -p /sbin/ldconfig
368 %postun -p /sbin/ldconfig
371 %defattr(644,root,root,755)
372 %doc NEWS PROVENANCE.TXT
373 %attr(755,root,root) %{_bindir}/epsg_tr.py
374 %attr(755,root,root) %{_bindir}/esri2wkt.py
375 %attr(755,root,root) %{_bindir}/gcps2vec.py
376 %attr(755,root,root) %{_bindir}/gcps2wld.py
377 %attr(755,root,root) %{_bindir}/gdal2tiles.py
378 %attr(755,root,root) %{_bindir}/gdal2xyz.py
379 %attr(755,root,root) %{_bindir}/gdaladdo
380 %attr(755,root,root) %{_bindir}/gdal_auth.py
381 %attr(755,root,root) %{_bindir}/gdalbuildvrt
382 %attr(755,root,root) %{_bindir}/gdal_calc.py
383 %attr(755,root,root) %{_bindir}/gdalchksum.py
384 %attr(755,root,root) %{_bindir}/gdalcompare.py
385 %attr(755,root,root) %{_bindir}/gdal_contour
386 %attr(755,root,root) %{_bindir}/gdaldem
387 %attr(755,root,root) %{_bindir}/gdal_edit.py
388 %attr(755,root,root) %{_bindir}/gdalenhance
389 %attr(755,root,root) %{_bindir}/gdal_fillnodata.py
390 %attr(755,root,root) %{_bindir}/gdal_grid
391 %attr(755,root,root) %{_bindir}/gdalident.py
392 %attr(755,root,root) %{_bindir}/gdalimport.py
393 %attr(755,root,root) %{_bindir}/gdalinfo
394 %attr(755,root,root) %{_bindir}/gdallocationinfo
395 %attr(755,root,root) %{_bindir}/gdalmanage
396 %attr(755,root,root) %{_bindir}/gdal_merge.py
397 %attr(755,root,root) %{_bindir}/gdalmove.py
398 %attr(755,root,root) %{_bindir}/gdal_pansharpen.py
399 %attr(755,root,root) %{_bindir}/gdal_polygonize.py
400 %attr(755,root,root) %{_bindir}/gdal_proximity.py
401 %attr(755,root,root) %{_bindir}/gdal_rasterize
402 %attr(755,root,root) %{_bindir}/gdal_retile.py
403 %attr(755,root,root) %{_bindir}/gdalserver
404 %attr(755,root,root) %{_bindir}/gdal_sieve.py
405 %attr(755,root,root) %{_bindir}/gdalsrsinfo
406 %attr(755,root,root) %{_bindir}/gdaltindex
407 %attr(755,root,root) %{_bindir}/gdaltransform
408 %attr(755,root,root) %{_bindir}/gdal_translate
409 %attr(755,root,root) %{_bindir}/gdalwarp
410 %attr(755,root,root) %{_bindir}/gnmanalyse
411 %attr(755,root,root) %{_bindir}/gnmmanage
412 %attr(755,root,root) %{_bindir}/mkgraticule.py
413 %attr(755,root,root) %{_bindir}/nearblack
414 %attr(755,root,root) %{_bindir}/ogr2ogr
415 %attr(755,root,root) %{_bindir}/ogrinfo
416 %attr(755,root,root) %{_bindir}/ogrlineref
417 %attr(755,root,root) %{_bindir}/ogrmerge.py
418 %attr(755,root,root) %{_bindir}/ogrtindex
419 %attr(755,root,root) %{_bindir}/pct2rgb.py
420 %attr(755,root,root) %{_bindir}/rgb2pct.py
421 %attr(755,root,root) %{_bindir}/testepsg
422 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.26
424 %dir %{_libdir}/gdalplugins
426 %{_mandir}/man1/gdal2tiles.1*
427 %{_mandir}/man1/gdal_calc.1*
428 %{_mandir}/man1/gdal_contour.1*
429 %{_mandir}/man1/gdal_edit.1*
430 %{_mandir}/man1/gdal_fillnodata.1*
431 %{_mandir}/man1/gdal_grid.1*
432 %{_mandir}/man1/gdal_merge.1*
433 %{_mandir}/man1/gdal_polygonize.1*
434 %{_mandir}/man1/gdal_proximity.1*
435 %{_mandir}/man1/gdal_rasterize.1*
436 %{_mandir}/man1/gdal_retile.1*
437 %{_mandir}/man1/gdal_sieve.1*
438 %{_mandir}/man1/gdal_translate.1*
439 %{_mandir}/man1/gdal_utilities.1*
440 %{_mandir}/man1/gdaladdo.1*
441 %{_mandir}/man1/gdalbuildvrt.1*
442 %{_mandir}/man1/gdalcompare.1*
443 %{_mandir}/man1/gdaldem.1*
444 %{_mandir}/man1/gdalinfo.1*
445 %{_mandir}/man1/gdallocationinfo.1*
446 %{_mandir}/man1/gdalmanage.1*
447 %{_mandir}/man1/gdalmove.1*
448 %{_mandir}/man1/gdalsrsinfo.1*
449 %{_mandir}/man1/gdaltindex.1*
450 %{_mandir}/man1/gdaltransform.1*
451 %{_mandir}/man1/gdalwarp.1*
452 %{_mandir}/man1/nearblack.1*
453 %{_mandir}/man1/ogr2ogr.1*
454 %{_mandir}/man1/ogr_utilities.1*
455 %{_mandir}/man1/ogrinfo.1*
456 %{_mandir}/man1/ogrlineref.1*
457 %{_mandir}/man1/ogrtindex.1*
458 %{_mandir}/man1/pct2rgb.1*
459 %{_mandir}/man1/rgb2pct.1*
460 %{_mandir}/man1/gdal_pansharpen.1*
461 %{_mandir}/man1/gnm_utilities.1*
462 %{_mandir}/man1/gnmanalyse.1*
463 %{_mandir}/man1/gnmmanage.1*
464 %{_mandir}/man1/ogrmerge.1*
467 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_bindir}/gdal-config
470 %attr(755,root,root) %{_libdir}/libgdal.so
471 %{_libdir}/libgdal.la
472 %{_pkgconfigdir}/gdal.pc
474 %{_mandir}/man1/gdal-config.1*
477 %defattr(644,root,root,755)
481 %defattr(644,root,root,755)
482 %dir %{perl_vendorarch}/Geo
483 %{perl_vendorarch}/Geo/GDAL.pm
484 %dir %{perl_vendorarch}/Geo/GDAL
485 %{perl_vendorarch}/Geo/GDAL/Const.pm
486 %{perl_vendorarch}/Geo/OGR.pm
487 %{perl_vendorarch}/Geo/OSR.pm
488 %dir %{perl_vendorarch}/auto/Geo
489 %dir %{perl_vendorarch}/auto/Geo/GDAL
490 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
491 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
492 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
493 %dir %{perl_vendorarch}/auto/Geo/GNM
494 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GNM/GNM.so
495 %dir %{perl_vendorarch}/auto/Geo/OGR
496 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
497 %dir %{perl_vendorarch}/auto/Geo/OSR
498 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
499 %{_mandir}/man3/Geo::GDAL.3pm*
500 %{perl_vendorarch}/Geo/GNM.pm
502 %files -n python-gdal
503 %defattr(644,root,root,755)
504 %{py_sitedir}/gdal.py[co]
505 %{py_sitedir}/gdalconst.py[co]
506 %{py_sitedir}/gdalnumeric.py[co]
507 %{py_sitedir}/ogr.py[co]
508 %{py_sitedir}/osr.py[co]
509 %{py_sitedir}/GDAL-*.egg-info
510 %dir %{py_sitedir}/osgeo
511 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
512 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
513 %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
514 %attr(755,root,root) %{py_sitedir}/osgeo/_gnm.so
515 %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
516 %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
517 %{py_sitedir}/osgeo/*.py[co]