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