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