]> git.pld-linux.org Git - packages/gdal.git/blame - gdal.spec
- Release: 1
[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
c6227433 12Release: 1
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
9a2dbbce 45BuildRequires: python-devel >= 1:2.5
017b03bb 46BuildRequires: python-numpy-devel >= 1:1.0.0
479cb83c 47BuildRequires: rpm-pythonprov
4aafe7c0 48%{?with_ruby:BuildRequires: ruby-devel}
d4d7a2c6 49BuildRequires: sqlite3-devel >= 3
479cb83c 50BuildRequires: swig-perl
9a2dbbce 51BuildRequires: swig-python >= 1.3
017b03bb 52%{?with_ruby:BuildRequires: swig-ruby}
db38e4ab 53%if "%{pld_release}" == "ti"
54BuildRequires: tetex-format-latex
55BuildRequires: tetex-dvips
56%else
479cb83c 57BuildRequires: texlive-dvips
58BuildRequires: texlive-latex
db38e4ab 59%endif
655672e5 60%{?with_odbc:BuildRequires: unixODBC-devel}
61%{?with_xerces:BuildRequires: xerces-c-devel >= 2.2.0}
faf5649c 62BuildRequires: zlib-devel >= 1.1.4
d44ae2ef 63Requires: geos >= 2.0
b3cbf6a3 64Requires: libgeotiff >= 1.2.1
e354fe40 65Requires: libpng >= 2:1.2.8
b3cbf6a3 66Requires: libtiff >= 3.6.0
faf5649c
JB
67BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69%description
70GDAL is a translator library for raster geospatial data formats that
71is released under an Open Source license. As a library, it presents a
72single abstract data model to the calling application for all
73supported formats. The related OGR library (which lives within the
74GDAL source tree) provides a similar capability for simple features
75vector data.
f05c79e8 76
d34f2ec8
JR
77%description -l pl.UTF-8
78GDAL to biblioteka konwertująca między formatami rastrowych danych
79dotyczących powierzchni Ziemi, udostępniona na licencji Open Source.
80Jako biblioteka udostępnia aplikacjom jeden abstrakcyjny model danych
81do wszystkich obsługiwanych formatów. Powiązana z nią biblioteka OGR
82(której źródła są dołączone do drzewa źródeł GDAL) daje podobne
83możliwości dla danych wektorowych.
faf5649c 84
6b59fa88
JB
85%package devel
86Summary: GDAL library header files
a28c1bee 87Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
6b59fa88 88Group: Development/Libraries
1673a634 89Requires: %{name} = %{version}-%{release}
b3cbf6a3 90Requires: cfitsio-devel
69051332 91Requires: expat-devel >= 1.95.0
d44ae2ef 92Requires: geos-devel >= 2.0
b459f4d7 93Requires: giflib-devel
b3cbf6a3 94Requires: hdf-devel >= 4.0
69051332 95Requires: hdf5-devel
b3cbf6a3 96Requires: jasper-devel
d4d7a2c6
JB
97Requires: libcsf-devel
98Requires: libdap-devel >= 3.5
b3cbf6a3
JB
99Requires: libgeotiff-devel >= 1.2.1
100Requires: libjpeg-devel
e354fe40 101Requires: libpng-devel >= 2:1.2.8
b3cbf6a3
JB
102Requires: libstdc++-devel
103Requires: libtiff-devel >= 3.6.0
b3cbf6a3
JB
104Requires: netcdf-devel
105Requires: ogdi-devel >= 3.1
106Requires: postgresql-devel
d4d7a2c6 107Requires: sqlite3-devel >= 3
655672e5 108%{?with_odbc:Requires: unixODBC-devel}
69051332 109%{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
6b59fa88
JB
110
111%description devel
112GDAL library header files.
113
d34f2ec8
JR
114%description devel -l pl.UTF-8
115Pliki nagłówkowe biblioteki GDAL.
6b59fa88
JB
116
117%package static
118Summary: GDAL static libraries
a28c1bee 119Summary(pl.UTF-8): Statyczne biblioteki GDAL
6b59fa88 120Group: Development/Libraries
1673a634 121Requires: %{name}-devel = %{version}-%{release}
6b59fa88
JB
122
123%description static
124GDAL static libraries.
125
d34f2ec8 126%description static -l pl.UTF-8
6b59fa88
JB
127Statyczne biblioteki GDAL.
128
a0ffd9c4
JB
129%package -n perl-gdal
130Summary: Perl bindings for GDAL
131Summary(pl.UTF-8): Wiązania Perla do pakietu GDAL
132Group: Development/Languages/Perl
133Requires: %{name} = %{version}-%{release}
134
135%description -n perl-gdal
136Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
137
138%description -n perl-gdal -l pl.UTF-8
017b03bb 139Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
a0ffd9c4 140
6b59fa88
JB
141%package -n python-gdal
142Summary: GDAL Python module
a28c1bee 143Summary(pl.UTF-8): Moduł Pythona GDAL
6b59fa88 144Group: Libraries/Python
1673a634 145Requires: %{name} = %{version}-%{release}
faf2b39a 146%pyrequires_eq python-libs
6b59fa88
JB
147
148%description -n python-gdal
149GDAL Python module.
150
d34f2ec8
JR
151%description -n python-gdal -l pl.UTF-8
152Moduł Pythona GDAL.
6b59fa88 153
a0ffd9c4
JB
154%package -n ruby-gdal
155Summary: Ruby bindings for GDAL
156Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
157Group: Development/Languages
158Requires: %{name} = %{version}-%{release}
159%{?ruby_mod_ver_requires_eq}
160
161%description -n ruby-gdal
162Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
163
164%description -n ruby-gdal -l pl.UTF-8
017b03bb
ER
165Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
166osr.
a0ffd9c4 167
faf5649c
JB
168%prep
169%setup -q
170%patch0 -p1
171%patch1 -p1
a0ffd9c4 172%patch2 -p1
69051332 173%patch3 -p1
69051332
JB
174
175# need to regenerate (old ones don't support perl 5.10)
176rm swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
f5a12c65
JK
177# includes updated for Ruby 1.9
178rm swig/ruby/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
179
180rm -rf man
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
f5a12c65 211%{__make} -j1 -C swig/ruby generate
69051332 212
825dc3dc 213%{__make} -j1
a0ffd9c4 214
825dc3dc 215%{__make} -j1 docs
3a591acf 216
f5a12c65
JK
217%{__make} -j1 man
218
faf5649c
JB
219%install
220rm -rf $RPM_BUILD_ROOT
faf5649c 221
825dc3dc 222%{__make} -j1 install install-man \
3a591acf
JB
223 DESTDIR=$RPM_BUILD_ROOT
224
388b39cb
ER
225rm -rf _html
226cp -a html _html
227cp -a ogr/html _html/ogr
faf5649c 228
374370d5
JB
229%py_comp $RPM_BUILD_ROOT%{py_sitedir}
230%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
231%py_postclean
5014b82a 232
017b03bb
ER
233%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
234%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/.packlist
235%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
236%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OGR/.packlist
237%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
238
239# some doxygen trash
240%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL.dox
241%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/GDAL/Const.dox
242%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OGR.dox
243%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/OSR.dox
244
ac627b1d 245%if %{with ruby}
69051332 246%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/gdal/*.la
ac627b1d 247%endif
69051332 248
faf5649c
JB
249%clean
250rm -rf $RPM_BUILD_ROOT
251
6b59fa88
JB
252%post -p /sbin/ldconfig
253%postun -p /sbin/ldconfig
254
faf5649c
JB
255%files
256%defattr(644,root,root,755)
c0a384ef 257%doc NEWS PROVENANCE.TXT
faf5649c 258%attr(755,root,root) %{_bindir}/*
5014b82a
JB
259%exclude %{_bindir}/gdal-config
260%attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
017b03bb 261%attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
6b59fa88 262%{_datadir}/gdal
5014b82a
JB
263%{_mandir}/man1/*
264%exclude %{_mandir}/man1/gdal-config.1*
6b59fa88
JB
265
266%files devel
267%defattr(644,root,root,755)
388b39cb 268%doc _html/*
5014b82a 269%attr(755,root,root) %{_bindir}/gdal-config
6b59fa88 270%attr(755,root,root) %{_libdir}/libgdal.so
5014b82a 271%{_libdir}/libgdal.la
faf5649c 272%{_includedir}/*.h
5014b82a 273%{_mandir}/man1/gdal-config.1*
6b59fa88
JB
274
275%files static
276%defattr(644,root,root,755)
9b5c0fd4 277%{_libdir}/libgdal.a
6b59fa88 278
a0ffd9c4
JB
279%files -n perl-gdal
280%defattr(644,root,root,755)
281%dir %{perl_vendorarch}/Geo
282%{perl_vendorarch}/Geo/GDAL.pm
283%dir %{perl_vendorarch}/Geo/GDAL
284%{perl_vendorarch}/Geo/GDAL/Const.pm
285%{perl_vendorarch}/Geo/OGR.pm
286%{perl_vendorarch}/Geo/OSR.pm
287%dir %{perl_vendorarch}/auto/Geo
288%dir %{perl_vendorarch}/auto/Geo/GDAL
289%{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
290%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
291%dir %{perl_vendorarch}/auto/Geo/GDAL/Const
292%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
293%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
294%dir %{perl_vendorarch}/auto/Geo/OGR
295%{perl_vendorarch}/auto/Geo/OGR/OGR.bs
296%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
297%dir %{perl_vendorarch}/auto/Geo/OSR
298%{perl_vendorarch}/auto/Geo/OSR/OSR.bs
299%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
300
6b59fa88
JB
301%files -n python-gdal
302%defattr(644,root,root,755)
9a2dbbce
JB
303%{py_sitedir}/gdal.py[co]
304%{py_sitedir}/gdalconst.py[co]
305%{py_sitedir}/gdalnumeric.py[co]
9a2dbbce
JB
306%{py_sitedir}/ogr.py[co]
307%{py_sitedir}/osr.py[co]
69051332
JB
308%{py_sitedir}/GDAL-*.egg-info
309%dir %{py_sitedir}/osgeo
310%attr(755,root,root) %{py_sitedir}/osgeo/_gdal.so
311%attr(755,root,root) %{py_sitedir}/osgeo/_gdal_array.so
312%attr(755,root,root) %{py_sitedir}/osgeo/_gdalconst.so
313%attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
314%attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
315%{py_sitedir}/osgeo/*.py[co]
a0ffd9c4 316
4aafe7c0 317%if %{with ruby}
a0ffd9c4
JB
318%files -n ruby-gdal
319%defattr(644,root,root,755)
320%dir %{ruby_sitearchdir}/gdal
321%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdal.so
322%attr(755,root,root) %{ruby_sitearchdir}/gdal/gdalconst.so
323%attr(755,root,root) %{ruby_sitearchdir}/gdal/ogr.so
324%attr(755,root,root) %{ruby_sitearchdir}/gdal/osr.so
4aafe7c0 325%endif
This page took 0.095575 seconds and 4 git commands to generate.