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