1 # TODO: csharp, java, mysql
4 %bcond_without odbc # disable odbc support
5 %bcond_without xerces # disable xerces support
6 %bcond_without ruby # disable ruby support
8 Summary: Geospatial Data Abstraction Library
9 Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
15 Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
16 # Source0-md5: c4673970bd2285032de9ae9bbd82754a
17 Patch0: %{name}-perl.patch
18 Patch1: %{name}-ruby.patch
19 Patch2: %{name}-asneeded.patch
20 Patch3: %{name}-python_install.patch
21 Patch4: %{name}-libdap.patch
22 Patch5: %{name}-doxy.patch
23 URL: http://www.gdal.org/
24 BuildRequires: autoconf >= 2.52
25 BuildRequires: automake
26 BuildRequires: cfitsio-devel
27 BuildRequires: doxygen >= 1.4.2
28 BuildRequires: expat-devel >= 1.95.0
29 BuildRequires: geos-devel >= 2.2
30 BuildRequires: giflib-devel >= 4.0
31 BuildRequires: hdf-devel >= 4.0
32 BuildRequires: hdf5-devel
33 BuildRequires: jasper-devel
34 BuildRequires: libcsf-devel
35 BuildRequires: libdap-devel >= 3.10
36 BuildRequires: libgeotiff-devel >= 1.2.1
37 BuildRequires: libjpeg-devel >= 6b
38 BuildRequires: libpng-devel >= 2:1.2.8
39 BuildRequires: libstdc++-devel
40 BuildRequires: libtiff-devel >= 3.6.0
41 BuildRequires: libtool
42 BuildRequires: netcdf-devel
43 BuildRequires: ogdi-devel >= 3.1
44 BuildRequires: pcidsk-devel
45 BuildRequires: perl-devel
46 BuildRequires: postgresql-backend-devel
47 BuildRequires: postgresql-devel
48 BuildRequires: proj-devel
49 BuildRequires: python-devel >= 1:2.5
50 BuildRequires: python-numpy-devel >= 1:1.0.0
51 BuildRequires: rpm-pythonprov
52 %{?with_ruby:BuildRequires: ruby-devel}
53 BuildRequires: sqlite3-devel >= 3
54 BuildRequires: swig-perl
55 BuildRequires: swig-python >= 1.3
56 %{?with_ruby:BuildRequires: swig-ruby}
57 %if "%{pld_release}" == "ti"
58 BuildRequires: tetex-format-latex
59 BuildRequires: tetex-dvips
61 BuildRequires: texlive-dvips
62 BuildRequires: texlive-latex
64 %{?with_odbc:BuildRequires: unixODBC-devel}
65 %{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
66 BuildRequires: zlib-devel >= 1.1.4
68 Requires: libgeotiff >= 1.2.1
69 Requires: libpng >= 2:1.2.8
70 Requires: libtiff >= 3.6.0
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 GDAL is a translator library for raster geospatial data formats that
75 is released under an Open Source license. As a library, it presents a
76 single abstract data model to the calling application for all
77 supported formats. The related OGR library (which lives within the
78 GDAL source tree) provides a similar capability for simple features
81 %description -l pl.UTF-8
82 GDAL to biblioteka konwertująca między formatami rastrowych danych
83 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
84 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
85 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
86 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
87 możliwości dla danych wektorowych.
90 Summary: GDAL library header files
91 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
92 Group: Development/Libraries
93 Requires: %{name} = %{version}-%{release}
94 Requires: cfitsio-devel
95 Requires: expat-devel >= 1.95.0
96 Requires: geos-devel >= 2.2
97 Requires: giflib-devel
98 Requires: hdf-devel >= 4.0
100 Requires: jasper-devel
101 Requires: libcsf-devel
102 Requires: libdap-devel >= 3.10
103 Requires: libgeotiff-devel >= 1.2.1
104 Requires: libjpeg-devel
105 Requires: libpng-devel >= 2:1.2.8
106 Requires: libstdc++-devel
107 Requires: libtiff-devel >= 3.6.0
108 Requires: netcdf-devel
109 Requires: ogdi-devel >= 3.1
110 Requires: pcidsk-devel
111 Requires: postgresql-devel
112 Requires: sqlite3-devel >= 3
113 %{?with_odbc:Requires: unixODBC-devel}
114 %{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
117 GDAL library header files.
119 %description devel -l pl.UTF-8
120 Pliki nagłówkowe biblioteki GDAL.
123 Summary: GDAL static libraries
124 Summary(pl.UTF-8): Statyczne biblioteki GDAL
125 Group: Development/Libraries
126 Requires: %{name}-devel = %{version}-%{release}
129 GDAL static libraries.
131 %description static -l pl.UTF-8
132 Statyczne biblioteki GDAL.
134 %package -n perl-gdal
135 Summary: Perl bindings for GDAL
136 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
137 Group: Development/Languages/Perl
138 Requires: %{name} = %{version}-%{release}
140 %description -n perl-gdal
141 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
143 %description -n perl-gdal -l pl.UTF-8
144 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
146 %package -n python-gdal
147 Summary: GDAL Python module
148 Summary(pl.UTF-8): Moduł Pythona GDAL
149 Group: Libraries/Python
150 Requires: %{name} = %{version}-%{release}
151 %pyrequires_eq python-libs
153 %description -n python-gdal
156 %description -n python-gdal -l pl.UTF-8
159 %package -n ruby-gdal
160 Summary: Ruby bindings for GDAL
161 Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
162 Group: Development/Languages
163 Requires: %{name} = %{version}-%{release}
164 %{?ruby_mod_ver_requires_eq}
166 %description -n ruby-gdal
167 Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
169 %description -n ruby-gdal -l pl.UTF-8
170 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
182 # need to regenerate (old ones don't support perl 5.10)
183 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
184 # includes updated for Ruby 1.9
185 %{__rm} swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
190 # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
191 # and $PYTHON_INCLUDES is needed to detect numpy properly
192 export PYTHON_INCLUDES=-I%{py_incdir}
197 # disable grass/libgrass here, it can be built from separate gdal-grass package
199 --datadir=%{_datadir}/gdal \
200 --with-dods-root=/usr \
201 --with-hide-internal-symbols \
205 %{?with_ruby:--with-ruby} \
207 %{?with_xerces:--with-xerces} \
208 --with-xerces-inc=/usr/include/xercesc \
209 --with-xerces-lib="-lxerces-c" \
212 # --with-php needs Zend API update
213 # java broken, no configure option
214 # csharp builds, but has no configure option
216 # regenerate where needed
217 %{__make} -j1 -C swig/perl generate
218 %{?with_ruby:%{__make} -j1 -C swig/ruby generate}
227 rm -rf $RPM_BUILD_ROOT
229 %{__make} -j1 install install-man \
230 DESTDIR=$RPM_BUILD_ROOT
234 cp -a ogr/html _html/ogr
236 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
237 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
240 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
241 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
242 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
243 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
244 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
247 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL.dox
248 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL/Const.dox
249 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OGR.dox
250 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OSR.dox
253 %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
257 rm -rf $RPM_BUILD_ROOT
259 %post -p /sbin/ldconfig
260 %postun -p /sbin/ldconfig
263 %defattr(644,root,root,755)
264 %doc NEWS PROVENANCE.TXT
265 %attr(755,root,root) %{_bindir}/epsg_tr.py
266 %attr(755,root,root) %{_bindir}/esri2wkt.py
267 %attr(755,root,root) %{_bindir}/gcps2vec.py
268 %attr(755,root,root) %{_bindir}/gcps2wld.py
269 %attr(755,root,root) %{_bindir}/gdal2tiles.py
270 %attr(755,root,root) %{_bindir}/gdal2xyz.py
271 %attr(755,root,root) %{_bindir}/gdal_contour
272 %attr(755,root,root) %{_bindir}/gdal_fillnodata.py
273 %attr(755,root,root) %{_bindir}/gdal_grid
274 %attr(755,root,root) %{_bindir}/gdal_merge.py
275 %attr(755,root,root) %{_bindir}/gdal_polygonize.py
276 %attr(755,root,root) %{_bindir}/gdal_proximity.py
277 %attr(755,root,root) %{_bindir}/gdal_rasterize
278 %attr(755,root,root) %{_bindir}/gdal_retile.py
279 %attr(755,root,root) %{_bindir}/gdal_sieve.py
280 %attr(755,root,root) %{_bindir}/gdal_translate
281 %attr(755,root,root) %{_bindir}/gdaladdo
282 %attr(755,root,root) %{_bindir}/gdalbuildvrt
283 %attr(755,root,root) %{_bindir}/gdalchksum.py
284 %attr(755,root,root) %{_bindir}/gdaldem
285 %attr(755,root,root) %{_bindir}/gdalenhance
286 %attr(755,root,root) %{_bindir}/gdalident.py
287 %attr(755,root,root) %{_bindir}/gdalimport.py
288 %attr(755,root,root) %{_bindir}/gdalinfo
289 %attr(755,root,root) %{_bindir}/gdalmanage
290 %attr(755,root,root) %{_bindir}/gdaltindex
291 %attr(755,root,root) %{_bindir}/gdaltransform
292 %attr(755,root,root) %{_bindir}/gdalwarp
293 %attr(755,root,root) %{_bindir}/mkgraticule.py
294 %attr(755,root,root) %{_bindir}/nearblack
295 %attr(755,root,root) %{_bindir}/ogr2ogr
296 %attr(755,root,root) %{_bindir}/ogrinfo
297 %attr(755,root,root) %{_bindir}/ogrtindex
298 %attr(755,root,root) %{_bindir}/pct2rgb.py
299 %attr(755,root,root) %{_bindir}/rgb2pct.py
300 %attr(755,root,root) %{_bindir}/testepsg
301 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
302 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
304 %{_mandir}/man1/gdal2tiles.1*
305 %{_mandir}/man1/gdal_contour.1*
306 %{_mandir}/man1/gdal_fillnodata.1*
307 %{_mandir}/man1/gdal_grid.1*
308 %{_mandir}/man1/gdal_merge.1*
309 %{_mandir}/man1/gdal_rasterize.1*
310 %{_mandir}/man1/gdal_retile.1*
311 %{_mandir}/man1/gdal_sieve.1*
312 %{_mandir}/man1/gdal_translate.1*
313 %{_mandir}/man1/gdal_utilities.1*
314 %{_mandir}/man1/gdaladdo.1*
315 %{_mandir}/man1/gdalbuildvrt.1*
316 %{_mandir}/man1/gdaldem.1*
317 %{_mandir}/man1/gdalinfo.1*
318 %{_mandir}/man1/gdaltindex.1*
319 %{_mandir}/man1/gdaltransform.1*
320 %{_mandir}/man1/gdalwarp.1*
321 %{_mandir}/man1/nearblack.1*
322 %{_mandir}/man1/ogr2ogr.1*
323 %{_mandir}/man1/ogr_utilities.1*
324 %{_mandir}/man1/ogrinfo.1*
325 %{_mandir}/man1/ogrtindex.1*
326 %{_mandir}/man1/pct2rgb.1*
327 %{_mandir}/man1/rgb2pct.1*
330 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_bindir}/gdal-config
333 %attr(755,root,root) %{_libdir}/libgdal.so
334 %{_libdir}/libgdal.la
335 %{_includedir}/cpl_*.h
336 %{_includedir}/cplkeywordparser.h
337 %{_includedir}/gdal*.h
338 %{_includedir}/gvgcpfit.h
339 %{_includedir}/memdataset.h
340 %{_includedir}/ogr_*.h
341 %{_includedir}/ogrsf_frmts.h
342 %{_includedir}/rawdataset.h
343 %{_includedir}/thinplatespline.h
344 %{_includedir}/vrtdataset.h
345 %{_mandir}/man1/gdal-config.1*
348 %defattr(644,root,root,755)
352 %defattr(644,root,root,755)
353 %dir %{perl_vendorarch}/Geo
354 %{perl_vendorarch}/Geo/GDAL.pm
355 %dir %{perl_vendorarch}/Geo/GDAL
356 %{perl_vendorarch}/Geo/GDAL/Const.pm
357 %{perl_vendorarch}/Geo/OGR.pm
358 %{perl_vendorarch}/Geo/OSR.pm
359 %dir %{perl_vendorarch}/auto/Geo
360 %dir %{perl_vendorarch}/auto/Geo/GDAL
361 %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
362 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
363 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
364 %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
365 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
366 %dir %{perl_vendorarch}/auto/Geo/OGR
367 %{perl_vendorarch}/auto/Geo/OGR/OGR.bs
368 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
369 %dir %{perl_vendorarch}/auto/Geo/OSR
370 %{perl_vendorarch}/auto/Geo/OSR/OSR.bs
371 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
373 %files -n python-gdal
374 %defattr(644,root,root,755)
375 %{py_sitedir}/gdal.py[co]
376 %{py_sitedir}/gdalconst.py[co]
377 %{py_sitedir}/gdalnumeric.py[co]
378 %{py_sitedir}/ogr.py[co]
379 %{py_sitedir}/osr.py[co]
380 %{py_sitedir}/GDAL-*.egg-info
381 %dir %{py_sitedir}/osgeo
382 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
383 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
384 %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
385 %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
386 %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
387 %{py_sitedir}/osgeo/*.py[co]
391 %defattr(644,root,root,755)
392 %dir %{ruby_sitearchdir}/gdal
393 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
394 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
395 %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
396 %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so