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