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