Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > caf8dd3eb588b54e3a8a983d2e62a3ac > files > 4

gdal-1.6.0-4mdv2009.0.src.rpm

%define _requires_exceptions devel\(libogdi31.*\)\\|devel\(libcfitsio.*\)\\|libgrass

%define major 1
%define libname %mklibname %{name} %{major}
%define libnamedev %mklibname %{name} -d
%define libnamedevstat %mklibname %{name} -d -s

# Build gdal against libgrass. It is better to instead compile the new plugin
# which builds against grass itself (and thus has more features than the
# libgrass5 version)
# In fact, building with direct grass support will break gdal on every grass
# upgrade, see http://n2.nabble.com/qgis-%2B-grass-plugin-%3D-gdal-problem-tp2394932p2405146.html
%define build_libgrass 0
%{?with_libgrass: %define build_libgrass 1}

Name: gdal
Version: 1.6.0
Release: %mkrel 4
Summary: The Geospatial Data Abstraction Library (GDAL)
Group: Sciences/Geosciences
License: MIT
URL: http://www.gdal.org/
Source: ftp://ftp.remotesensing.org/pub/gdal/%{name}-%{version}.tar.gz
Patch2: gdal-1.6.0-fix-str-fmt.patch
Patch3: gdal-1.6.0-fix-libname.patch
Requires:	grass >= 6.4.0
BuildRequires:	libpng-devel
BuildRequires:	zlib-devel
BuildRequires:	geotiff-devel >= 1.2.0
BuildRequires:	libpng-devel
BuildRequires:	libungif-devel
BuildRequires:	postgresql-devel
BuildRequires:	libjpeg-devel
BuildRequires:	proj-devel >= 4.4.7
BuildRequires:  doxygen
%if %{build_libgrass}
BuildRequires:	grass
%else
BuildConflicts:	%mklibname -d grass 5 0
%endif
BuildRequires:	libjasper-devel
BuildRequires:	libgeos-devel >= 2.2.3
BuildRequires:	netcdf-devel >= 3.6.2
BuildRequires:	ogdi-devel
BuildRequires:	cfitsio-devel
BuildRequires:	python-numpy-devel
BuildRequires:	sqlite3-devel
#BuildRequires:	mysql-devel
BuildRequires:	libdap-devel
BuildRequires:	librx-devel
BuildRequires:	unixODBC-devel
BuildRequires:	xerces-c-devel
BuildRequires:	swig
BuildRoot: 	%{_tmppath}/%{name}-%{version}-root

%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: %{libname} = %{version}
%py_requires -d

%description python
The Python bindings for the GDAL library

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

%description -n %{libname}
Libraries required for the GDAL library

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

%description -n %{libnamedev}
Development files for using the GDAL library

%package -n %{libnamedevstat}
Summary: Development files for using the GDAL library
Group: Development/C
Requires: %{libnamedev} = %{version}-%{release}

%description -n %{libnamedevstat}
Development files for using the GDAL library

%prep
%setup -q
%patch2 -p0 -b .str
%patch3 -p0 -b .libname

%build
export CPPFLAGS="${CPPFLAGS} $(dap-config --cflags) -I%{_includedir}/netcdf-3 -I%{_includedir}/libgeotiff"

%configure2_5x \
	--datadir=%_datadir/gdal \
	--includedir=%_includedir/gdal \
        --with-dods-root=%_prefix \
        --with-ogdi=%_prefix \
        --with-cfitsio=%_prefix \
        --with-geotiff=yes   \
        --with-libtiff=yes   \
        --with-libz=%_prefix      \
        --with-netcdf             \
        --without-hdf5               \
        --with-geos               \
        --with-jasper             \
        --with-png                \
        --with-gif                \
        --with-jpeg               \
        --with-odbc               \
        --with-sqlite             \
        --with-mysql              \
        --with-curl               \
        --with-python             \
        --with-xerces             \
        --with-xerces-lib='-lxerces-c' \
        --with-xerces-inc=%_includedir \
        --without-pcraster        \
        %if %{build_libgrass}
    	    --with-grass=%_libdir/grass64     \
        %endif
        --with-threads
        
perl -pi -e 's/PY_HAVE_SETUPTOOLS=1/PY_HAVE_SETUPTOOLS=0/g' GDALmake.opt
make
make docs

%install
rm -Rf %buildroot
mkdir -p %{buildroot}/%python_sitelib
export PYTHONPATH="%{buildroot}/%python_sitelib"
export INST_MAN=%{_mandir}
%makeinstall_std install-man
perl -pi -e 's,%{_prefix}/lib/,%{_libdir}/,g' %{buildroot}/%{_libdir}/libgdal.la

%multiarch_binaries %{buildroot}%{_bindir}/gdal-config


%clean
rm -rf %buildroot

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif
%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files
%defattr(-,root,root)
%{_datadir}/gdal/
%{_bindir}/*
%exclude %{_bindir}/gdal-config
%{_mandir}/man1/*.1.*
%exclude %{_mandir}/man1/gdal-config.1.*
%doc NEWS VERSION

%files -n %{libnamedev}
%defattr(-,root,root)
%{_bindir}/%{name}-config
%{_mandir}/man1/gdal-config.1.*
%{_libdir}/*.so
%{_includedir}/*
%_docdir/*
%multiarch %{multiarch_bindir}/gdal-config

%files -n %{libnamedevstat}
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.la

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

%files python
%defattr(-,root,root,-)
%py_platsitedir/*


%changelog
* Fri May 22 2009 Funda Wang <fundawang@mandriva.org> 1.6.0-4mdv2010.0
+ Revision: 378669
- fix libproj.so libname

  + Buchan Milne <bgmilne@mandriva.org>
    - Provide link to mail explaining why gdal should not be built directly against grass

* Thu Mar 05 2009 Funda Wang <fundawang@mandriva.org> 1.6.0-3mdv2009.1
+ Revision: 348959
- do not build with grass

* Fri Jan 30 2009 Funda Wang <fundawang@mandriva.org> 1.6.0-2mdv2009.1
+ Revision: 335594
- move requires to python sub package

* Thu Jan 29 2009 Funda Wang <fundawang@mandriva.org> 1.6.0-1mdv2009.1
+ Revision: 335217
- build with grass
- disable broken mysql build
- fix BR
- gcc 42 is no needed
- fix file list
- New version 1.6.0
- rebuild

  + Oden Eriksson <oeriksson@mandriva.com>
    - rebuilt against mysql-5.1.30 libs

  + Olivier Blin <oblin@mandriva.com>
    - move libtool sed in prep

* Thu Nov 06 2008 Olivier Blin <oblin@mandriva.com> 1.5.2-3mdv2009.1
+ Revision: 300276
- bump release (to be consistent with 2009.0 media)

* Mon Oct 13 2008 Helio Chissini de Castro <helio@mandriva.com> 1.5.2-2mdv2009.1
+ Revision: 293254
- Disable hdf, since 2009.0 was released against a different API than the
  current released hda and simply devel packages fail to install. Should be
  reenabled after when hdf is recompiling again
- libdap uses their namespace now. Added a patch to fix compilation

* Sat Aug 16 2008 Buchan Milne <bgmilne@mandriva.org> 1.5.2-2mdv2009.0
+ Revision: 272605
- Revert conflicts that were committed in r272040
- Rebuild for cfitsio library version change

  + Emmanuel Andry <eandry@mandriva.org>
    - protect major
    - move .la file into static

* Sat Jun 21 2008 Buchan Milne <bgmilne@mandriva.org> 1.5.2-1mdv2009.0
+ Revision: 227710
- New version 1.5.2

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Oden Eriksson <oeriksson@mandriva.com>
    - 1.5.1
    - sync with fedora

* Fri Feb 08 2008 Helio Chissini de Castro <helio@mandriva.com> 1.5.0-4mdv2008.1
+ Revision: 164282
- Play nice with excludes in both archs

* Fri Feb 08 2008 Helio Chissini de Castro <helio@mandriva.com> 1.5.0-3mdv2008.1
+ Revision: 164186
- Major cleanup on gdal. now build finely in both i586 and x86_64, even with python.
- Splitted devel and devel-static

  + Emmanuel Andry <eandry@mandriva.org>
    - New version
    - spec refactoring (inspired from fedora)

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Wed Sep 05 2007 Buchan Milne <bgmilne@mandriva.org> 1.4.2-1mdv2008.0
+ Revision: 80453
- New version 1.4.2

* Mon May 07 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 1.4.1-1mdv2008.0
+ Revision: 24873
- Updated to 1.4.1.
- Updated URL tag.
- Keep identation uniform in some places.


* Sun Jan 14 2007 Emmanuel Andry <eandry@mandriva.org> 1.4.0-1mdv2007.0
+ Revision: 108693
- New version 1.4.0

* Sun Nov 12 2006 Buchan Milne <bgmilne@mandriva.org> 1.3.2-6mdv2007.0
+ Revision: 83285
- Include changes from Franck Martin <franck@sopac.org>:
- added support for mysql

* Fri Sep 01 2006 Buchan Milne <bgmilne@mandriva.org> 1.3.2-5mdv2007.0
+ Revision: 59043
- bump release
- Ensure paths in libtool file are correct on x86_64 (fixes linking to gdal with libtool)
  Conflict with libgrass5-devel when building without obsolete libgrass

* Wed Aug 30 2006 Buchan Milne <bgmilne@mandriva.org> 1.3.2-4mdv2007.0
+ Revision: 58743
- force -fPIC to fix linking to gdal in x86_64
- filter bad ogdi require

* Thu Aug 24 2006 Buchan Milne <bgmilne@mandriva.org> 1.3.2-2mdv2007.0
+ Revision: 57696
- Merge changes that were lost when the SRPM was lost, but binaries were
  accepted making re-uploading the SRPM difficult, followed by an NMU into svn:
- dont buildrequire grass, we will add the plugin package
- dont try and ship python modules on x86_64 for now

* Sat Aug 05 2006 Helio Chissini de Castro <helio@mandriva.com> 1.3.2-1mdv2007.0
+ Revision: 51716
- New upstream version 1.3.2
- import gdal-1.2.6-4mdk

* Tue Jan 03 2006 Oden Eriksson <oeriksson@mandriva.com> 1.2.6-4mdk
- added one gcc4 patch by debian (P0)
- fix deps
- added one lib64 fix

* Fri Jun 03 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.2.6-3mdk
- Fix Description

* Fri Jun 03 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.2.6-2mdk
- Rebuild for missing source rpm

* Wed May 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.2.6-1mdk
- 1.2.6

* Wed May 04 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.2.5-3mdk
- Rebuild
- Fix MultiArch

* Sun Dec 05 2004 Michael Scherer <misc@mandrake.org> 1.2.5-2mdk
- Rebuild for new python

* Tue Nov 23 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.2.5-1mdk
- 1.2.5

* Tue Sep 21 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.2.2-1mdk
- 1.2.2

* Sat Jun 26 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.2.1-1mdk
- 1.2.1

* Mon Jun 21 2004 Buchan Milne <bgmilne@linux-mandrake.com> 1.2.0-1mdk
- 1.2.0, drop p2
- build with ogdi,cfitsio,netcdf support
- correct major since lib naming issues are resolved