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