]>
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 |
ab2c918a | 12 | Release: 5 |
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 | |
ac627b1d | 22 | Patch5: %{name}-python_install.patch |
9b5c0fd4 | 23 | URL: http://www.gdal.org/ |
69051332 JB |
24 | BuildRequires: autoconf >= 2.52 |
25 | BuildRequires: automake | |
6b59fa88 | 26 | BuildRequires: cfitsio-devel |
3a591acf | 27 | BuildRequires: doxygen |
69051332 | 28 | BuildRequires: expat-devel >= 1.95.0 |
d44ae2ef | 29 | BuildRequires: geos-devel >= 2.0 |
b459f4d7 | 30 | BuildRequires: giflib-devel >= 4.0 |
6b59fa88 | 31 | BuildRequires: hdf-devel >= 4.0 |
69051332 | 32 | BuildRequires: hdf5-devel |
6b59fa88 | 33 | BuildRequires: jasper-devel |
d4d7a2c6 JB |
34 | BuildRequires: libcsf-devel |
35 | BuildRequires: libdap-devel >= 3.5 | |
b3cbf6a3 | 36 | BuildRequires: libgeotiff-devel >= 1.2.1 |
6b59fa88 | 37 | BuildRequires: libjpeg-devel >= 6b |
e354fe40 | 38 | BuildRequires: libpng-devel >= 2:1.2.8 |
b3cbf6a3 | 39 | BuildRequires: libstdc++-devel |
6b59fa88 | 40 | BuildRequires: libtiff-devel >= 3.6.0 |
69051332 | 41 | BuildRequires: libtool |
b3cbf6a3 | 42 | BuildRequires: netcdf-devel |
6b59fa88 | 43 | BuildRequires: ogdi-devel >= 3.1 |
a0ffd9c4 | 44 | BuildRequires: perl-devel |
faf5649c | 45 | BuildRequires: postgresql-backend-devel |
017b03bb | 46 | BuildRequires: postgresql-devel |
9a2dbbce | 47 | BuildRequires: python-devel >= 1:2.5 |
017b03bb | 48 | BuildRequires: python-numpy-devel >= 1:1.0.0 |
4aafe7c0 | 49 | %{?with_ruby:BuildRequires: ruby-devel} |
d4d7a2c6 | 50 | BuildRequires: sqlite3-devel >= 3 |
9a2dbbce | 51 | BuildRequires: swig-python >= 1.3 |
017b03bb | 52 | %{?with_ruby:BuildRequires: swig-ruby} |
655672e5 | 53 | %{?with_odbc:BuildRequires: unixODBC-devel} |
54 | %{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0} | |
faf5649c | 55 | BuildRequires: zlib-devel >= 1.1.4 |
d44ae2ef | 56 | Requires: geos >= 2.0 |
b3cbf6a3 | 57 | Requires: libgeotiff >= 1.2.1 |
e354fe40 | 58 | Requires: libpng >= 2:1.2.8 |
b3cbf6a3 | 59 | Requires: libtiff >= 3.6.0 |
faf5649c JB |
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. | |
f05c79e8 | 69 | |
d34f2ec8 JR |
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. | |
faf5649c | 77 | |
6b59fa88 JB |
78 | %package devel |
79 | Summary: GDAL library header files | |
a28c1bee | 80 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL |
6b59fa88 | 81 | Group: Development/Libraries |
1673a634 | 82 | Requires: %{name} = %{version}-%{release} |
b3cbf6a3 | 83 | Requires: cfitsio-devel |
69051332 | 84 | Requires: expat-devel >= 1.95.0 |
d44ae2ef | 85 | Requires: geos-devel >= 2.0 |
b459f4d7 | 86 | Requires: giflib-devel |
b3cbf6a3 | 87 | Requires: hdf-devel >= 4.0 |
69051332 | 88 | Requires: hdf5-devel |
b3cbf6a3 | 89 | Requires: jasper-devel |
d4d7a2c6 JB |
90 | Requires: libcsf-devel |
91 | Requires: libdap-devel >= 3.5 | |
b3cbf6a3 JB |
92 | Requires: libgeotiff-devel >= 1.2.1 |
93 | Requires: libjpeg-devel | |
e354fe40 | 94 | Requires: libpng-devel >= 2:1.2.8 |
b3cbf6a3 JB |
95 | Requires: libstdc++-devel |
96 | Requires: libtiff-devel >= 3.6.0 | |
b3cbf6a3 JB |
97 | Requires: netcdf-devel |
98 | Requires: ogdi-devel >= 3.1 | |
99 | Requires: postgresql-devel | |
d4d7a2c6 | 100 | Requires: sqlite3-devel >= 3 |
655672e5 | 101 | %{?with_odbc:Requires: unixODBC-devel} |
69051332 | 102 | %{?with_xerces:Requires: xerces-c-devel >= 2.7.0} |
6b59fa88 JB |
103 | |
104 | %description devel | |
105 | GDAL library header files. | |
106 | ||
d34f2ec8 JR |
107 | %description devel -l pl.UTF-8 |
108 | Pliki nagłówkowe biblioteki GDAL. | |
6b59fa88 JB |
109 | |
110 | %package static | |
111 | Summary: GDAL static libraries | |
a28c1bee | 112 | Summary(pl.UTF-8): Statyczne biblioteki GDAL |
6b59fa88 | 113 | Group: Development/Libraries |
1673a634 | 114 | Requires: %{name}-devel = %{version}-%{release} |
6b59fa88 JB |
115 | |
116 | %description static | |
117 | GDAL static libraries. | |
118 | ||
d34f2ec8 | 119 | %description static -l pl.UTF-8 |
6b59fa88 JB |
120 | Statyczne biblioteki GDAL. |
121 | ||
a0ffd9c4 JB |
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 | |
017b03bb | 132 | Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR. |
a0ffd9c4 | 133 | |
6b59fa88 JB |
134 | %package -n python-gdal |
135 | Summary: GDAL Python module | |
a28c1bee | 136 | Summary(pl.UTF-8): Moduł Pythona GDAL |
6b59fa88 | 137 | Group: Libraries/Python |
1673a634 | 138 | Requires: %{name} = %{version}-%{release} |
faf2b39a | 139 | %pyrequires_eq python-libs |
6b59fa88 JB |
140 | |
141 | %description -n python-gdal | |
142 | GDAL Python module. | |
143 | ||
d34f2ec8 JR |
144 | %description -n python-gdal -l pl.UTF-8 |
145 | Moduł Pythona GDAL. | |
6b59fa88 | 146 | |
a0ffd9c4 JB |
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 | |
017b03bb ER |
158 | Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i |
159 | osr. | |
a0ffd9c4 | 160 | |
faf5649c JB |
161 | %prep |
162 | %setup -q | |
163 | %patch0 -p1 | |
164 | %patch1 -p1 | |
a0ffd9c4 | 165 | %patch2 -p1 |
69051332 JB |
166 | %patch3 -p1 |
167 | %patch4 -p1 | |
0bf82ee7 | 168 | %patch5 -p1 |
69051332 JB |
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} | |
4ed54fac | 172 | |
faf5649c | 173 | %build |
69051332 | 174 | # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python, |
017b03bb ER |
175 | # and $PYTHON_INCLUDES is needed to detect numpy properly |
176 | export PYTHON_INCLUDES=-I%{py_incdir} | |
177 | ||
69051332 JB |
178 | %{__libtoolize} |
179 | cp -f /usr/share/automake/config.* . | |
180 | %{__aclocal} -I m4 | |
faf5649c | 181 | %{__autoconf} |
69051332 | 182 | # disable grass/libgrass here, it can be built from separate gdal-grass package |
6b59fa88 | 183 | %configure \ |
5014b82a | 184 | --datadir=%{_datadir}/gdal \ |
d4d7a2c6 | 185 | --with-dods-root=/usr \ |
69051332 | 186 | --with-hide-internal-symbols \ |
a0ffd9c4 | 187 | --with-perl \ |
69051332 | 188 | --with-python \ |
4aafe7c0 | 189 | %{?with_ruby:--with-ruby} \ |
69051332 | 190 | --with-sqlite3 \ |
655672e5 | 191 | %{?with_xerces:--with-xerces} \ |
6b59fa88 | 192 | --with-xerces-inc=/usr/include/xercesc \ |
80faacbe | 193 | --with-xerces-lib="-lxerces-c" \ |
a3027d62 | 194 | --without-grass \ |
69051332 | 195 | --without-libgrass |
a0ffd9c4 | 196 | # --with-php needs Zend API update |
69051332 JB |
197 | # java broken, no configure option |
198 | # csharp builds, but has no configure option | |
faf5649c | 199 | |
69051332 | 200 | # regenerate where needed |
825dc3dc | 201 | %{__make} -j1 -C swig/perl generate |
69051332 | 202 | |
825dc3dc | 203 | %{__make} -j1 |
a0ffd9c4 | 204 | |
825dc3dc | 205 | %{__make} -j1 docs |
3a591acf | 206 | |
faf5649c JB |
207 | %install |
208 | rm -rf $RPM_BUILD_ROOT | |
faf5649c | 209 | |
825dc3dc | 210 | %{__make} -j1 install install-man \ |
3a591acf JB |
211 | DESTDIR=$RPM_BUILD_ROOT |
212 | ||
388b39cb ER |
213 | rm -rf _html |
214 | cp -a html _html | |
215 | cp -a ogr/html _html/ogr | |
faf5649c | 216 | |
374370d5 JB |
217 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
218 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
219 | %py_postclean | |
5014b82a | 220 | |
017b03bb ER |
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 | ||
ac627b1d | 233 | %if %{with ruby} |
69051332 | 234 | %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la |
ac627b1d | 235 | %endif |
69051332 | 236 | |
faf5649c JB |
237 | %clean |
238 | rm -rf $RPM_BUILD_ROOT | |
239 | ||
6b59fa88 JB |
240 | %post -p /sbin/ldconfig |
241 | %postun -p /sbin/ldconfig | |
242 | ||
faf5649c JB |
243 | %files |
244 | %defattr(644,root,root,755) | |
c0a384ef | 245 | %doc NEWS PROVENANCE.TXT |
faf5649c | 246 | %attr(755,root,root) %{_bindir}/* |
5014b82a JB |
247 | %exclude %{_bindir}/gdal-config |
248 | %attr(755,root,root) %{_libdir}/libgdal.so.*.*.* | |
017b03bb | 249 | %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1 |
6b59fa88 | 250 | %{_datadir}/gdal |
5014b82a JB |
251 | %{_mandir}/man1/* |
252 | %exclude %{_mandir}/man1/gdal-config.1* | |
6b59fa88 JB |
253 | |
254 | %files devel | |
255 | %defattr(644,root,root,755) | |
388b39cb | 256 | %doc _html/* |
5014b82a | 257 | %attr(755,root,root) %{_bindir}/gdal-config |
6b59fa88 | 258 | %attr(755,root,root) %{_libdir}/libgdal.so |
5014b82a | 259 | %{_libdir}/libgdal.la |
faf5649c | 260 | %{_includedir}/*.h |
5014b82a | 261 | %{_mandir}/man1/gdal-config.1* |
6b59fa88 JB |
262 | |
263 | %files static | |
264 | %defattr(644,root,root,755) | |
9b5c0fd4 | 265 | %{_libdir}/libgdal.a |
6b59fa88 | 266 | |
a0ffd9c4 JB |
267 | %files -n perl-gdal |
268 | %defattr(644,root,root,755) | |
269 | %dir %{perl_vendorarch}/Geo | |
270 | %{perl_vendorarch}/Geo/GDAL.pm | |
271 | %dir %{perl_vendorarch}/Geo/GDAL | |
272 | %{perl_vendorarch}/Geo/GDAL/Const.pm | |
273 | %{perl_vendorarch}/Geo/OGR.pm | |
274 | %{perl_vendorarch}/Geo/OSR.pm | |
275 | %dir %{perl_vendorarch}/auto/Geo | |
276 | %dir %{perl_vendorarch}/auto/Geo/GDAL | |
277 | %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs | |
278 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so | |
279 | %dir %{perl_vendorarch}/auto/Geo/GDAL/Const | |
280 | %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs | |
281 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so | |
282 | %dir %{perl_vendorarch}/auto/Geo/OGR | |
283 | %{perl_vendorarch}/auto/Geo/OGR/OGR.bs | |
284 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so | |
285 | %dir %{perl_vendorarch}/auto/Geo/OSR | |
286 | %{perl_vendorarch}/auto/Geo/OSR/OSR.bs | |
287 | %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so | |
288 | ||
6b59fa88 JB |
289 | %files -n python-gdal |
290 | %defattr(644,root,root,755) | |
9a2dbbce JB |
291 | %{py_sitedir}/gdal.py[co] |
292 | %{py_sitedir}/gdalconst.py[co] | |
293 | %{py_sitedir}/gdalnumeric.py[co] | |
9a2dbbce JB |
294 | %{py_sitedir}/ogr.py[co] |
295 | %{py_sitedir}/osr.py[co] | |
69051332 JB |
296 | %{py_sitedir}/GDAL-*.egg-info |
297 | %dir %{py_sitedir}/osgeo | |
298 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so | |
299 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so | |
300 | %attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so | |
301 | %attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so | |
302 | %attr(755,root,root) %{py_sitedir}/osgeo/_osr.so | |
303 | %{py_sitedir}/osgeo/*.py[co] | |
a0ffd9c4 | 304 | |
4aafe7c0 | 305 | %if %{with ruby} |
a0ffd9c4 JB |
306 | %files -n ruby-gdal |
307 | %defattr(644,root,root,755) | |
308 | %dir %{ruby_sitearchdir}/gdal | |
309 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so | |
310 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so | |
311 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so | |
312 | %attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so | |
4aafe7c0 | 313 | %endif |