Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 86931f4b1f73237707bc97379beb2121 > files > 2

gdal-1.1.9-2mdk.src.rpm

%define name gdal
%define ver 1.1.9
%define rel 2mdk
%define major 0
%define libname %mklibname %{name} %{major}

%define pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")
%define build_geotiff 0
%{?_with_geotiff: %define build_geotiff 1}

Summary: 	The Geospatial Data Abstraction Library (GDAL)
Name: 		%name
Version: 	%ver
Release: 	%rel
Group: 		Sciences/Geosciences
License:	MIT
Source: 	ftp://ftp.remotesensing.org/pub/gdal/%{name}-%{version}.tar.bz2
Url:		http://www.remotesensing.org/gdal/
#Patch0: 	gdal-1.1.8-destdir.patch.bz2
#Patch1: 	gdal-1.1.8-pj_get_def.patch.bz2
BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	libpng-devel
BuildRequires:	zlib-devel
%if %build_geotiff
BuildRequires:	libgeotiff-devel >= 1.2.0
%endif
BuildRequires:	libpng-devel
BuildRequires:	libungif-devel
BuildRequires:	postgresql-devel
BuildRequires:	libjpeg-devel
BuildRequires:	libproj-devel >= 4.4.7
BuildRequires:	libgrass5-devel
BuildRequires:	python-numeric-devel
#{?_with_plf:BuildRequires: libjasper-devel}
Requires:	%{libname} = %{version}

%description
The Geospatial Data Abstraction Library (GDAL) is a unifying
C/C++ API for accessing raster geospatial data, and currently
includes formats like GeoTIFF, Erdas Imagine, Arc/Info
Binary, CEOS, DTED, GXF, and SDTS. It is intended to provide
efficient access, suitable for use in viewer applications,
and also attempts to preserve coordinate systems and metadata.
Python, C, and C++ interfaces are available.

%package python
Summary: The Python bindings for the GDAL library
Group: 		Sciences/Geosciences
#Requires:
Requires: %{libname} = %{version}
%description python
The Python bindings for the GDAL library

%package -n %{libname}
Summary: Libraries required for the GDAL library
Group: 		Sciences/Geosciences
Provides: lib%{name} = %{version}
Provides: %{libname} = %{version}
%description -n %{libname}
Libraries required for the GDAL library

%package -n %{libname}-devel
Summary: Development files for using the GDAL library
Group: 		Sciences/Geosciences
Requires: %{libname} = %{version}-%{release}
Provides: lib%{name}-devel = %{version}
Provides: %{name}-devel = %{version}
%description -n lib%{name}%{major}-devel
Development files for using the GDAL library

%prep
%setup -q

%build

%configure  \
	--with-libz \
	--with-png \
%if %build_geotiff	
	--with-libtiff \
	--with-geotiff \
%else
	--with-libtiff=internal \
	--with-geotiff=internal \
%endif	
	--with-gif \
	--with-jpeg \
	--with-ogr \
	--with-grass
make

%install
rm -Rf %{buildroot}
mkdir -p $RPM_BUILD_ROOT/%{_prefix}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages
%makeinstall \
INST_PREFIX=%{buildroot}/%{_prefix} \
INST_INCLUDE=%{buildroot}/%{_includedir} \
INST_DATA=%{buildroot}/%{_datadir}/gdal \
INST_LIB=%{buildroot}/%{_libdir} \
INST_BIN=%{buildroot}/%{_bindir} \
INST_PYMOD=%{buildroot}/%{_libdir}/python%{pyver}/site-packages


# Remove headers provided by geotiff:
rm -f $RPM_BUILD_ROOT/%{_includedir}/cpl_csv.h

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_datadir}/gdal/
%{_bindir}/ogr2ogr
%{_bindir}/ogrinfo
%{_bindir}/ogrtindex
%{_bindir}/gdalinfo
%{_bindir}/gdal_translate
%{_bindir}/gdaladdo
%{_bindir}/gdalwarp
%doc NEWS VERSION ChangeLog

%files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_includedir}/*.h
%{_bindir}/gdal-config
# doc html/*

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so

%files python
%defattr(-,root,root)
%{_libdir}/python%{pyver}/site-packages/*
%doc pymod/samples

%changelog
* Thu Aug 07 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.1.9-2mdk
- Fix provides/requires

* Thu Aug 07 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.1.9-1mdk
- 1.1.9 final
- conditionalise geotiff support (internal by default)
- clean up libname use
- check python version (for python-2.3 in cooker pre-9.2)
- Add python docs

* Tue Jun 17 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.1.9-0.cvs030616.1mdk
- 1.1.9 cvs snapshot
- build with geotiff support (requires libgeotiff >- 1.2.0)
- cleanups

* Tue Mar 18 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.1.8-2mdk
- Build with libgrass support

* Fri Feb 21 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.1.8-1mdk
- Fix unpackaged files and buildreqruires
- mklibname-ify
- From Alex Izvorski <izv@dslextreme.com>
  - upgraded to 1.1.8
  - rebuilt makefile patch
  - patched to work with latest libproj in cooker (statically linked for now)

* Fri Aug 16 2002 Buchan Milne <bgmilne@linux-mandrake.com> 1.1.7-2mdk
- Make major 0 for the moment

* Tue May 21 2002 Buchan Milne <bgmilne@cae.co.za>  1.1.7-1mdk
- First stab at a Mandrake RPM