]> git.pld-linux.org Git - packages/gdal.git/blob - gdal.spec
76665ae8533c6375c4b89af5c6f9825fb37f33c8
[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.4
12 Release:        2
13 License:        BSD-like
14 Group:          Libraries
15 Source0:        ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
16 # Source0-md5:  d5e411b6f11bd1f144af67d2045d2606
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 URL:            http://www.gdal.org/
23 BuildRequires:  autoconf >= 2.52
24 BuildRequires:  automake
25 BuildRequires:  cfitsio-devel
26 BuildRequires:  doxygen
27 BuildRequires:  expat-devel >= 1.95.0
28 BuildRequires:  geos-devel >= 2.0
29 BuildRequires:  giflib-devel >= 4.0
30 BuildRequires:  hdf-devel >= 4.0
31 BuildRequires:  hdf5-devel
32 BuildRequires:  jasper-devel
33 BuildRequires:  libcsf-devel
34 BuildRequires:  libdap-devel >= 3.5
35 BuildRequires:  libgeotiff-devel >= 1.2.1
36 BuildRequires:  libjpeg-devel >= 6b
37 BuildRequires:  libpng-devel >= 2:1.2.8
38 BuildRequires:  libstdc++-devel
39 BuildRequires:  libtiff-devel >= 3.6.0
40 BuildRequires:  libtool
41 BuildRequires:  netcdf-devel
42 BuildRequires:  ogdi-devel >= 3.1
43 BuildRequires:  perl-devel
44 BuildRequires:  postgresql-backend-devel
45 BuildRequires:  postgresql-devel
46 BuildRequires:  python-devel >= 1:2.5
47 BuildRequires:  python-numpy-devel >= 1:1.0.0
48 %{?with_ruby:BuildRequires:     ruby-devel}
49 BuildRequires:  sqlite3-devel >= 3
50 BuildRequires:  swig-python >= 1.3
51 %{?with_ruby:BuildRequires:     swig-ruby}
52 %{?with_odbc:BuildRequires:     unixODBC-devel}
53 %{?with_xerces:BuildRequires:   xerces-c-devel >= 2.2.0}
54 BuildRequires:  zlib-devel >= 1.1.4
55 Requires:       geos >= 2.0
56 Requires:       libgeotiff >= 1.2.1
57 Requires:       libpng >= 2:1.2.8
58 Requires:       libtiff >= 3.6.0
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.
68
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.
76
77 %package devel
78 Summary:        GDAL library header files
79 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki GDAL
80 Group:          Development/Libraries
81 Requires:       %{name} = %{version}-%{release}
82 Requires:       cfitsio-devel
83 Requires:       expat-devel >= 1.95.0
84 Requires:       geos-devel >= 2.0
85 Requires:       giflib-devel
86 Requires:       hdf-devel >= 4.0
87 Requires:       hdf5-devel
88 Requires:       jasper-devel
89 Requires:       libcsf-devel
90 Requires:       libdap-devel >= 3.5
91 Requires:       libgeotiff-devel >= 1.2.1
92 Requires:       libjpeg-devel
93 Requires:       libpng-devel >= 2:1.2.8
94 Requires:       libstdc++-devel
95 Requires:       libtiff-devel >= 3.6.0
96 Requires:       netcdf-devel
97 Requires:       ogdi-devel >= 3.1
98 Requires:       postgresql-devel
99 Requires:       sqlite3-devel >= 3
100 %{?with_odbc:Requires:  unixODBC-devel}
101 %{?with_xerces:Requires:        xerces-c-devel >= 2.7.0}
102
103 %description devel
104 GDAL library header files.
105
106 %description devel -l pl.UTF-8
107 Pliki nagłówkowe biblioteki GDAL.
108
109 %package static
110 Summary:        GDAL static libraries
111 Summary(pl.UTF-8):      Statyczne biblioteki GDAL
112 Group:          Development/Libraries
113 Requires:       %{name}-devel = %{version}-%{release}
114
115 %description static
116 GDAL static libraries.
117
118 %description static -l pl.UTF-8
119 Statyczne biblioteki GDAL.
120
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
131 Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
132
133 %package -n python-gdal
134 Summary:        GDAL Python module
135 Summary(pl.UTF-8):      Moduł Pythona GDAL
136 Group:          Libraries/Python
137 Requires:       %{name} = %{version}-%{release}
138 %pyrequires_eq  python-libs
139
140 %description -n python-gdal
141 GDAL Python module.
142
143 %description -n python-gdal -l pl.UTF-8
144 Moduł Pythona GDAL.
145
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
157 Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
158 osr.
159
160 %prep
161 %setup -q
162 %patch0 -p1
163 %patch1 -p1
164 %patch2 -p1
165 %patch3 -p1
166 %patch4 -p1
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}
170
171 %build
172 # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python,
173 # and $PYTHON_INCLUDES is needed to detect numpy properly
174 export PYTHON_INCLUDES=-I%{py_incdir}
175
176 %{__libtoolize}
177 cp -f /usr/share/automake/config.* .
178 %{__aclocal} -I m4
179 %{__autoconf}
180 # disable grass/libgrass here, it can be built from separate gdal-grass package
181 %configure \
182         --datadir=%{_datadir}/gdal \
183         --with-dods-root=/usr \
184         --with-hide-internal-symbols \
185         --with-perl \
186         --with-python \
187         %{?with_ruby:--with-ruby} \
188         --with-sqlite3 \
189         %{?with_xerces:--with-xerces} \
190         --with-xerces-inc=/usr/include/xercesc \
191         --with-xerces-lib="-lxerces-c" \
192         --without-grass \
193         --without-libgrass
194 # --with-php needs Zend API update
195 # java broken, no configure option
196 # csharp builds, but has no configure option
197
198 # regenerate where needed
199 %{__make} -j1 -C swig/perl generate
200
201 %{__make} -j1
202
203 %{__make} -j1 docs
204
205 %install
206 rm -rf $RPM_BUILD_ROOT
207
208 %{__make} -j1 install install-man \
209         DESTDIR=$RPM_BUILD_ROOT
210
211 rm -rf _html
212 cp -a html _html
213 cp -a ogr/html _html/ogr
214
215 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
216 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
217 %py_postclean
218
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
231 %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
232
233 %clean
234 rm -rf $RPM_BUILD_ROOT
235
236 %post   -p /sbin/ldconfig
237 %postun -p /sbin/ldconfig
238
239 %files
240 %defattr(644,root,root,755)
241 %doc NEWS PROVENANCE.TXT
242 %attr(755,root,root) %{_bindir}/*
243 %exclude %{_bindir}/gdal-config
244 %attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
245 %attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
246 %{_datadir}/gdal
247 %{_mandir}/man1/*
248 %exclude %{_mandir}/man1/gdal-config.1*
249
250 %files devel
251 %defattr(644,root,root,755)
252 %doc _html/*
253 %attr(755,root,root) %{_bindir}/gdal-config
254 %attr(755,root,root) %{_libdir}/libgdal.so
255 %{_libdir}/libgdal.la
256 %{_includedir}/*.h
257 %{_mandir}/man1/gdal-config.1*
258
259 %files static
260 %defattr(644,root,root,755)
261 %{_libdir}/libgdal.a
262
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
285 %files -n python-gdal
286 %defattr(644,root,root,755)
287 %{py_sitedir}/gdal.py[co]
288 %{py_sitedir}/gdalconst.py[co]
289 %{py_sitedir}/gdalnumeric.py[co]
290 %{py_sitedir}/ogr.py[co]
291 %{py_sitedir}/osr.py[co]
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]
300
301 %if %{with ruby}
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
309 %endif
This page took 0.049216 seconds and 2 git commands to generate.