]> git.pld-linux.org Git - packages/gdal.git/blame_incremental - gdal.spec
- release 6 (by relup.sh)
[packages/gdal.git] / gdal.spec
... / ...
CommitLineData
1# TODO:
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
4# dependency)
5# - spatialite (--with-spatialite; libspatialite: http://www.gaia-gis.it/gaia-sins/)
6# - freexl (http://www.gaia-gis.it/FreeXL/)
7# - rasdaman (--with-rasdaman; http://rasdaman.eecs.jacobs-university.de/trac/rasdaman/wiki/Download)
8# - armadillo (--with-armadillo; http://arma.sourceforge.net/)
9# - openjpeg (unreleased post-1.5 or 2? needs opj_decode_tile_data symbol, not available in 1.3-1.5)
10# - libjpeg12 (needs patching to use system one)
11# - libkml (1.3.0 needed, not released yet)
12# - wait for newer pcidsk, switch to external again
13# - csharp, java, mysql
14# - additional, proprietary(?) formats support:
15# - FMEObjects (http://www.safe.com/support/support-resources/fme-downloads/)
16# - ESRI FileGDBAPI (http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api)
17# - ECW (http://www.erdas.com/products/ecw/ERDASECWJPEG2000SDK/Details.aspx)
18# - Kakadu/JPEG2000 (http://www.kakadusoftware.com/)
19# - MrSID (http://www.lizardtech.com/developer/)
20# - MSG/EUMETSAT (http://www.eumetsat.int/Home/Main/DataAccess/SupportSoftwareTools/index.htm)
21# - Oracle/OCI >= 10.0.1 (for georaster); Oracle/OCI >= 8.1.7 (as DB)
22# - Ingres (--with-ingres=/path)
23# - Informix DB
24# - DWGdirect (members only? http://www.opendwg.org/)
25# - ESRI SDE (http://www.esri.com/software/arcgis/arcsde/index.html)
26# - OpenCL (--with-opencl; no free Linux implementation yet?)
27#
28# Conditional build:
29%bcond_without epsilon # EPSILON wavelet compression support
30%bcond_without gta # GTA format support
31%bcond_without odbc # disable ODBC DB support
32%bcond_with podofo # PDF support via podofo instead of poppler
33%bcond_without poppler # PDF support via poppler
34%bcond_without xerces # disable xerces support
35%bcond_without java # disable Java and MDB support
36%bcond_without php # disable PHP binding
37%bcond_without ruby # disable ruby binding
38#
39%if %{with podofo}
40%undefine with_poppler
41%endif
42Summary: Geospatial Data Abstraction Library
43Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
44Name: gdal
45Version: 1.9.1
46Release: 6
47License: BSD-like
48Group: Libraries
49Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
50# Source0-md5: c5cf09b92dac1f5775db056e165b34f5
51Patch0: %{name}-perl.patch
52Patch1: %{name}-python_install.patch
53Patch2: gdal-1.9.1-poppler020.patch
54
55Patch4: %{name}-php.patch
56Patch5: %{name}-fpic.patch
57URL: http://www.gdal.org/
58BuildRequires: autoconf >= 2.52
59BuildRequires: automake
60BuildRequires: cfitsio-devel
61BuildRequires: curl-devel
62BuildRequires: doxygen >= 1.4.2
63%{?with_epsilon:BuildRequires: epsilon-compressor-devel}
64BuildRequires: expat-devel >= 1.95.0
65BuildRequires: geos-devel >= 2.2.0
66BuildRequires: giflib-devel >= 4.0
67BuildRequires: hdf-devel >= 4.0
68BuildRequires: hdf5-devel
69BuildRequires: jasper-devel
70%{?with_java:BuildRequires: jdk}
71%{?with_java:BuildRequires: jpackage-utils}
72BuildRequires: libcsf-devel
73BuildRequires: libdap-devel >= 3.10
74BuildRequires: libgeotiff-devel >= 1.2.1
75%{?with_gta:BuildRequires: libgta-devel}
76BuildRequires: libjpeg-devel >= 6b
77#BuildRequires: libkml-devel >= 1.3.0
78BuildRequires: libpng-devel >= 2:1.2.8
79BuildRequires: libstdc++-devel
80BuildRequires: libtiff-devel >= 4.0
81BuildRequires: libtool
82BuildRequires: libuuid-devel
83BuildRequires: libwebp-devel
84BuildRequires: libxml2-devel
85BuildRequires: netcdf-devel >= 4.1
86BuildRequires: ogdi-devel >= 3.1
87#BuildRequires: pcidsk-devel > 0.3
88BuildRequires: perl-devel
89%{?with_php:BuildRequires: php-devel}
90%{?with_podofo:BuildRequires: podofo-devel}
91%{?with_poppler:BuildRequires: poppler-devel}
92# ensure it's compiled with PQescapeStringConn support
93BuildRequires: postgresql-backend-devel >= 8.1.4
94BuildRequires: postgresql-devel >= 8.1.4
95BuildRequires: proj-devel >= 4
96BuildRequires: python-devel >= 1:2.5
97BuildRequires: python-numpy-devel >= 1:1.0.0
98BuildRequires: python-setuptools
99BuildRequires: rpm-pythonprov
100BuildRequires: rpmbuild(macros) >= 1.344
101%{?with_ruby:BuildRequires: ruby-devel}
102BuildRequires: sed >= 4.0
103BuildRequires: sqlite3-devel >= 3.0.0
104BuildRequires: swig-perl
105BuildRequires: swig-python >= 1.3
106%{?with_ruby:BuildRequires: swig-ruby}
107BuildRequires: texlive-dvips
108BuildRequires: texlive-latex
109%{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15}
110%{?with_xerces:BuildRequires: xerces-c-devel >= 2.7.0}
111BuildRequires: xz-devel
112BuildRequires: zlib-devel >= 1.1.4
113Requires: geos >= 2.2.0
114Requires: libgeotiff >= 1.2.1
115Requires: libpng >= 2:1.2.8
116Requires: libtiff >= 4.0
117BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118
119%description
120GDAL is a translator library for raster geospatial data formats that
121is released under an Open Source license. As a library, it presents a
122single abstract data model to the calling application for all
123supported formats. The related OGR library (which lives within the
124GDAL source tree) provides a similar capability for simple features
125vector data.
126
127%description -l pl.UTF-8
128GDAL to biblioteka konwertująca między formatami rastrowych danych
129dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
130Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
131do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
132(której źródła są dołączone do drzewa źródeł GDAL) daje podobne
133możliwości dla danych wektorowych.
134
135%package devel
136Summary: GDAL library header files
137Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
138Group: Development/Libraries
139Requires: %{name} = %{version}-%{release}
140Requires: cfitsio-devel
141Requires: curl-devel
142%{?with_epsilon:Requires: epsilon-compressor-devel}
143Requires: expat-devel >= 1.95.0
144Requires: geos-devel >= 2.2.0
145Requires: giflib-devel >= 4.0
146Requires: hdf-devel >= 4.0
147Requires: hdf5-devel
148Requires: jasper-devel
149Requires: libcsf-devel
150Requires: libdap-devel >= 3.10
151Requires: libgeotiff-devel >= 1.2.1
152%{?with_gta:Requires: libgta-devel}
153Requires: libjpeg-devel >= 6b
154Requires: libpng-devel >= 2:1.2.8
155Requires: libstdc++-devel
156Requires: libtiff-devel >= 4.0
157Requires: libuuid-devel
158Requires: libwebp-devel
159Requires: libxml2-devel
160Requires: netcdf-devel >= 4
161Requires: ogdi-devel >= 3.1
162#Requires: pcidsk-devel > 0.3
163%{?with_podofo:Requires: podofo-devel}
164%{?with_poppler:Requires: poppler-devel}
165Requires: postgresql-devel
166Requires: proj-devel >= 4
167Requires: sqlite3-devel >= 3.0.0
168%{?with_odbc:Requires: unixODBC-devel}
169%{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
170Requires: xz-devel
171Requires: zlib-devel >= 1.1.4
172
173%description devel
174GDAL library header files.
175
176%description devel -l pl.UTF-8
177Pliki nagłówkowe biblioteki GDAL.
178
179%package static
180Summary: GDAL static libraries
181Summary(pl.UTF-8): Statyczne biblioteki GDAL
182Group: Development/Libraries
183Requires: %{name}-devel = %{version}-%{release}
184
185%description static
186GDAL static libraries.
187
188%description static -l pl.UTF-8
189Statyczne biblioteki GDAL.
190
191%package -n perl-gdal
192Summary: Perl bindings for GDAL
193Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
194Group: Development/Languages/Perl
195Requires: %{name} = %{version}-%{release}
196
197%description -n perl-gdal
198Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
199
200%description -n perl-gdal -l pl.UTF-8
201Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
202
203%package -n php-gdal
204Summary: PHP bindings for GDAL library
205Summary(pl.UTF-8): Wiązania PHP do biblioteki GDAL
206Group: Development/Languages/PHP
207Requires: %{name} = %{version}-%{release}
208%{?requires_php_extension}
209
210%description -n php-gdal
211PHP bindings for GDAL library
212
213%description -n php-gdal -l pl.UTF-8
214Wiązania PHP do biblioteki GDAL.
215
216%package -n python-gdal
217Summary: GDAL Python module
218Summary(pl.UTF-8): Moduł Pythona GDAL
219Group: Libraries/Python
220Requires: %{name} = %{version}-%{release}
221%pyrequires_eq python-libs
222
223%description -n python-gdal
224GDAL Python module.
225
226%description -n python-gdal -l pl.UTF-8
227Moduł Pythona GDAL.
228
229%package -n ruby-gdal
230Summary: Ruby bindings for GDAL
231Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
232Group: Development/Languages
233Requires: %{name} = %{version}-%{release}
234%{?ruby_mod_ver_requires_eq}
235
236%description -n ruby-gdal
237Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
238
239%description -n ruby-gdal -l pl.UTF-8
240Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
241osr.
242
243%prep
244%setup -q
245%patch0 -p1
246%patch1 -p1
247%patch2 -p4
248
249%patch4 -p1
250%patch5 -p1
251
252# need to regenerate (old ones don't support perl 5.10)
253%{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
254
255%{__rm} -r man
256
257%{__sed} -i -e 's,DODS_INC="-I.*,DODS_INC="$(pkg-config --cflags libdap)",' configure.in
258
259%build
260%{__libtoolize}
261%{__aclocal} -I m4
262%{__autoconf}
263# disable grass/libgrass here, it can be built from separate gdal-grass package
264%configure \
265 --datadir=%{_datadir}/gdal \
266 --with-dods-root=/usr \
267 %{?with_epsilon:--with-epsilon} \
268 %{!?with_gta:--without-gta} \
269 --with-hide-internal-symbols \
270 %{?with_java:--with-java=%{java_home}} \
271 --with-liblzma \
272 %{?with_java:--with-mdb --with-jvm-lib-add-rpath} \
273 --with-perl \
274 %{?with_php:--with-php} \
275 %{?with_podofo:--with-podofo} \
276 %{?with_poppler:--with-poppler} \
277 --with-python \
278 %{?with_ruby:--with-ruby} \
279 --with-sqlite3 \
280 --with-webp \
281 %{?with_xerces:--with-xerces} \
282 --with-xerces-inc=/usr/include/xercesc \
283 --with-xerces-lib="-lxerces-c" \
284 --without-grass \
285 --without-libgrass
286# --with-pcidsk=/usr (needs > 0.3)
287# csharp builds, but has no configure option
288
289# regenerate where needed
290%{__make} -j1 -C swig/perl generate
291%{?with_ruby:%{__make} -j1 -C swig/ruby generate}
292
293%{__make} -j1
294
295%{__make} -j1 docs
296
297%{__make} -j1 man
298
299%install
300rm -rf $RPM_BUILD_ROOT
301
302%{__make} -j1 install install-man \
303 DESTDIR=$RPM_BUILD_ROOT
304
305rm -rf _html
306cp -a html _html
307cp -a ogr/html _html/ogr
308
309%if %{with php}
310# missing in make install
311install -D swig/php/php_gdal.so $RPM_BUILD_ROOT%{php_extensiondir}/gdal.so
312install -D swig/php/php_gdalconst.so $RPM_BUILD_ROOT%{php_extensiondir}/gdalconst.so
313install -D swig/php/php_ogr.so $RPM_BUILD_ROOT%{php_extensiondir}/ogr.so
314install -D swig/php/php_osr.so $RPM_BUILD_ROOT%{php_extensiondir}/osr.so
315install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
316cat <<'EOF' >$RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/gdal.ini
317; Enable gdal extension module
318extension=gdal.so
319extension=gdalconst.so
320extension=ogr.so
321extension=osr.so
322EOF
323%endif
324
325%py_comp $RPM_BUILD_ROOT%{py_sitedir}
326%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
327%py_postclean
328
329%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
330%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
331%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
332%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
333%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
334
335# some doxygen trash
336%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/{GDAL.dox,GDAL/Const.dox,OGR.dox,OSR.dox}
337%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/check_dox.pl
338%{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal_{fillnodata,sieve}.dox
339
340%clean
341rm -rf $RPM_BUILD_ROOT
342
343%post -p /sbin/ldconfig
344%postun -p /sbin/ldconfig
345
346%files
347%defattr(644,root,root,755)
348%doc NEWS PROVENANCE.TXT
349%attr(755,root,root) %{_bindir}/epsg_tr.py
350%attr(755,root,root) %{_bindir}/esri2wkt.py
351%attr(755,root,root) %{_bindir}/gcps2vec.py
352%attr(755,root,root) %{_bindir}/gcps2wld.py
353%attr(755,root,root) %{_bindir}/gdal2tiles.py
354%attr(755,root,root) %{_bindir}/gdal2xyz.py
355%attr(755,root,root) %{_bindir}/gdal_contour
356%attr(755,root,root) %{_bindir}/gdal_calc.py
357%attr(755,root,root) %{_bindir}/gdal_fillnodata.py
358%attr(755,root,root) %{_bindir}/gdal_grid
359%attr(755,root,root) %{_bindir}/gdal_merge.py
360%attr(755,root,root) %{_bindir}/gdal_polygonize.py
361%attr(755,root,root) %{_bindir}/gdal_proximity.py
362%attr(755,root,root) %{_bindir}/gdal_rasterize
363%attr(755,root,root) %{_bindir}/gdal_retile.py
364%attr(755,root,root) %{_bindir}/gdal_sieve.py
365%attr(755,root,root) %{_bindir}/gdal_translate
366%attr(755,root,root) %{_bindir}/gdaladdo
367%attr(755,root,root) %{_bindir}/gdalbuildvrt
368%attr(755,root,root) %{_bindir}/gdalchksum.py
369%attr(755,root,root) %{_bindir}/gdaldem
370%attr(755,root,root) %{_bindir}/gdalenhance
371%attr(755,root,root) %{_bindir}/gdalident.py
372%attr(755,root,root) %{_bindir}/gdalimport.py
373%attr(755,root,root) %{_bindir}/gdalinfo
374%attr(755,root,root) %{_bindir}/gdallocationinfo
375%attr(755,root,root) %{_bindir}/gdalmanage
376%attr(755,root,root) %{_bindir}/gdalsrsinfo
377%attr(755,root,root) %{_bindir}/gdaltindex
378%attr(755,root,root) %{_bindir}/gdaltransform
379%attr(755,root,root) %{_bindir}/gdalwarp
380%attr(755,root,root) %{_bindir}/mkgraticule.py
381%attr(755,root,root) %{_bindir}/nearblack
382%attr(755,root,root) %{_bindir}/ogr2ogr
383%attr(755,root,root) %{_bindir}/ogrinfo
384%attr(755,root,root) %{_bindir}/ogrtindex
385%attr(755,root,root) %{_bindir}/pct2rgb.py
386%attr(755,root,root) %{_bindir}/rgb2pct.py
387%attr(755,root,root) %{_bindir}/testepsg
388%attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
389%attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
390%{_datadir}/gdal
391%{_mandir}/man1/gdal2tiles.1*
392%{_mandir}/man1/gdal_contour.1*
393%{_mandir}/man1/gdal_fillnodata.1*
394%{_mandir}/man1/gdal_grid.1*
395%{_mandir}/man1/gdal_merge.1*
396%{_mandir}/man1/gdal_rasterize.1*
397%{_mandir}/man1/gdal_retile.1*
398%{_mandir}/man1/gdal_sieve.1*
399%{_mandir}/man1/gdal_translate.1*
400%{_mandir}/man1/gdal_utilities.1*
401%{_mandir}/man1/gdaladdo.1*
402%{_mandir}/man1/gdalbuildvrt.1*
403%{_mandir}/man1/gdaldem.1*
404%{_mandir}/man1/gdalinfo.1*
405%{_mandir}/man1/gdallocationinfo.1*
406%{_mandir}/man1/gdalsrsinfo.1*
407%{_mandir}/man1/gdaltindex.1*
408%{_mandir}/man1/gdaltransform.1*
409%{_mandir}/man1/gdalwarp.1*
410%{_mandir}/man1/nearblack.1*
411%{_mandir}/man1/ogr2ogr.1*
412%{_mandir}/man1/ogr_utilities.1*
413%{_mandir}/man1/ogrinfo.1*
414%{_mandir}/man1/ogrtindex.1*
415%{_mandir}/man1/pct2rgb.1*
416%{_mandir}/man1/rgb2pct.1*
417
418%files devel
419%defattr(644,root,root,755)
420%doc _html/*
421%attr(755,root,root) %{_bindir}/gdal-config
422%attr(755,root,root) %{_libdir}/libgdal.so
423%{_libdir}/libgdal.la
424%{_includedir}/cpl_*.h
425%{_includedir}/cplkeywordparser.h
426%{_includedir}/gdal*.h
427%{_includedir}/gvgcpfit.h
428%{_includedir}/memdataset.h
429%{_includedir}/ogr_*.h
430%{_includedir}/ogrsf_frmts.h
431%{_includedir}/rawdataset.h
432%{_includedir}/thinplatespline.h
433%{_includedir}/vrtdataset.h
434%{_mandir}/man1/gdal-config.1*
435
436%files static
437%defattr(644,root,root,755)
438%{_libdir}/libgdal.a
439
440%files -n perl-gdal
441%defattr(644,root,root,755)
442%dir %{perl_vendorarch}/Geo
443%{perl_vendorarch}/Geo/GDAL.pm
444%dir %{perl_vendorarch}/Geo/GDAL
445%{perl_vendorarch}/Geo/GDAL/Const.pm
446%{perl_vendorarch}/Geo/OGR.pm
447%{perl_vendorarch}/Geo/OSR.pm
448%dir %{perl_vendorarch}/auto/Geo
449%dir %{perl_vendorarch}/auto/Geo/GDAL
450%{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
451%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
452%dir %{perl_vendorarch}/auto/Geo/GDAL/Const
453%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
454%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
455%dir %{perl_vendorarch}/auto/Geo/OGR
456%{perl_vendorarch}/auto/Geo/OGR/OGR.bs
457%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
458%dir %{perl_vendorarch}/auto/Geo/OSR
459%{perl_vendorarch}/auto/Geo/OSR/OSR.bs
460%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
461
462%if %{with php}
463%files -n php-gdal
464%defattr(644,root,root,755)
465%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/gdal.ini
466%attr(755,root,root) %{php_extensiondir}/gdal.so
467%attr(755,root,root) %{php_extensiondir}/gdalconst.so
468%attr(755,root,root) %{php_extensiondir}/ogr.so
469%attr(755,root,root) %{php_extensiondir}/osr.so
470%endif
471
472%files -n python-gdal
473%defattr(644,root,root,755)
474%{py_sitedir}/gdal.py[co]
475%{py_sitedir}/gdalconst.py[co]
476%{py_sitedir}/gdalnumeric.py[co]
477%{py_sitedir}/ogr.py[co]
478%{py_sitedir}/osr.py[co]
479%{py_sitedir}/GDAL-*.egg-info
480%dir %{py_sitedir}/osgeo
481%attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
482%attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
483%attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
484%attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
485%attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
486%{py_sitedir}/osgeo/*.py[co]
487
488%if %{with ruby}
489%files -n ruby-gdal
490%defattr(644,root,root,755)
491%dir %{ruby_sitearchdir}/gdal
492%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
493%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
494%attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
495%attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so
496%endif
This page took 0.066269 seconds and 4 git commands to generate.