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