- merged 1.8.0 from DEVEL (libtiff 4 required)
[packages/gdal.git] / gdal.spec
CommitLineData
954ec354
JB
1# TODO:
2# - wait for newer pcidsk, switch to external again
3# - csharp, java, mysql
655672e5 4#
5# Conditional build:
6%bcond_without odbc # disable odbc support
7%bcond_without xerces # disable xerces support
4aafe7c0 8%bcond_without ruby # disable ruby support
655672e5 9#
faf5649c 10Summary: Geospatial Data Abstraction Library
a28c1bee 11Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
faf5649c 12Name: gdal
954ec354
JB
13Version: 1.8.0
14Release: 1
faf5649c
JB
15License: BSD-like
16Group: Libraries
c82ea5ef 17Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
954ec354 18# Source0-md5: c762cdab0f7e51a677ba49278a8a263d
f5a12c65
JK
19Patch0: %{name}-perl.patch
20Patch1: %{name}-ruby.patch
21Patch2: %{name}-asneeded.patch
22Patch3: %{name}-python_install.patch
954ec354
JB
23Patch4: %{name}-doxy.patch
24Patch5: %{name}-libpng.patch
9b5c0fd4 25URL: http://www.gdal.org/
69051332
JB
26BuildRequires: autoconf >= 2.52
27BuildRequires: automake
6b59fa88 28BuildRequires: cfitsio-devel
9d161bc4 29BuildRequires: doxygen >= 1.4.2
69051332 30BuildRequires: expat-devel >= 1.95.0
4058fbc3 31BuildRequires: geos-devel >= 2.2
b459f4d7 32BuildRequires: giflib-devel >= 4.0
6b59fa88 33BuildRequires: hdf-devel >= 4.0
69051332 34BuildRequires: hdf5-devel
6b59fa88 35BuildRequires: jasper-devel
d4d7a2c6 36BuildRequires: libcsf-devel
4058fbc3 37BuildRequires: libdap-devel >= 3.10
b3cbf6a3 38BuildRequires: libgeotiff-devel >= 1.2.1
6b59fa88 39BuildRequires: libjpeg-devel >= 6b
e354fe40 40BuildRequires: libpng-devel >= 2:1.2.8
b3cbf6a3 41BuildRequires: libstdc++-devel
954ec354 42BuildRequires: libtiff-devel >= 4.0
69051332 43BuildRequires: libtool
e2b089e1 44BuildRequires: libuuid-devel
45BuildRequires: libxml2-devel
b3cbf6a3 46BuildRequires: netcdf-devel
6b59fa88 47BuildRequires: ogdi-devel >= 3.1
954ec354 48#BuildRequires: pcidsk-devel > 0.3
a0ffd9c4 49BuildRequires: perl-devel
faf5649c 50BuildRequires: postgresql-backend-devel
017b03bb 51BuildRequires: postgresql-devel
d05dc9bc 52BuildRequires: proj-devel
9a2dbbce 53BuildRequires: python-devel >= 1:2.5
017b03bb 54BuildRequires: python-numpy-devel >= 1:1.0.0
479cb83c 55BuildRequires: rpm-pythonprov
4aafe7c0 56%{?with_ruby:BuildRequires: ruby-devel}
d4d7a2c6 57BuildRequires: sqlite3-devel >= 3
479cb83c 58BuildRequires: swig-perl
9a2dbbce 59BuildRequires: swig-python >= 1.3
017b03bb 60%{?with_ruby:BuildRequires: swig-ruby}
db38e4ab 61%if "%{pld_release}" == "ti"
62BuildRequires: tetex-format-latex
63BuildRequires: tetex-dvips
64%else
479cb83c 65BuildRequires: texlive-dvips
66BuildRequires: texlive-latex
db38e4ab 67%endif
9831286f 68%{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15}
655672e5 69%{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
faf5649c 70BuildRequires: zlib-devel >= 1.1.4
4058fbc3 71Requires: geos >= 2.2
b3cbf6a3 72Requires: libgeotiff >= 1.2.1
e354fe40 73Requires: libpng >= 2:1.2.8
954ec354 74Requires: libtiff >= 4.0
faf5649c
JB
75BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77%description
78GDAL is a translator library for raster geospatial data formats that
79is released under an Open Source license. As a library, it presents a
80single abstract data model to the calling application for all
81supported formats. The related OGR library (which lives within the
82GDAL source tree) provides a similar capability for simple features
83vector data.
f05c79e8 84
d34f2ec8
JR
85%description -l pl.UTF-8
86GDAL to biblioteka konwertująca między formatami rastrowych danych
87dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
88Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
89do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
90(której źródła są dołączone do drzewa źródeł GDAL) daje podobne
91możliwości dla danych wektorowych.
faf5649c 92
6b59fa88
JB
93%package devel
94Summary: GDAL library header files
a28c1bee 95Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
6b59fa88 96Group: Development/Libraries
1673a634 97Requires: %{name} = %{version}-%{release}
b3cbf6a3 98Requires: cfitsio-devel
69051332 99Requires: expat-devel >= 1.95.0
4058fbc3 100Requires: geos-devel >= 2.2
b459f4d7 101Requires: giflib-devel
b3cbf6a3 102Requires: hdf-devel >= 4.0
69051332 103Requires: hdf5-devel
b3cbf6a3 104Requires: jasper-devel
d4d7a2c6 105Requires: libcsf-devel
4058fbc3 106Requires: libdap-devel >= 3.10
b3cbf6a3
JB
107Requires: libgeotiff-devel >= 1.2.1
108Requires: libjpeg-devel
e354fe40 109Requires: libpng-devel >= 2:1.2.8
b3cbf6a3 110Requires: libstdc++-devel
954ec354 111Requires: libtiff-devel >= 4.0
b3cbf6a3
JB
112Requires: netcdf-devel
113Requires: ogdi-devel >= 3.1
954ec354 114#Requires: pcidsk-devel > 0.3
b3cbf6a3 115Requires: postgresql-devel
d4d7a2c6 116Requires: sqlite3-devel >= 3
655672e5 117%{?with_odbc:Requires: unixODBC-devel}
69051332 118%{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
6b59fa88
JB
119
120%description devel
121GDAL library header files.
122
d34f2ec8
JR
123%description devel -l pl.UTF-8
124Pliki nagłówkowe biblioteki GDAL.
6b59fa88
JB
125
126%package static
127Summary: GDAL static libraries
a28c1bee 128Summary(pl.UTF-8): Statyczne biblioteki GDAL
6b59fa88 129Group: Development/Libraries
1673a634 130Requires: %{name}-devel = %{version}-%{release}
6b59fa88
JB
131
132%description static
133GDAL static libraries.
134
d34f2ec8 135%description static -l pl.UTF-8
6b59fa88
JB
136Statyczne biblioteki GDAL.
137
a0ffd9c4
JB
138%package -n perl-gdal
139Summary: Perl bindings for GDAL
140Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
141Group: Development/Languages/Perl
142Requires: %{name} = %{version}-%{release}
143
144%description -n perl-gdal
145Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
146
147%description -n perl-gdal -l pl.UTF-8
017b03bb 148Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
a0ffd9c4 149
6b59fa88
JB
150%package -n python-gdal
151Summary: GDAL Python module
a28c1bee 152Summary(pl.UTF-8): Moduł Pythona GDAL
6b59fa88 153Group: Libraries/Python
1673a634 154Requires: %{name} = %{version}-%{release}
faf2b39a 155%pyrequires_eq python-libs
6b59fa88
JB
156
157%description -n python-gdal
158GDAL Python module.
159
d34f2ec8
JR
160%description -n python-gdal -l pl.UTF-8
161Moduł Pythona GDAL.
6b59fa88 162
a0ffd9c4
JB
163%package -n ruby-gdal
164Summary: Ruby bindings for GDAL
165Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
166Group: Development/Languages
167Requires: %{name} = %{version}-%{release}
168%{?ruby_mod_ver_requires_eq}
169
170%description -n ruby-gdal
171Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
172
173%description -n ruby-gdal -l pl.UTF-8
017b03bb
ER
174Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
175osr.
a0ffd9c4 176
faf5649c
JB
177%prep
178%setup -q
179%patch0 -p1
180%patch1 -p1
a0ffd9c4 181%patch2 -p1
69051332 182%patch3 -p1
4058fbc3 183%patch4 -p1
9d161bc4 184%patch5 -p1
69051332
JB
185
186# need to regenerate (old ones don't support perl 5.10)
4058fbc3 187%{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
f5a12c65 188# includes updated for Ruby 1.9
4058fbc3 189%{__rm} swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
f5a12c65 190
4058fbc3 191%{__rm} -r man
4ed54fac 192
faf5649c 193%build
69051332 194# $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
017b03bb
ER
195# and $PYTHON_INCLUDES is needed to detect numpy properly
196export PYTHON_INCLUDES=-I%{py_incdir}
197
69051332 198%{__libtoolize}
69051332 199%{__aclocal} -I m4
faf5649c 200%{__autoconf}
69051332 201# disable grass/libgrass here, it can be built from separate gdal-grass package
954ec354 202# note: "WARNING: unrecognized options: --with-hide-internal-symbols" is caused by configure bug; option DOES take effect
6b59fa88 203%configure \
5014b82a 204 --datadir=%{_datadir}/gdal \
d4d7a2c6 205 --with-dods-root=/usr \
69051332 206 --with-hide-internal-symbols \
a0ffd9c4 207 --with-perl \
69051332 208 --with-python \
4aafe7c0 209 %{?with_ruby:--with-ruby} \
69051332 210 --with-sqlite3 \
655672e5 211 %{?with_xerces:--with-xerces} \
6b59fa88 212 --with-xerces-inc=/usr/include/xercesc \
80faacbe 213 --with-xerces-lib="-lxerces-c" \
a3027d62 214 --without-grass \
69051332 215 --without-libgrass
954ec354 216# --with-pcidsk=/usr (needs > 0.3)
a0ffd9c4 217# --with-php needs Zend API update
69051332
JB
218# java broken, no configure option
219# csharp builds, but has no configure option
faf5649c 220
69051332 221# regenerate where needed
825dc3dc 222%{__make} -j1 -C swig/perl generate
961f0000 223%{?with_ruby:%{__make} -j1 -C swig/ruby generate}
69051332 224
825dc3dc 225%{__make} -j1
a0ffd9c4 226
825dc3dc 227%{__make} -j1 docs
3a591acf 228
f5a12c65
JK
229%{__make} -j1 man
230
faf5649c
JB
231%install
232rm -rf $RPM_BUILD_ROOT
faf5649c 233
825dc3dc 234%{__make} -j1 install install-man \
3a591acf
JB
235 DESTDIR=$RPM_BUILD_ROOT
236
388b39cb
ER
237rm -rf _html
238cp -a html _html
239cp -a ogr/html _html/ogr
faf5649c 240
374370d5
JB
241%py_comp $RPM_BUILD_ROOT%{py_sitedir}
242%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
243%py_postclean
5014b82a 244
017b03bb
ER
245%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
246%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
247%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
248%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
249%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
250
251# some doxygen trash
954ec354
JB
252%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/{GDAL.dox,GDAL/Const.dox,OGR.dox,OSR.dox}
253%{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal_{fillnodata,sieve}.dox
017b03bb 254
ac627b1d 255%if %{with ruby}
69051332 256%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
ac627b1d 257%endif
69051332 258
faf5649c
JB
259%clean
260rm -rf $RPM_BUILD_ROOT
261
6b59fa88
JB
262%post -p /sbin/ldconfig
263%postun -p /sbin/ldconfig
264
faf5649c
JB
265%files
266%defattr(644,root,root,755)
c0a384ef 267%doc NEWS PROVENANCE.TXT
4058fbc3
JB
268%attr(755,root,root) %{_bindir}/epsg_tr.py
269%attr(755,root,root) %{_bindir}/esri2wkt.py
270%attr(755,root,root) %{_bindir}/gcps2vec.py
271%attr(755,root,root) %{_bindir}/gcps2wld.py
272%attr(755,root,root) %{_bindir}/gdal2tiles.py
273%attr(755,root,root) %{_bindir}/gdal2xyz.py
274%attr(755,root,root) %{_bindir}/gdal_contour
954ec354 275%attr(755,root,root) %{_bindir}/gdal_calc.py
4058fbc3
JB
276%attr(755,root,root) %{_bindir}/gdal_fillnodata.py
277%attr(755,root,root) %{_bindir}/gdal_grid
278%attr(755,root,root) %{_bindir}/gdal_merge.py
279%attr(755,root,root) %{_bindir}/gdal_polygonize.py
280%attr(755,root,root) %{_bindir}/gdal_proximity.py
281%attr(755,root,root) %{_bindir}/gdal_rasterize
282%attr(755,root,root) %{_bindir}/gdal_retile.py
283%attr(755,root,root) %{_bindir}/gdal_sieve.py
284%attr(755,root,root) %{_bindir}/gdal_translate
285%attr(755,root,root) %{_bindir}/gdaladdo
286%attr(755,root,root) %{_bindir}/gdalbuildvrt
287%attr(755,root,root) %{_bindir}/gdalchksum.py
288%attr(755,root,root) %{_bindir}/gdaldem
289%attr(755,root,root) %{_bindir}/gdalenhance
290%attr(755,root,root) %{_bindir}/gdalident.py
291%attr(755,root,root) %{_bindir}/gdalimport.py
292%attr(755,root,root) %{_bindir}/gdalinfo
954ec354 293%attr(755,root,root) %{_bindir}/gdallocationinfo
4058fbc3
JB
294%attr(755,root,root) %{_bindir}/gdalmanage
295%attr(755,root,root) %{_bindir}/gdaltindex
296%attr(755,root,root) %{_bindir}/gdaltransform
297%attr(755,root,root) %{_bindir}/gdalwarp
298%attr(755,root,root) %{_bindir}/mkgraticule.py
299%attr(755,root,root) %{_bindir}/nearblack
300%attr(755,root,root) %{_bindir}/ogr2ogr
301%attr(755,root,root) %{_bindir}/ogrinfo
302%attr(755,root,root) %{_bindir}/ogrtindex
303%attr(755,root,root) %{_bindir}/pct2rgb.py
304%attr(755,root,root) %{_bindir}/rgb2pct.py
305%attr(755,root,root) %{_bindir}/testepsg
5014b82a 306%attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
017b03bb 307%attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
6b59fa88 308%{_datadir}/gdal
4058fbc3
JB
309%{_mandir}/man1/gdal2tiles.1*
310%{_mandir}/man1/gdal_contour.1*
311%{_mandir}/man1/gdal_fillnodata.1*
312%{_mandir}/man1/gdal_grid.1*
313%{_mandir}/man1/gdal_merge.1*
314%{_mandir}/man1/gdal_rasterize.1*
315%{_mandir}/man1/gdal_retile.1*
316%{_mandir}/man1/gdal_sieve.1*
317%{_mandir}/man1/gdal_translate.1*
318%{_mandir}/man1/gdal_utilities.1*
319%{_mandir}/man1/gdaladdo.1*
320%{_mandir}/man1/gdalbuildvrt.1*
321%{_mandir}/man1/gdaldem.1*
322%{_mandir}/man1/gdalinfo.1*
954ec354 323%{_mandir}/man1/gdallocationinfo.1*
4058fbc3
JB
324%{_mandir}/man1/gdaltindex.1*
325%{_mandir}/man1/gdaltransform.1*
326%{_mandir}/man1/gdalwarp.1*
327%{_mandir}/man1/nearblack.1*
328%{_mandir}/man1/ogr2ogr.1*
329%{_mandir}/man1/ogr_utilities.1*
330%{_mandir}/man1/ogrinfo.1*
331%{_mandir}/man1/ogrtindex.1*
332%{_mandir}/man1/pct2rgb.1*
333%{_mandir}/man1/rgb2pct.1*
6b59fa88
JB
334
335%files devel
336%defattr(644,root,root,755)
388b39cb 337%doc _html/*
5014b82a 338%attr(755,root,root) %{_bindir}/gdal-config
6b59fa88 339%attr(755,root,root) %{_libdir}/libgdal.so
5014b82a 340%{_libdir}/libgdal.la
4058fbc3
JB
341%{_includedir}/cpl_*.h
342%{_includedir}/cplkeywordparser.h
343%{_includedir}/gdal*.h
344%{_includedir}/gvgcpfit.h
345%{_includedir}/memdataset.h
346%{_includedir}/ogr_*.h
347%{_includedir}/ogrsf_frmts.h
348%{_includedir}/rawdataset.h
349%{_includedir}/thinplatespline.h
350%{_includedir}/vrtdataset.h
5014b82a 351%{_mandir}/man1/gdal-config.1*
6b59fa88
JB
352
353%files static
354%defattr(644,root,root,755)
9b5c0fd4 355%{_libdir}/libgdal.a
6b59fa88 356
a0ffd9c4
JB
357%files -n perl-gdal
358%defattr(644,root,root,755)
359%dir %{perl_vendorarch}/Geo
360%{perl_vendorarch}/Geo/GDAL.pm
361%dir %{perl_vendorarch}/Geo/GDAL
362%{perl_vendorarch}/Geo/GDAL/Const.pm
363%{perl_vendorarch}/Geo/OGR.pm
364%{perl_vendorarch}/Geo/OSR.pm
365%dir %{perl_vendorarch}/auto/Geo
366%dir %{perl_vendorarch}/auto/Geo/GDAL
367%{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
368%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
369%dir %{perl_vendorarch}/auto/Geo/GDAL/Const
370%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
371%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
372%dir %{perl_vendorarch}/auto/Geo/OGR
373%{perl_vendorarch}/auto/Geo/OGR/OGR.bs
374%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
375%dir %{perl_vendorarch}/auto/Geo/OSR
376%{perl_vendorarch}/auto/Geo/OSR/OSR.bs
377%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
378
6b59fa88
JB
379%files -n python-gdal
380%defattr(644,root,root,755)
9a2dbbce
JB
381%{py_sitedir}/gdal.py[co]
382%{py_sitedir}/gdalconst.py[co]
383%{py_sitedir}/gdalnumeric.py[co]
9a2dbbce
JB
384%{py_sitedir}/ogr.py[co]
385%{py_sitedir}/osr.py[co]
69051332
JB
386%{py_sitedir}/GDAL-*.egg-info
387%dir %{py_sitedir}/osgeo
388%attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
389%attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
390%attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
391%attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
392%attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
393%{py_sitedir}/osgeo/*.py[co]
a0ffd9c4 394
4aafe7c0 395%if %{with ruby}
a0ffd9c4
JB
396%files -n ruby-gdal
397%defattr(644,root,root,755)
398%dir %{ruby_sitearchdir}/gdal
399%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
400%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
401%attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
402%attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so
4aafe7c0 403%endif
This page took 0.124861 seconds and 4 git commands to generate.