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: 05351f8cb61761ae579667e24a297fe6
17 Patch0: %{name}-perl.patch
18 Patch1: %{name}-ruby.patch
19 Patch2: %{name}-asneeded.patch
20 Patch3: %{name}-python_install.patch
21 URL: http://www.gdal.org/
22 BuildRequires: autoconf >= 2.52
23 BuildRequires: automake
24 BuildRequires: cfitsio-devel
25 BuildRequires: doxygen
26 BuildRequires: expat-devel >= 1.95.0
27 BuildRequires: geos-devel >= 2.0
28 BuildRequires: giflib-devel >= 4.0
29 BuildRequires: hdf-devel >= 4.0
30 BuildRequires: hdf5-devel
31 BuildRequires: jasper-devel
32 BuildRequires: libcsf-devel
33 BuildRequires: libdap-devel >= 3.5
34 BuildRequires: libgeotiff-devel >= 1.2.1
35 BuildRequires: libjpeg-devel >= 6b
36 BuildRequires: libpng-devel >= 2:1.2.8
37 BuildRequires: libstdc++-devel
38 BuildRequires: libtiff-devel >= 3.6.0
39 BuildRequires: libtool
40 BuildRequires: netcdf-devel
41 BuildRequires: ogdi-devel >= 3.1
42 BuildRequires: perl-devel
43 BuildRequires: postgresql-backend-devel
44 BuildRequires: postgresql-devel
45 BuildRequires: python-devel >= 1:2.5
46 BuildRequires: python-numpy-devel >= 1:1.0.0
47 BuildRequires: rpm-pythonprov
48 %{?with_ruby:BuildRequires: ruby-devel}
49 BuildRequires: sqlite3-devel >= 3
50 BuildRequires: swig-perl
51 BuildRequires: swig-python >= 1.3
52 %{?with_ruby:BuildRequires: swig-ruby}
53 %if "%{pld_release}" == "ti"
54 BuildRequires: tetex-format-latex
55 BuildRequires: tetex-dvips
57 BuildRequires: texlive-dvips
58 BuildRequires: texlive-latex
60 %{?with_odbc:BuildRequires: unixODBC-devel}
61 %{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
62 BuildRequires: zlib-devel >= 1.1.4
64 Requires: libgeotiff >= 1.2.1
65 Requires: libpng >= 2:1.2.8
66 Requires: libtiff >= 3.6.0
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 GDAL is a translator library for raster geospatial data formats that
71 is released under an Open Source license. As a library, it presents a
72 single abstract data model to the calling application for all
73 supported formats. The related OGR library (which lives within the
74 GDAL source tree) provides a similar capability for simple features
77 %description -l pl.UTF-8
78 GDAL to biblioteka konwertująca między formatami rastrowych danych
79 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
80 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
81 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
82 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
83 możliwości dla danych wektorowych.
86 Summary: GDAL library header files
87 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
88 Group: Development/Libraries
89 Requires: %{name} = %{version}-%{release}
90 Requires: cfitsio-devel
91 Requires: expat-devel >= 1.95.0
92 Requires: geos-devel >= 2.0
93 Requires: giflib-devel
94 Requires: hdf-devel >= 4.0
96 Requires: jasper-devel
97 Requires: libcsf-devel
98 Requires: libdap-devel >= 3.5
99 Requires: libgeotiff-devel >= 1.2.1
100 Requires: libjpeg-devel
101 Requires: libpng-devel >= 2:1.2.8
102 Requires: libstdc++-devel
103 Requires: libtiff-devel >= 3.6.0
104 Requires: netcdf-devel
105 Requires: ogdi-devel >= 3.1
106 Requires: postgresql-devel
107 Requires: sqlite3-devel >= 3
108 %{?with_odbc:Requires: unixODBC-devel}
109 %{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
112 GDAL library header files.
114 %description devel -l pl.UTF-8
115 Pliki nagłówkowe biblioteki GDAL.
118 Summary: GDAL static libraries
119 Summary(pl.UTF-8): Statyczne biblioteki GDAL
120 Group: Development/Libraries
121 Requires: %{name}-devel = %{version}-%{release}
124 GDAL static libraries.
126 %description static -l pl.UTF-8
127 Statyczne biblioteki GDAL.
129 %package -n perl-gdal
130 Summary: Perl bindings for GDAL
131 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
132 Group: Development/Languages/Perl
133 Requires: %{name} = %{version}-%{release}
135 %description -n perl-gdal
136 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
138 %description -n perl-gdal -l pl.UTF-8
139 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
141 %package -n python-gdal
142 Summary: GDAL Python module
143 Summary(pl.UTF-8): Moduł Pythona GDAL
144 Group: Libraries/Python
145 Requires: %{name} = %{version}-%{release}
146 %pyrequires_eq python-libs
148 %description -n python-gdal
151 %description -n python-gdal -l pl.UTF-8
154 %package -n ruby-gdal
155 Summary: Ruby bindings for GDAL
156 Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
157 Group: Development/Languages
158 Requires: %{name} = %{version}-%{release}
159 %{?ruby_mod_ver_requires_eq}
161 %description -n ruby-gdal
162 Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
164 %description -n ruby-gdal -l pl.UTF-8
165 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
175 # need to regenerate (old ones don't support perl 5.10)
176 rm swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
177 # includes updated for Ruby 1.9
178 rm swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
183 # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
184 # and $PYTHON_INCLUDES is needed to detect numpy properly
185 export PYTHON_INCLUDES=-I%{py_incdir}
188 cp -f /usr/share/automake/config.* .
191 # disable grass/libgrass here, it can be built from separate gdal-grass package
193 --datadir=%{_datadir}/gdal \
194 --with-dods-root=/usr \
195 --with-hide-internal-symbols \
198 %{?with_ruby:--with-ruby} \
200 %{?with_xerces:--with-xerces} \
201 --with-xerces-inc=/usr/include/xercesc \
202 --with-xerces-lib="-lxerces-c" \
205 # --with-php needs Zend API update
206 # java broken, no configure option
207 # csharp builds, but has no configure option
209 # regenerate where needed
210 %{__make} -j1 -C swig/perl generate
211 %{__make} -j1 -C swig/ruby generate
220 rm -rf $RPM_BUILD_ROOT
222 %{__make} -j1 install install-man \
223 DESTDIR=$RPM_BUILD_ROOT
227 cp -a ogr/html _html/ogr
229 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
230 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
233 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
234 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
235 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
236 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
237 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
240 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL.dox
241 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL/Const.dox
242 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OGR.dox
243 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OSR.dox
246 %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
250 rm -rf $RPM_BUILD_ROOT
252 %post -p /sbin/ldconfig
253 %postun -p /sbin/ldconfig
256 %defattr(644,root,root,755)
257 %doc NEWS PROVENANCE.TXT
258 %attr(755,root,root) %{_bindir}/*
259 %exclude %{_bindir}/gdal-config
260 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
261 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
264 %exclude %{_mandir}/man1/gdal-config.1*
267 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_bindir}/gdal-config
270 %attr(755,root,root) %{_libdir}/libgdal.so
271 %{_libdir}/libgdal.la
273 %{_mandir}/man1/gdal-config.1*
276 %defattr(644,root,root,755)
280 %defattr(644,root,root,755)
281 %dir %{perl_vendorarch}/Geo
282 %{perl_vendorarch}/Geo/GDAL.pm
283 %dir %{perl_vendorarch}/Geo/GDAL
284 %{perl_vendorarch}/Geo/GDAL/Const.pm
285 %{perl_vendorarch}/Geo/OGR.pm
286 %{perl_vendorarch}/Geo/OSR.pm
287 %dir %{perl_vendorarch}/auto/Geo
288 %dir %{perl_vendorarch}/auto/Geo/GDAL
289 %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
290 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
291 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
292 %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
293 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
294 %dir %{perl_vendorarch}/auto/Geo/OGR
295 %{perl_vendorarch}/auto/Geo/OGR/OGR.bs
296 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
297 %dir %{perl_vendorarch}/auto/Geo/OSR
298 %{perl_vendorarch}/auto/Geo/OSR/OSR.bs
299 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
301 %files -n python-gdal
302 %defattr(644,root,root,755)
303 %{py_sitedir}/gdal.py[co]
304 %{py_sitedir}/gdalconst.py[co]
305 %{py_sitedir}/gdalnumeric.py[co]
306 %{py_sitedir}/ogr.py[co]
307 %{py_sitedir}/osr.py[co]
308 %{py_sitedir}/GDAL-*.egg-info
309 %dir %{py_sitedir}/osgeo
310 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
311 %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
312 %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
313 %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
314 %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
315 %{py_sitedir}/osgeo/*.py[co]
319 %defattr(644,root,root,755)
320 %dir %{ruby_sitearchdir}/gdal
321 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
322 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
323 %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
324 %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so