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