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