%define name gdal %define ver 1.1.8 %define rel 2mdk %define major 0 %define libname %mklibname %{name} %{major} 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: libtiff-devel BuildRequires: zlib-devel #BuildRequires: libgeotiff-devel BuildRequires: libpng-devel BuildRequires: libungif-devel BuildRequires: postgresql-devel BuildRequires: libjpeg-devel BuildRequires: libproj-devel BuildRequires: libgrass5-devel # doesn't actually require libproj0 because statically linked? #Requires: libproj0 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 lib%{name}%{major} 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 lib%{name}%{major}-devel Summary: Development files for using the GDAL library Group: Sciences/Geosciences Requires: %{libname}-devel = %{version} Provides: lib%{name}-devel = %{version} %description -n lib%{name}%{major}-devel Development files for using the GDAL library %prep %setup -q %patch0 -p1 %patch1 -p1 %build # autoconf CFLAGS="-DPROJ_STATIC"; export CFLAGS CXXFLAGS="-DPROJ_STATIC"; export CXXFLAGS LIBS="-lproj"; export LIBS %configure \ --with-libz=%{_includedir} \ --with-png=%{_includedir} \ --with-geotiff=%{_includedir} \ --with-gif=%{_includedir} \ --with-geotiff=internal \ --with-jpeg=%{_includedir} \ --with-grass # --with-ogr # --with-geotiff=%{_includedir} \ # --with-libtiff=%{_includedir} \ make %install mkdir -p $RPM_BUILD_ROOT/%{_prefix} mkdir -p $RPM_BUILD_ROOT/%{_libdir}/python2.2/site-packages %makeinstall DESTDIR=$RPM_BUILD_ROOT # 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} /sbin/ldconfig %postun -n %{libname} /sbin/ldconfig %files %defattr(-,root,root) %dir /usr/share/gdal/ %{_bindir}/ogr2ogr %{_bindir}/ogrinfo %{_bindir}/ogrtindex %{_bindir}/gdalinfo %{_bindir}/gdal_translate %{_bindir}/gdaladdo %{_bindir}/gdalwarp /usr/share/gdal/* %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}/python2.2/site-packages/* %changelog * 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