]> git.pld-linux.org Git - packages/gdal.git/blob - gdal.spec
5ce4b6720f52484d8b797e15cfef4b874fcc4313
[packages/gdal.git] / gdal.spec
1 # TODO:
2 # - wait for newer pcidsk, switch to external again
3 # - csharp, java, mysql
4 #
5 # Conditional build:
6 %bcond_without  odbc    # disable odbc support
7 %bcond_without  xerces  # disable xerces support
8 %bcond_without  ruby    # disable ruby support
9 #
10 Summary:        Geospatial Data Abstraction Library
11 Summary(pl.UTF-8):      Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
12 Name:           gdal
13 Version:        1.8.0
14 Release:        1
15 License:        BSD-like
16 Group:          Libraries
17 Source0:        ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
18 # Source0-md5:  c762cdab0f7e51a677ba49278a8a263d
19 Patch0:         %{name}-perl.patch
20 Patch1:         %{name}-ruby.patch
21 Patch2:         %{name}-asneeded.patch
22 Patch3:         %{name}-python_install.patch
23 Patch4:         %{name}-doxy.patch
24 Patch5:         %{name}-libpng.patch
25 URL:            http://www.gdal.org/
26 BuildRequires:  autoconf >= 2.52
27 BuildRequires:  automake
28 BuildRequires:  cfitsio-devel
29 BuildRequires:  doxygen >= 1.4.2
30 BuildRequires:  expat-devel >= 1.95.0
31 BuildRequires:  geos-devel >= 2.2
32 BuildRequires:  giflib-devel >= 4.0
33 BuildRequires:  hdf-devel >= 4.0
34 BuildRequires:  hdf5-devel
35 BuildRequires:  jasper-devel
36 BuildRequires:  libcsf-devel
37 BuildRequires:  libdap-devel >= 3.10
38 BuildRequires:  libgeotiff-devel >= 1.2.1
39 BuildRequires:  libjpeg-devel >= 6b
40 BuildRequires:  libpng-devel >= 2:1.2.8
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  libtiff-devel >= 4.0
43 BuildRequires:  libtool
44 BuildRequires:  libuuid-devel
45 BuildRequires:  libxml2-devel
46 BuildRequires:  netcdf-devel
47 BuildRequires:  ogdi-devel >= 3.1
48 #BuildRequires: pcidsk-devel > 0.3
49 BuildRequires:  perl-devel
50 BuildRequires:  postgresql-backend-devel
51 BuildRequires:  postgresql-devel
52 BuildRequires:  proj-devel
53 BuildRequires:  python-devel >= 1:2.5
54 BuildRequires:  python-numpy-devel >= 1:1.0.0
55 BuildRequires:  rpm-pythonprov
56 %{?with_ruby:BuildRequires:     ruby-devel}
57 BuildRequires:  sqlite3-devel >= 3
58 BuildRequires:  swig-perl
59 BuildRequires:  swig-python >= 1.3
60 %{?with_ruby:BuildRequires:     swig-ruby}
61 %if "%{pld_release}" == "ti"
62 BuildRequires:  tetex-format-latex
63 BuildRequires:  tetex-dvips
64 %else
65 BuildRequires:  texlive-dvips
66 BuildRequires:  texlive-latex
67 %endif
68 %{?with_odbc:BuildRequires:     unixODBC-devel >= 2.2.15}
69 %{?with_xerces:BuildRequires:   xerces-c-devel >= 2.2.0}
70 BuildRequires:  zlib-devel >= 1.1.4
71 Requires:       geos >= 2.2
72 Requires:       libgeotiff >= 1.2.1
73 Requires:       libpng >= 2:1.2.8
74 Requires:       libtiff >= 4.0
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 %description
78 GDAL is a translator library for raster geospatial data formats that
79 is released under an Open Source license. As a library, it presents a
80 single abstract data model to the calling application for all
81 supported formats. The related OGR library (which lives within the
82 GDAL source tree) provides a similar capability for simple features
83 vector data.
84
85 %description -l pl.UTF-8
86 GDAL to biblioteka konwertująca między formatami rastrowych danych
87 dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
88 Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
89 do 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
91 możliwości dla danych wektorowych.
92
93 %package devel
94 Summary:        GDAL library header files
95 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki GDAL
96 Group:          Development/Libraries
97 Requires:       %{name} = %{version}-%{release}
98 Requires:       cfitsio-devel
99 Requires:       expat-devel >= 1.95.0
100 Requires:       geos-devel >= 2.2
101 Requires:       giflib-devel
102 Requires:       hdf-devel >= 4.0
103 Requires:       hdf5-devel
104 Requires:       jasper-devel
105 Requires:       libcsf-devel
106 Requires:       libdap-devel >= 3.10
107 Requires:       libgeotiff-devel >= 1.2.1
108 Requires:       libjpeg-devel
109 Requires:       libpng-devel >= 2:1.2.8
110 Requires:       libstdc++-devel
111 Requires:       libtiff-devel >= 4.0
112 Requires:       netcdf-devel
113 Requires:       ogdi-devel >= 3.1
114 #Requires:      pcidsk-devel > 0.3
115 Requires:       postgresql-devel
116 Requires:       sqlite3-devel >= 3
117 %{?with_odbc:Requires:  unixODBC-devel}
118 %{?with_xerces:Requires:        xerces-c-devel >= 2.7.0}
119
120 %description devel
121 GDAL library header files.
122
123 %description devel -l pl.UTF-8
124 Pliki nagłówkowe biblioteki GDAL.
125
126 %package static
127 Summary:        GDAL static libraries
128 Summary(pl.UTF-8):      Statyczne biblioteki GDAL
129 Group:          Development/Libraries
130 Requires:       %{name}-devel = %{version}-%{release}
131
132 %description static
133 GDAL static libraries.
134
135 %description static -l pl.UTF-8
136 Statyczne biblioteki GDAL.
137
138 %package -n perl-gdal
139 Summary:        Perl bindings for GDAL
140 Summary(pl.UTF-8):      Wiązania Perla do pakietu GDAL
141 Group:          Development/Languages/Perl
142 Requires:       %{name} = %{version}-%{release}
143
144 %description -n perl-gdal
145 Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
146
147 %description -n perl-gdal -l pl.UTF-8
148 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
149
150 %package -n python-gdal
151 Summary:        GDAL Python module
152 Summary(pl.UTF-8):      Moduł Pythona GDAL
153 Group:          Libraries/Python
154 Requires:       %{name} = %{version}-%{release}
155 %pyrequires_eq  python-libs
156
157 %description -n python-gdal
158 GDAL Python module.
159
160 %description -n python-gdal -l pl.UTF-8
161 Moduł Pythona GDAL.
162
163 %package -n ruby-gdal
164 Summary:        Ruby bindings for GDAL
165 Summary(pl.UTF-8):      Wiązania języka Ruby do pakietu GDAL
166 Group:          Development/Languages
167 Requires:       %{name} = %{version}-%{release}
168 %{?ruby_mod_ver_requires_eq}
169
170 %description -n ruby-gdal
171 Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
172
173 %description -n ruby-gdal -l pl.UTF-8
174 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
175 osr.
176
177 %prep
178 %setup -q
179 %patch0 -p1
180 %patch1 -p1
181 %patch2 -p1
182 %patch3 -p1
183 %patch4 -p1
184 %patch5 -p1
185
186 # need to regenerate (old ones don't support perl 5.10)
187 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
188 # includes updated for Ruby 1.9
189 %{__rm} swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
190
191 %{__rm} -r man
192
193 %build
194 # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
195 # and $PYTHON_INCLUDES is needed to detect numpy properly
196 export PYTHON_INCLUDES=-I%{py_incdir}
197
198 %{__libtoolize}
199 %{__aclocal} -I m4
200 %{__autoconf}
201 # disable grass/libgrass here, it can be built from separate gdal-grass package
202 # note: "WARNING: unrecognized options: --with-hide-internal-symbols" is caused by configure bug; option DOES take effect
203 %configure \
204         --datadir=%{_datadir}/gdal \
205         --with-dods-root=/usr \
206         --with-hide-internal-symbols \
207         --with-perl \
208         --with-python \
209         %{?with_ruby:--with-ruby} \
210         --with-sqlite3 \
211         %{?with_xerces:--with-xerces} \
212         --with-xerces-inc=/usr/include/xercesc \
213         --with-xerces-lib="-lxerces-c" \
214         --without-grass \
215         --without-libgrass
216 #       --with-pcidsk=/usr (needs > 0.3)
217 # --with-php needs Zend API update
218 # java broken, no configure option
219 # csharp builds, but has no configure option
220
221 # regenerate where needed
222 %{__make} -j1 -C swig/perl generate
223 %{?with_ruby:%{__make} -j1 -C swig/ruby generate}
224
225 %{__make} -j1
226
227 %{__make} -j1 docs
228
229 %{__make} -j1 man
230
231 %install
232 rm -rf $RPM_BUILD_ROOT
233
234 %{__make} -j1 install install-man \
235         DESTDIR=$RPM_BUILD_ROOT
236
237 rm -rf _html
238 cp -a html _html
239 cp -a ogr/html _html/ogr
240
241 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
242 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
243 %py_postclean
244
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
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
254
255 %if %{with ruby}
256 %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
257 %endif
258
259 %clean
260 rm -rf $RPM_BUILD_ROOT
261
262 %post   -p /sbin/ldconfig
263 %postun -p /sbin/ldconfig
264
265 %files
266 %defattr(644,root,root,755)
267 %doc NEWS PROVENANCE.TXT
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
275 %attr(755,root,root) %{_bindir}/gdal_calc.py
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
293 %attr(755,root,root) %{_bindir}/gdallocationinfo
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
306 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
307 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
308 %{_datadir}/gdal
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*
323 %{_mandir}/man1/gdallocationinfo.1*
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*
334
335 %files devel
336 %defattr(644,root,root,755)
337 %doc _html/*
338 %attr(755,root,root) %{_bindir}/gdal-config
339 %attr(755,root,root) %{_libdir}/libgdal.so
340 %{_libdir}/libgdal.la
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
351 %{_mandir}/man1/gdal-config.1*
352
353 %files static
354 %defattr(644,root,root,755)
355 %{_libdir}/libgdal.a
356
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
379 %files -n python-gdal
380 %defattr(644,root,root,755)
381 %{py_sitedir}/gdal.py[co]
382 %{py_sitedir}/gdalconst.py[co]
383 %{py_sitedir}/gdalnumeric.py[co]
384 %{py_sitedir}/ogr.py[co]
385 %{py_sitedir}/osr.py[co]
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]
394
395 %if %{with ruby}
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
403 %endif
This page took 0.047431 seconds and 2 git commands to generate.