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