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