]>
Commit | Line | Data |
---|---|---|
1 | # TODO: csharp, java, mysql | |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without odbc # disable odbc support | |
5 | %bcond_without xerces # disable xerces support | |
6 | %bcond_without ruby # disable ruby support | |
7 | # | |
8 | Summary: Geospatial Data Abstraction Library | |
9 | Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi | |
10 | Name: gdal | |
11 | Version: 1.7.2 | |
12 | Release: 4 | |
13 | License: BSD-like | |
14 | Group: Libraries | |
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: proj-devel | |
46 | BuildRequires: python-devel >= 1:2.5 | |
47 | BuildRequires: python-numpy-devel >= 1:1.0.0 | |
48 | BuildRequires: rpm-pythonprov | |
49 | %{?with_ruby:BuildRequires: ruby-devel} | |
50 | BuildRequires: sqlite3-devel >= 3 | |
51 | BuildRequires: swig-perl | |
52 | BuildRequires: swig-python >= 1.3 | |
53 | %{?with_ruby:BuildRequires: swig-ruby} | |
54 | %if "%{pld_release}" == "ti" | |
55 | BuildRequires: tetex-format-latex | |
56 | BuildRequires: tetex-dvips | |
57 | %else | |
58 | BuildRequires: texlive-dvips | |
59 | BuildRequires: texlive-latex | |
60 | %endif | |
61 | %{?with_odbc:BuildRequires: unixODBC-devel} | |
62 | %{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0} | |
63 | BuildRequires: zlib-devel >= 1.1.4 | |
64 | Requires: geos >= 2.0 | |
65 | Requires: libgeotiff >= 1.2.1 | |
66 | Requires: libpng >= 2:1.2.8 | |
67 | Requires: libtiff >= 3.6.0 | |
68 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
69 | ||
70 | %description | |
71 | GDAL is a translator library for raster geospatial data formats that | |
72 | is released under an Open Source license. As a library, it presents a | |
73 | single abstract data model to the calling application for all | |
74 | supported formats. The related OGR library (which lives within the | |
75 | GDAL source tree) provides a similar capability for simple features | |
76 | vector data. | |
77 | ||
78 | %description -l pl.UTF-8 | |
79 | GDAL to biblioteka konwertująca między formatami rastrowych danych | |
80 | dotyczących powierzchni Ziemi, udostępniona na licencji Open Source. | |
81 | Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych | |
82 | do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR | |
83 | (której źródła są dołączone do drzewa źródeł GDAL) daje podobne | |
84 | możliwości dla danych wektorowych. | |
85 | ||
86 | %package devel | |
87 | Summary: GDAL library header files | |
88 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL | |
89 | Group: Development/Libraries | |
90 | Requires: %{name} = %{version}-%{release} | |
91 | Requires: cfitsio-devel | |
92 | Requires: expat-devel >= 1.95.0 | |
93 | Requires: geos-devel >= 2.0 | |
94 | Requires: giflib-devel | |
95 | Requires: hdf-devel >= 4.0 | |
96 | Requires: hdf5-devel | |
97 | Requires: jasper-devel | |
98 | Requires: libcsf-devel | |
99 | Requires: libdap-devel >= 3.5 | |
100 | Requires: libgeotiff-devel >= 1.2.1 | |
101 | Requires: libjpeg-devel | |
102 | Requires: libpng-devel >= 2:1.2.8 | |
103 | Requires: libstdc++-devel | |
104 | Requires: libtiff-devel >= 3.6.0 | |
105 | Requires: netcdf-devel | |
106 | Requires: ogdi-devel >= 3.1 | |
107 | Requires: postgresql-devel | |
108 | Requires: sqlite3-devel >= 3 | |
109 | %{?with_odbc:Requires: unixODBC-devel} | |
110 | %{?with_xerces:Requires: xerces-c-devel >= 2.7.0} | |
111 | ||
112 | %description devel | |
113 | GDAL library header files. | |
114 | ||
115 | %description devel -l pl.UTF-8 | |
116 | Pliki nagłówkowe biblioteki GDAL. | |
117 | ||
118 | %package static | |
119 | Summary: GDAL static libraries | |
120 | Summary(pl.UTF-8): Statyczne biblioteki GDAL | |
121 | Group: Development/Libraries | |
122 | Requires: %{name}-devel = %{version}-%{release} | |
123 | ||
124 | %description static | |
125 | GDAL static libraries. | |
126 | ||
127 | %description static -l pl.UTF-8 | |
128 | Statyczne biblioteki GDAL. | |
129 | ||
130 | %package -n perl-gdal | |
131 | Summary: Perl bindings for GDAL | |
132 | Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL | |
133 | Group: Development/Languages/Perl | |
134 | Requires: %{name} = %{version}-%{release} | |
135 | ||
136 | %description -n perl-gdal | |
137 | Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules. | |
138 | ||
139 | %description -n perl-gdal -l pl.UTF-8 | |
140 | Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR. | |
141 | ||
142 | %package -n python-gdal | |
143 | Summary: GDAL Python module | |
144 | Summary(pl.UTF-8): Moduł Pythona GDAL | |
145 | Group: Libraries/Python | |
146 | Requires: %{name} = %{version}-%{release} | |
147 | %pyrequires_eq python-libs | |
148 | ||
149 | %description -n python-gdal | |
150 | GDAL Python module. | |
151 | ||
152 | %description -n python-gdal -l pl.UTF-8 | |
153 | Moduł Pythona GDAL. | |
154 | ||
155 | %package -n ruby-gdal | |
156 | Summary: Ruby bindings for GDAL | |
157 | Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL | |
158 | Group: Development/Languages | |
159 | Requires: %{name} = %{version}-%{release} | |
160 | %{?ruby_mod_ver_requires_eq} | |
161 | ||
162 | %description -n ruby-gdal | |
163 | Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules. | |
164 | ||
165 | %description -n ruby-gdal -l pl.UTF-8 | |
166 | Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i | |
167 | osr. | |
168 | ||
169 | %prep | |
170 | %setup -q | |
171 | %patch0 -p1 | |
172 | %patch1 -p1 | |
173 | %patch2 -p1 | |
174 | %patch3 -p1 | |
175 | ||
176 | # need to regenerate (old ones don't support perl 5.10) | |
177 | rm swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp} | |
178 | # includes updated for Ruby 1.9 | |
179 | rm swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp} | |
180 | ||
181 | rm -rf man | |
182 | ||
183 | %build | |
184 | # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python, | |
185 | # and $PYTHON_INCLUDES is needed to detect numpy properly | |
186 | export PYTHON_INCLUDES=-I%{py_incdir} | |
187 | ||
188 | %{__libtoolize} | |
189 | cp -f /usr/share/automake/config.* . | |
190 | %{__aclocal} -I m4 | |
191 | %{__autoconf} | |
192 | # disable grass/libgrass here, it can be built from separate gdal-grass package | |
193 | %configure \ | |
194 | --datadir=%{_datadir}/gdal \ | |
195 | --with-dods-root=/usr \ | |
196 | --with-hide-internal-symbols \ | |
197 | --with-perl \ | |
198 | --with-python \ | |
199 | %{?with_ruby:--with-ruby} \ | |
200 | --with-sqlite3 \ | |
201 | %{?with_xerces:--with-xerces} \ | |
202 | --with-xerces-inc=/usr/include/xercesc \ | |
203 | --with-xerces-lib="-lxerces-c" \ | |
204 | --without-grass \ | |
205 | --without-libgrass | |
206 | # --with-php needs Zend API update | |
207 | # java broken, no configure option | |
208 | # csharp builds, but has no configure option | |
209 | ||
210 | # regenerate where needed | |
211 | %{__make} -j1 -C swig/perl generate | |
212 | %{__make} -j1 -C swig/ruby generate | |
213 | ||
214 | %{__make} -j1 | |
215 | ||
216 | %{__make} -j1 docs | |
217 | ||
218 | %{__make} -j1 man | |
219 | ||
220 | %install | |
221 | rm -rf $RPM_BUILD_ROOT | |
222 | ||
223 | %{__make} -j1 install install-man \ | |
224 | DESTDIR=$RPM_BUILD_ROOT | |
225 | ||
226 | rm -rf _html | |
227 | cp -a html _html | |
228 | cp -a ogr/html _html/ogr | |
229 | ||
230 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
231 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
232 | %py_postclean | |
233 | ||
234 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
235 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist | |
236 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist | |
237 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist | |
238 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist | |
239 | ||
240 | # some doxygen trash | |
241 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL.dox | |
242 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL/Const.dox | |
243 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OGR.dox | |
244 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OSR.dox | |
245 | ||
246 | %if %{with ruby} | |
247 | %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la | |
248 | %endif | |
249 | ||
250 | %clean | |
251 | rm -rf $RPM_BUILD_ROOT | |
252 | ||
253 | %post -p /sbin/ldconfig | |
254 | %postun -p /sbin/ldconfig | |
255 | ||
256 | %files | |
257 | %defattr(644,root,root,755) | |
258 | %doc NEWS PROVENANCE.TXT | |
259 | %attr(755,root,root) %{_bindir}/* | |
260 | %exclude %{_bindir}/gdal-config | |
261 | %attr(755,root,root) %{_libdir}/libgdal.so.*.*.* | |
262 | %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1 | |
263 | %{_datadir}/gdal | |
264 | %{_mandir}/man1/* | |
265 | %exclude %{_mandir}/man1/gdal-config.1* | |
266 | ||
267 | %files devel | |
268 | %defattr(644,root,root,755) | |
269 | %doc _html/* | |
270 | %attr(755,root,root) %{_bindir}/gdal-config | |
271 | %attr(755,root,root) %{_libdir}/libgdal.so | |
272 | %{_libdir}/libgdal.la | |
273 | %{_includedir}/*.h | |
274 | %{_mandir}/man1/gdal-config.1* | |
275 | ||
276 | %files static | |
277 | %defattr(644,root,root,755) | |
278 | %{_libdir}/libgdal.a | |
279 | ||
280 | %files -n perl-gdal | |
281 | %defattr(644,root,root,755) | |
282 | %dir %{perl_vendorarch}/Geo | |
283 | %{perl_vendorarch}/Geo/GDAL.pm | |
284 | %dir %{perl_vendorarch}/Geo/GDAL | |
285 | %{perl_vendorarch}/Geo/GDAL/Const.pm | |
286 | %{perl_vendorarch}/Geo/OGR.pm | |
287 | %{perl_vendorarch}/Geo/OSR.pm | |
288 | %dir %{perl_vendorarch}/auto/Geo | |
289 | %dir %{perl_vendorarch}/auto/Geo/GDAL | |
290 | %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs | |
291 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so | |
292 | %dir %{perl_vendorarch}/auto/Geo/GDAL/Const | |
293 | %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs | |
294 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so | |
295 | %dir %{perl_vendorarch}/auto/Geo/OGR | |
296 | %{perl_vendorarch}/auto/Geo/OGR/OGR.bs | |
297 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so | |
298 | %dir %{perl_vendorarch}/auto/Geo/OSR | |
299 | %{perl_vendorarch}/auto/Geo/OSR/OSR.bs | |
300 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so | |
301 | ||
302 | %files -n python-gdal | |
303 | %defattr(644,root,root,755) | |
304 | %{py_sitedir}/gdal.py[co] | |
305 | %{py_sitedir}/gdalconst.py[co] | |
306 | %{py_sitedir}/gdalnumeric.py[co] | |
307 | %{py_sitedir}/ogr.py[co] | |
308 | %{py_sitedir}/osr.py[co] | |
309 | %{py_sitedir}/GDAL-*.egg-info | |
310 | %dir %{py_sitedir}/osgeo | |
311 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so | |
312 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so | |
313 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so | |
314 | %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so | |
315 | %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so | |
316 | %{py_sitedir}/osgeo/*.py[co] | |
317 | ||
318 | %if %{with ruby} | |
319 | %files -n ruby-gdal | |
320 | %defattr(644,root,root,755) | |
321 | %dir %{ruby_sitearchdir}/gdal | |
322 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so | |
323 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so | |
324 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so | |
325 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so | |
326 | %endif |