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