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