Search
SailfishOS Open Build Service
>
Projects
>
home:MartinK
:
sailfish
:
geo
>
libgdal
> libgdal.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File libgdal.spec of Package libgdal
# # spec file for package libgdal # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the gdal package itself (unless the # license for the gdal package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats License: MIT and BSD-3-Clause and SUSE-Public-Domain Group: Development/Libraries/C and C++ Name: libgdal1 Version: 1.10.1 Release: 0 Source0: gdal-%{version}.tar.gz Patch0: gdal-python_install.patch Patch2: gdal-perl.patch Url: http://www.gdal.org/ BuildRequires: autoconf >= 2.52 BuildRequires: automake BuildRequires: chrpath BuildRequires: gcc-c++ BuildRequires: doxygen >= 1.4.2 BuildRequires: libexpat-devel >= 1.95.0 BuildRequires: libgeos-devel >= 3 %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 BuildRequires: libpoppler-devel BuildRequires: python-numpy-devel BuildRequires: texlive-latex %endif BuildRequires: giflib-devel BuildRequires: hdf-devel >= 4.0 %if 0%{?suse_version} >= 1100 BuildRequires: libjasper-devel %endif BuildRequires: libgeotiff-devel >= 1.2.1 BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libstdc++-devel BuildRequires: libtiff-devel >= 3.6.0 BuildRequires: libtool BuildRequires: netcdf-devel %if 0%{?suse_version} >= 1120 BuildRequires: fdupes %endif %if 0%{?sles_version} BuildRequires: blas-devel BuildRequires: lapack-devel %endif BuildRequires: libproj-devel BuildRequires: openjpeg2-devel BuildRequires: libspatialite-devel BuildRequires: mysql-devel BuildRequires: postgresql-devel BuildRequires: python-setuptools BuildRequires: ruby-devel BuildRequires: sqlite-devel >= 3 BuildRequires: swig BuildRequires: unixODBC-devel %if 0%{?sles_version} == 10 || 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version} BuildRequires: curl-devel %else BuildRequires: libcurl-devel %endif BuildRequires: zlib-devel >= 1.1.4 %if 0%{?suse_version} >= 1120 || 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version} Requires: xerces-c BuildRequires: libxerces-c-devel %else Requires: Xerces-c BuildRequires: libXerces-c-devel %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 %py_requires %endif # get path to python_sitearch for opensuse < 1120 %if 0%{?suse_version} < 1120 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %description GDAL is a translator library for raster geospatial data formats that is released under an Open Source license. As a library, it presents a single abstract data model to the calling application for all supported formats. The related OGR library (which lives within the GDAL source tree) provides a similar capability for simple features vector data. %package -n libgdal-devel Summary: GDAL library header files Group: Development/Languages/C and C++ Requires: %{name} = %{version}-%{release} Requires: hdf-devel >= 4.0 Requires: libexpat-devel >= 1.95.0 Requires: libgeos-devel >= 3 %if 0%{?suse_version} >= 1100 Requires: libjasper-devel %endif Requires: libgeotiff-devel >= 1.2.1 Requires: libjpeg-devel Requires: libpng-devel Requires: libstdc++-devel Requires: libtiff-devel Requires: netcdf-devel Requires: openjpeg2-devel Requires: libspatialite-devel Requires: mysql-devel Requires: postgresql-devel Requires: sqlite-devel >= 3 Requires: unixODBC-devel %if 0%{?suse_version} >= 1120 || 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version} Requires: libxerces-c-devel Requires: xerces-c BuildRequires: libxerces-c-devel %else Requires: Xerces-c Requires: libXerces-c-devel BuildRequires: libXerces-c-devel %endif %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 Requires: libopenssl-devel Requires: libpoppler-devel %endif Requires: giflib-devel %if 0%{?sles_version} == 10 || 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version} Requires: curl-devel %else Requires: libcurl-devel %endif %if 0%{?suse_version} > 1230 Requires: libltdl-devel %endif %description -n libgdal-devel Development Libraries for the GDAL file format library %package -n gdal Summary: GDAL static libraries Group: Development/Libraries/C and C++ Requires: %{name} = %{version}-%{release} %description -n gdal GDAL and OGR are translator libraries for raster and vector geospatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats. %package -n perl-gdal Summary: Perl bindings for GDAL Group: Development/Languages/Perl Requires: %{name} = %{version}-%{release} Requires: perl = %{perl_version} Requires: perl-base %if 0%{?centos_version} >= 600 || 0%{?rhel_version} >= 600 || 0%{?scientificlinux_version} >= 600 BuildRequires: perl-ExtUtils-MakeMaker %endif %description -n perl-gdal Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules. %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 %package -n python-gdal Summary: GDAL Python module Group: Development/Languages/Python Requires: %{name} = %{version}-%{release} %description -n python-gdal The GDAL python modules provide support to handle multiple GIS file formats. %endif %prep %setup -q -n gdal-%{version} %patch0 -p1 %patch2 -p1 # need to regenerate (old ones don't support perl 5.10) %if 0%{?sles_version} != 10 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp} %endif %{__rm} -r man %build # $PYTHON_INCLUDES is set only with --with-ogpython, but we have --with-python, # and $PYTHON_INCLUDES is needed to detect numpy properly export PYTHON_INCLUDES=-I%{py_incdir} %{__libtoolize} %{__aclocal} -I m4 %{__autoconf} # disable grass/libgrass here, it is built in separate gdal-grass package # bugfix: see http://old.nabble.com/Strange-build-behaviour-td26741825.html # otherwise "Xerces-C support" (and therefore NAS support) is disabled, # due to incorrect ordering of "-l" in configure for conftest.cpp export SUSE_ASNEEDED=0 %configure \ --prefix=%{_prefix} \ --includedir=%{_includedir}/gdal \ --datadir=%{_datadir}/gdal \ --with-threads \ --disable-static \ --with-geotiff \ --with-libtiff \ --with-rename-internal-libtiff-symbols=yes \ --with-rename-internal-libgeotiff-symbols=yes \ --with-libz \ --with-cfitsio=no \ --with-netcdf \ --with-hdf4 \ --with-openjpeg \ --with-geos \ --with-expat \ %if 0%{?suse_version} >= 1100 --with-jasper \ %endif --with-png \ --with-gif \ --with-jpeg \ --with-odbc \ --with-mysql \ --with-spatialite \ %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 --with-poppler \ --with-python \ %endif --with-curl \ --with-pg \ --with-ogdi \ --with-perl \ --with-xerces=yes \ --with-xerces-lib="-lxerces-c" \ --with-xerces-inc=/usr/include/xercesc \ --without-pcraster \ --with-jpeg12=no \ --without-libgrass \ --without-grass \ --enable-shared # regenerate where needed %{__make} -j1 -C swig/perl generate %{__make} -j1 %{__make} -j1 docs %{__make} -j1 man %install rm -rf %{buildroot} %{__make} -j1 install install-man \ DESTDIR=%{buildroot} INST_MAN=%{_mandir} rm -rf _html cp -a html _html cp -a ogr/html _html/ogr # fix python installation path sed -i 's|setup.py install|setup.py install --prefix=%{_prefix} --root=%{buildroot}|' swig/python/GNUmakefile make DESTDIR=%{buildroot} \ install make DESTDIR=%{buildroot} \ INST_MAN=%{_mandir} \ install-man # cleanup junks rm -rf %{buildroot}%{_includedir}/gdal/gdal rm -rf %{buildroot}%{_bindir}/gdal_sieve.dox rm -rf %{buildroot}%{_bindir}/gdal_fillnodata.dox for junk in {.exists,.cvsignore} ; do find %{buildroot} -name "$junk" -exec rm -rf '{}' \; done # ERROR: RPATH "/usr/src/packages/BUILD/gdal-1.8.0" on ... is not allowed %__chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so %__chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/GDAL.so %__chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/OGR/OGR.so %__chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/OSR/OSR.so chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/GDAL.so chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/OGR/OGR.so chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/OSR/OSR.so rm -f %{buildroot}%{_mandir}/man1/_*_BUILD_gdal* rm -f %{buildroot}/usr/man/man1/*.1.gz #rm -f %{buildroot}/usr/share/man/man1/gdal*.1.gz %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %{_libdir}/*.so.1.* %{_libdir}/*.so.1 %files -n gdal %defattr(644,root,root,755) %doc NEWS PROVENANCE.TXT %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 %attr(755,root,root) %{_bindir}/epsg_tr.py %attr(755,root,root) %{_bindir}/esri2wkt.py %attr(755,root,root) %{_bindir}/gcps2vec.py %attr(755,root,root) %{_bindir}/gcps2wld.py %attr(755,root,root) %{_bindir}/gdal2tiles.py %attr(755,root,root) %{_bindir}/gdal_edit.py %attr(755,root,root) %{_bindir}/gdalmove.py %attr(755,root,root) %{_bindir}/gdal_auth.py %attr(755,root,root) %{_bindir}/gdal2xyz.py %attr(755,root,root) %{_bindir}/gdal_calc.py %attr(755,root,root) %{_bindir}/gdal_fillnodata.py %attr(755,root,root) %{_bindir}/gdal_merge.py %attr(755,root,root) %{_bindir}/gdal_polygonize.py %attr(755,root,root) %{_bindir}/gdal_proximity.py %attr(755,root,root) %{_bindir}/gdal_retile.py %attr(755,root,root) %{_bindir}/gdal_sieve.py %attr(755,root,root) %{_bindir}/gdalchksum.py %attr(755,root,root) %{_bindir}/gdalident.py %attr(755,root,root) %{_bindir}/gdalimport.py %attr(755,root,root) %{_bindir}/mkgraticule.py %attr(755,root,root) %{_bindir}/pct2rgb.py %attr(755,root,root) %{_bindir}/rgb2pct.py %endif %attr(755,root,root) %{_bindir}/gdal_contour %attr(755,root,root) %{_bindir}/gdallocationinfo %attr(755,root,root) %{_bindir}/gdal_grid %attr(755,root,root) %{_bindir}/gdal_rasterize %attr(755,root,root) %{_bindir}/gdal_translate %attr(755,root,root) %{_bindir}/gdaladdo %attr(755,root,root) %{_bindir}/gdalbuildvrt %attr(755,root,root) %{_bindir}/gdaldem %attr(755,root,root) %{_bindir}/gdalenhance %attr(755,root,root) %{_bindir}/gdalinfo %attr(755,root,root) %{_bindir}/gdalmanage %attr(755,root,root) %{_bindir}/gdalsrsinfo %attr(755,root,root) %{_bindir}/gdaltindex %attr(755,root,root) %{_bindir}/gdaltransform %attr(755,root,root) %{_bindir}/gdalwarp %attr(755,root,root) %{_bindir}/gdalserver %attr(755,root,root) %{_bindir}/nearblack %attr(755,root,root) %{_bindir}/ogr2ogr %attr(755,root,root) %{_bindir}/ogrinfo %attr(755,root,root) %{_bindir}/ogrtindex %attr(755,root,root) %{_bindir}/testepsg %{_datadir}/gdal %{_mandir}/man1/gdalmanage.1* %{_mandir}/man1/gdal_edit.1* %{_mandir}/man1/gdal_polygonize.1* %{_mandir}/man1/gdal_proximity.1* %{_mandir}/man1/gdalbuildvrt.1* %{_mandir}/man1/gdalmove.1* %{_mandir}/man1/gdal2tiles.1* %{_mandir}/man1/gdal_contour.1* %{_mandir}/man1/gdal_fillnodata.1* %{_mandir}/man1/gdal_grid.1* %{_mandir}/man1/gdal_merge.1* %{_mandir}/man1/gdal_rasterize.1* %{_mandir}/man1/gdal_retile.1* %{_mandir}/man1/gdal_sieve.1* %{_mandir}/man1/gdal_translate.1* %{_mandir}/man1/gdal_utilities.1* %{_mandir}/man1/gdallocationinfo.1* %{_mandir}/man1/gdaladdo.1* %{_mandir}/man1/gdaldem.1* %{_mandir}/man1/gdalinfo.1* %{_mandir}/man1/gdaltindex.1* %{_mandir}/man1/gdaltransform.1* %{_mandir}/man1/gdalwarp.1* %{_mandir}/man1/nearblack.1* %{_mandir}/man1/ogr2ogr.1* %{_mandir}/man1/ogr_utilities.1* %{_mandir}/man1/ogrinfo.1* %{_mandir}/man1/ogrtindex.1* %{_mandir}/man1/pct2rgb.1* %{_mandir}/man1/rgb2pct.1* %files -n libgdal-devel %defattr(644,root,root,755) %doc _html/* %attr(755,root,root) %{_bindir}/gdal-config %attr(755,root,root) %{_libdir}/libgdal.so %{_libdir}/libgdal.la %dir %{_includedir}/gdal %{_includedir}/gdal/*.h %{_mandir}/man1/gdal-config.1* %{_mandir}/man1/gdalsrsinfo.1.gz %files -n perl-gdal %defattr(644,root,root,755) %{perl_vendorarch}/Geo/GDAL.pm %dir %{perl_vendorarch}/Geo/GDAL %{perl_vendorarch}/Geo/GDAL/Const.pm %{perl_vendorarch}/Geo/OGR.pm %{perl_vendorarch}/Geo/OSR.pm %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 %attr(755,root,root) %{_bindir}/*.dox %endif #%{perl_vendorarch}/Geo/check_dox.pl %dir %{perl_vendorarch}/Geo %dir %{perl_vendorarch}/auto/Geo %dir %{perl_vendorarch}/auto/Geo/GDAL %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so %dir %{perl_vendorarch}/auto/Geo/GDAL/Const %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs %attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so %dir %{perl_vendorarch}/auto/Geo/OGR %{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so %dir %{perl_vendorarch}/auto/Geo/OSR %{perl_vendorarch}/auto/Geo/OSR/OSR.bs %{perl_vendorarch}/auto/Geo/OGR/OGR.bs %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so %exclude %{perl_archlib}/perllocal.pod #%exclude %{perl_vendorarch}/Geo/*.dox #%exclude %{perl_vendorarch}/Geo/GDAL/*.dox %exclude %{perl_vendorarch}/auto/Geo/*/.packlist %exclude %{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist %if 0%{?centos_version}0%{?rhel_version}0%{?scientificlinux_version} == 0 %files -n python-gdal %defattr(644,root,root,755) %{python_sitearch}/gdal.py* %{python_sitearch}/gdalconst.py* %{python_sitearch}/gdalnumeric.py* %{python_sitearch}/ogr.py* %{python_sitearch}/osr.py* %{python_sitearch}/GDAL-*.egg-info %dir %{python_sitearch}/osgeo %attr(755,root,root) %{python_sitearch}/osgeo/_gdal.so %attr(755,root,root) %{python_sitearch}/osgeo/_gdal_array.so %attr(755,root,root) %{python_sitearch}/osgeo/_gdalconst.so %attr(755,root,root) %{python_sitearch}/osgeo/_ogr.so %attr(755,root,root) %{python_sitearch}/osgeo/_osr.so %{python_sitearch}/osgeo/*.py* %endif %changelog