1 # TODO: fix LDFLAGS passing (to use as-needed)
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: d2b0d428edab7895aa53c7d827094a09
17 Patch0: %{name}-dods.patch
18 Patch1: %{name}-perl.patch
19 Patch2: %{name}-ruby.patch
20 URL: http://www.gdal.org/
21 BuildRequires: autoconf
22 BuildRequires: cfitsio-devel
23 BuildRequires: doxygen
24 BuildRequires: geos-devel >= 2.0
25 BuildRequires: giflib-devel >= 4.0
26 BuildRequires: hdf-devel >= 4.0
27 BuildRequires: jasper-devel
28 BuildRequires: libcsf-devel
29 BuildRequires: libdap-devel >= 3.5
30 BuildRequires: libgeotiff-devel >= 1.2.1
31 BuildRequires: libjpeg-devel >= 6b
32 BuildRequires: libpng-devel >= 2:1.2.8
33 BuildRequires: libstdc++-devel
34 BuildRequires: libtiff-devel >= 3.6.0
35 BuildRequires: netcdf-devel
36 BuildRequires: ogdi-devel >= 3.1
37 BuildRequires: perl-devel
38 BuildRequires: postgresql-devel
39 BuildRequires: postgresql-backend-devel
40 BuildRequires: python-numpy-devel >= 1.0.0
41 BuildRequires: python-devel >= 1:2.5
42 %{?with_ruby:BuildRequires: ruby-devel}
43 BuildRequires: sqlite3-devel >= 3
44 %{?with_ruby:BuildRequires: swig-ruby}
45 BuildRequires: swig-python >= 1.3
46 %{?with_odbc:BuildRequires: unixODBC-devel}
47 %{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
48 BuildRequires: zlib-devel >= 1.1.4
50 Requires: libgeotiff >= 1.2.1
51 Requires: libpng >= 2:1.2.8
52 Requires: libtiff >= 3.6.0
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 GDAL is a translator library for raster geospatial data formats that
57 is released under an Open Source license. As a library, it presents a
58 single abstract data model to the calling application for all
59 supported formats. The related OGR library (which lives within the
60 GDAL source tree) provides a similar capability for simple features
63 %description -l pl.UTF-8
64 GDAL to biblioteka konwertująca między formatami rastrowych danych
65 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
66 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
67 do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
68 (której źródła są dołączone do drzewa źródeł GDAL) daje podobne
69 możliwości dla danych wektorowych.
72 Summary: GDAL library header files
73 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
74 Group: Development/Libraries
75 Requires: %{name} = %{version}-%{release}
76 Requires: cfitsio-devel
77 Requires: geos-devel >= 2.0
78 Requires: giflib-devel
79 Requires: hdf-devel >= 4.0
80 Requires: jasper-devel
81 Requires: libcsf-devel
82 Requires: libdap-devel >= 3.5
83 Requires: libgeotiff-devel >= 1.2.1
84 Requires: libjpeg-devel
85 Requires: libpng-devel >= 2:1.2.8
86 Requires: libstdc++-devel
87 Requires: libtiff-devel >= 3.6.0
88 Requires: netcdf-devel
89 Requires: ogdi-devel >= 3.1
90 Requires: postgresql-devel
91 Requires: sqlite3-devel >= 3
92 %{?with_odbc:Requires: unixODBC-devel}
93 %{?with_xerces:Requires: xerces-c-devel >= 2.2.0}
96 GDAL library header files.
98 %description devel -l pl.UTF-8
99 Pliki nagłówkowe biblioteki GDAL.
102 Summary: GDAL static libraries
103 Summary(pl.UTF-8): Statyczne biblioteki GDAL
104 Group: Development/Libraries
105 Requires: %{name}-devel = %{version}-%{release}
108 GDAL static libraries.
110 %description static -l pl.UTF-8
111 Statyczne biblioteki GDAL.
113 %package -n perl-gdal
114 Summary: Perl bindings for GDAL
115 Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
116 Group: Development/Languages/Perl
117 Requires: %{name} = %{version}-%{release}
119 %description -n perl-gdal
120 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
122 %description -n perl-gdal -l pl.UTF-8
123 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR,
126 %package -n python-gdal
127 Summary: GDAL Python module
128 Summary(pl.UTF-8): Moduł Pythona GDAL
129 Group: Libraries/Python
130 Requires: %{name} = %{version}-%{release}
131 %pyrequires_eq python-libs
133 %description -n python-gdal
136 %description -n python-gdal -l pl.UTF-8
139 %package -n ruby-gdal
140 Summary: Ruby bindings for GDAL
141 Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
142 Group: Development/Languages
143 Requires: %{name} = %{version}-%{release}
144 %{?ruby_mod_ver_requires_eq}
146 %description -n ruby-gdal
147 Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
149 %description -n ruby-gdal -l pl.UTF-8
150 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr
160 # disable grass/libgrass here, it can be built from separate gdal-grass package
163 --datadir=%{_datadir}/gdal \
164 --with-dods-root=/usr \
166 --with-pymoddir=%{py_sitedir} \
167 %{?with_ruby:--with-ruby} \
169 %{?with_xerces:--with-xerces} \
170 --with-xerces-inc=/usr/include/xercesc \
171 --with-xerces-lib="-lxerces-c" \
175 # ngpython seems to be compatibile with old python bindings
176 # --with-php needs Zend API update
179 %{__make} -C swig build \
180 OPTIMIZE="%{rpmcflags}"
185 rm -rf $RPM_BUILD_ROOT
188 DESTDIR=$RPM_BUILD_ROOT
190 mv -f ogr/html html/org
192 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
193 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
195 rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
198 rm -rf $RPM_BUILD_ROOT
200 %post -p /sbin/ldconfig
201 %postun -p /sbin/ldconfig
204 %defattr(644,root,root,755)
205 %doc NEWS PROVENANCE.TXT
206 %attr(755,root,root) %{_bindir}/*
207 %exclude %{_bindir}/gdal-config
208 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
211 %exclude %{_mandir}/man1/gdal-config.1*
214 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_bindir}/gdal-config
217 %attr(755,root,root) %{_libdir}/libgdal.so
218 %{_libdir}/libgdal.la
220 %{_mandir}/man1/gdal-config.1*
223 %defattr(644,root,root,755)
227 %defattr(644,root,root,755)
228 %dir %{perl_vendorarch}/Geo
229 %{perl_vendorarch}/Geo/GDAL.pm
230 %dir %{perl_vendorarch}/Geo/GDAL
231 %{perl_vendorarch}/Geo/GDAL/Const.pm
232 %{perl_vendorarch}/Geo/OGR.pm
233 %{perl_vendorarch}/Geo/OSR.pm
234 %dir %{perl_vendorarch}/auto/Geo
235 %dir %{perl_vendorarch}/auto/Geo/GDAL
236 %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
237 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
238 %dir %{perl_vendorarch}/auto/Geo/GDAL/Const
239 %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
240 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
241 %dir %{perl_vendorarch}/auto/Geo/OGR
242 %{perl_vendorarch}/auto/Geo/OGR/OGR.bs
243 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
244 %dir %{perl_vendorarch}/auto/Geo/OSR
245 %{perl_vendorarch}/auto/Geo/OSR/OSR.bs
246 %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
248 %files -n python-gdal
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{py_sitedir}/_gdal.so
251 %attr(755,root,root) %{py_sitedir}/_gdalconst.so
252 %attr(755,root,root) %{py_sitedir}/_gdal_array.so
253 %attr(755,root,root) %{py_sitedir}/_ogr.so
254 %attr(755,root,root) %{py_sitedir}/_osr.so
255 %{py_sitedir}/gdal.py[co]
256 %{py_sitedir}/gdalconst.py[co]
257 %{py_sitedir}/gdalnumeric.py[co]
258 %{py_sitedir}/gdal_array.py[co]
259 %{py_sitedir}/ogr.py[co]
260 %{py_sitedir}/osr.py[co]
261 %{py_sitedir}/Gdal_Wrapper-*.egg-info
265 %defattr(644,root,root,755)
266 %dir %{ruby_sitearchdir}/gdal
267 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
268 %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
269 %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
270 %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so