2020-01-06 16:44:27 +01:00
|
|
|
%define bashcompletiondir %{_sysconfdir}/bash_completion.d
|
2020-01-11 08:15:44 +01:00
|
|
|
%define realname gdal
|
2020-01-11 10:27:37 +01:00
|
|
|
%define sysprefix /usr
|
2020-01-11 10:29:56 +01:00
|
|
|
# Prefix is /usr/local!
|
2020-01-11 10:27:37 +01:00
|
|
|
%define _prefix /usr/local
|
|
|
|
|
%define _includedir %{_prefix}/include
|
|
|
|
|
%define _datadir %{_prefix}/share
|
|
|
|
|
%define _bindir %{_prefix}/bin
|
2020-01-12 08:53:28 +01:00
|
|
|
%define _libdir %{_prefix}/lib
|
2020-01-11 10:27:37 +01:00
|
|
|
%define _mandir %{_prefix}/man
|
2020-01-06 16:44:27 +01:00
|
|
|
|
2020-01-11 08:15:44 +01:00
|
|
|
Name: gdal3
|
2020-01-06 16:44:27 +01:00
|
|
|
Version: 3.0.2
|
2020-01-12 08:53:28 +01:00
|
|
|
Release: 2%{?dist}
|
2020-01-06 16:44:27 +01:00
|
|
|
#define debug_package #{nil}
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: Applications/System
|
|
|
|
|
Summary: GIS file format library
|
|
|
|
|
URL: http://www.gdal.org
|
2020-01-11 08:15:44 +01:00
|
|
|
Source0: %realname-%{version}.tar.gz
|
2020-01-06 16:44:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: freexl-devel
|
|
|
|
|
BuildRequires: bash-completion
|
|
|
|
|
BuildRequires: libzstd-devel
|
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
|
BuildRequires: libtiff-devel
|
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
|
BuildRequires: perl-devel
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: openjpeg2-devel
|
|
|
|
|
BuildRequires: openjpeg-devel
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
2020-01-11 10:27:37 +01:00
|
|
|
BuildRequires: %{sysprefix}/bin/pkg-config
|
2020-01-06 16:44:27 +01:00
|
|
|
BuildRequires: libpq-devel
|
2020-01-11 10:27:37 +01:00
|
|
|
BuildRequires: proj6-devel >= 6.0.2
|
2020-01-06 16:44:27 +01:00
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-numpy
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-numpy
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: sqlite-devel
|
|
|
|
|
BuildRequires: swig
|
2020-01-12 08:53:28 +01:00
|
|
|
BuildRequires: /usr/bin/pathfix.py
|
2020-01-09 23:29:11 +01:00
|
|
|
|
2020-01-06 16:44:27 +01:00
|
|
|
%global DONT_REMOVE_RPATH 1
|
|
|
|
|
# don't check for rpath:
|
|
|
|
|
%global __arch_install_post /usr/lib/rpm/check-buildroot
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Geospatial Data Abstraction Library (GDAL/OGR) is a cross platform
|
|
|
|
|
C++ translator library 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. It also comes with a variety of
|
|
|
|
|
useful commandline utilities for data translation and processing.
|
|
|
|
|
|
|
|
|
|
It provides the primary data access engine for many applications.
|
|
|
|
|
GDAL/OGR is the most widely used geospatial data access library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for the GDAL file format library
|
|
|
|
|
|
|
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains development files for GDAL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package libs
|
|
|
|
|
Summary: GDAL file format library
|
|
|
|
|
|
|
|
|
|
%description libs
|
|
|
|
|
This package contains the GDAL file format library.
|
|
|
|
|
|
2020-01-12 08:53:28 +01:00
|
|
|
|
|
|
|
|
%package python-tools
|
|
|
|
|
Summary: GDAL python files
|
|
|
|
|
|
|
|
|
|
%description python-tools
|
|
|
|
|
This package contains the GDAL python files
|
|
|
|
|
|
2020-01-06 16:44:27 +01:00
|
|
|
|
|
|
|
|
%prep
|
2020-01-11 08:15:44 +01:00
|
|
|
%setup -q -n %{realname}-%{version}
|
2020-01-06 16:44:27 +01:00
|
|
|
|
2020-01-12 08:53:28 +01:00
|
|
|
%if 0%{?fedora} > 31
|
|
|
|
|
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \
|
|
|
|
|
%else
|
|
|
|
|
pathfix.py -pni "%{__python2} %{py2_shbang_opts}" \
|
|
|
|
|
%endif
|
|
|
|
|
swig/python/scripts/epsg_tr.py \
|
|
|
|
|
swig/python/scripts/gdal2tiles.py \
|
|
|
|
|
swig/python/scripts/gdalchksum.py \
|
|
|
|
|
swig/python/scripts/gdalident.py \
|
|
|
|
|
swig/python/scripts/gdal_pansharpen.py \
|
|
|
|
|
swig/python/scripts/gdal_sieve.py \
|
|
|
|
|
swig/python/scripts/rgb2pct.py \
|
|
|
|
|
swig/python/scripts/esri2wkt.py \
|
|
|
|
|
swig/python/scripts/gdal2xyz.py \
|
|
|
|
|
swig/python/scripts/gdalcompare.py \
|
|
|
|
|
swig/python/scripts/gdalimport.py \
|
|
|
|
|
swig/python/scripts/gdal_polygonize.py \
|
|
|
|
|
swig/python/scripts/mkgraticule.py \
|
|
|
|
|
swig/python/scripts/gcps2vec.py \
|
|
|
|
|
swig/python/scripts/gdal_auth.py \
|
|
|
|
|
swig/python/scripts/gdal_edit.py \
|
|
|
|
|
swig/python/scripts/gdal_merge.py \
|
|
|
|
|
swig/python/scripts/gdal_proximity.py \
|
|
|
|
|
swig/python/scripts/ogrmerge.py \
|
|
|
|
|
swig/python/scripts/gcps2wld.py \
|
|
|
|
|
swig/python/scripts/gdal_calc.py \
|
|
|
|
|
swig/python/scripts/gdal_fillnodata.py \
|
|
|
|
|
swig/python/scripts/gdalmove.py \
|
|
|
|
|
swig/python/scripts/gdal_retile.py \
|
|
|
|
|
swig/python/scripts/pct2rgb.py
|
|
|
|
|
|
2020-01-06 16:44:27 +01:00
|
|
|
%build
|
2020-01-12 08:53:28 +01:00
|
|
|
./configure --with-python
|
|
|
|
|
#./configure \
|
|
|
|
|
#--datadir=%{_datadir}/%{realname} \
|
|
|
|
|
#--includedir=%{_includedir}/%{realname} \
|
|
|
|
|
#--prefix=%{_prefix} \
|
|
|
|
|
#--libdir=%{_libdir} \
|
|
|
|
|
#--sysconfdir=%{_sysconfdir} \
|
|
|
|
|
#--localstatedir=%{_var} \
|
|
|
|
|
#--with-curl \
|
|
|
|
|
#--with-freexl \
|
|
|
|
|
#--with-geos \
|
|
|
|
|
#--with-png=%{sysprefix} \
|
|
|
|
|
#--with-gif \
|
|
|
|
|
#--with-gta \
|
|
|
|
|
#--with-jpeg \
|
|
|
|
|
#--without-jpeg12 \
|
|
|
|
|
#--with-liblzma \
|
|
|
|
|
#--with-libtiff=%{sysprefix} \
|
|
|
|
|
#--with-libz \
|
|
|
|
|
#--without-mdb \
|
|
|
|
|
#--without-msg \
|
|
|
|
|
#--with-proj=%{_prefix} \
|
|
|
|
|
#--with-python \
|
|
|
|
|
#--with-threads \
|
|
|
|
|
#--enable-shared
|
2020-01-09 23:29:11 +01:00
|
|
|
|
2020-01-06 16:44:27 +01:00
|
|
|
make
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
export DONT_REMOVE_RPATH=1
|
2020-01-09 23:29:11 +01:00
|
|
|
make install DESTDIR=%{buildroot}
|
2020-01-06 16:44:27 +01:00
|
|
|
# move bashcompletion file to proper directory:
|
|
|
|
|
mv %{buildroot}%{_prefix}/etc %{buildroot}/
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
|
|
|
|
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc MIGRATION_GUIDE.TXT PROVENANCE.TXT
|
|
|
|
|
%config %{bashcompletiondir}/*
|
|
|
|
|
%{_bindir}/gdallocationinfo
|
|
|
|
|
%{_bindir}/gdal_contour
|
|
|
|
|
%{_bindir}/gdal_rasterize
|
|
|
|
|
%{_bindir}/gdal_translate
|
|
|
|
|
%{_bindir}/gdaladdo
|
|
|
|
|
%{_bindir}/gdalinfo
|
|
|
|
|
%{_bindir}/gdaldem
|
|
|
|
|
%{_bindir}/gdalbuildvrt
|
|
|
|
|
%{_bindir}/gdaltindex
|
|
|
|
|
%{_bindir}/gdalwarp
|
|
|
|
|
%{_bindir}/gdal_grid
|
|
|
|
|
%{_bindir}/gdalenhance
|
|
|
|
|
%{_bindir}/gdalmanage
|
|
|
|
|
%{_bindir}/gdalserver
|
|
|
|
|
%{_bindir}/gdalsrsinfo
|
|
|
|
|
%{_bindir}/gdaltransform
|
|
|
|
|
%{_bindir}/nearblack
|
|
|
|
|
%{_bindir}/ogr*
|
|
|
|
|
%{_bindir}/testepsg
|
|
|
|
|
%{_bindir}/gnmanalyse
|
|
|
|
|
%{_bindir}/gnmmanage
|
|
|
|
|
|
|
|
|
|
%files libs
|
|
|
|
|
%doc LICENSE.TXT NEWS PROVENANCE.TXT COMMITTERS
|
|
|
|
|
%{_libdir}/libgdal.so.26
|
|
|
|
|
%{_libdir}/libgdal.so.26.*
|
2020-01-11 10:27:37 +01:00
|
|
|
%{_datadir}/%{realname}/*
|
2020-01-06 16:44:27 +01:00
|
|
|
#TODO: Possibly remove files like .dxf, .dgn, ...
|
2020-01-11 08:15:44 +01:00
|
|
|
%dir %{_libdir}/%{realname}plugins
|
2020-01-06 16:44:27 +01:00
|
|
|
|
|
|
|
|
%files devel
|
2020-01-11 10:27:37 +01:00
|
|
|
%{_bindir}/%{realname}-config
|
2020-01-12 08:53:28 +01:00
|
|
|
%{_includedir}/*.h
|
2020-01-06 16:44:27 +01:00
|
|
|
%{_libdir}/*.a
|
|
|
|
|
%{_libdir}/*.la
|
|
|
|
|
%{_libdir}/*.so
|
2020-01-11 08:15:44 +01:00
|
|
|
%{_libdir}/pkgconfig/%{realname}.pc
|
2020-01-06 16:44:27 +01:00
|
|
|
|
2020-01-12 08:53:28 +01:00
|
|
|
%files python-tools
|
|
|
|
|
%{_bindir}/*.py
|
|
|
|
|
%{_libdir}64/python*/site-packages/*
|
|
|
|
|
|
2020-01-06 16:44:27 +01:00
|
|
|
%changelog
|
2020-01-12 08:53:28 +01:00
|
|
|
* Sat Jan 11 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
|
|
|
|
- Python scripts added
|
|
|
|
|
|
2020-01-09 23:29:11 +01:00
|
|
|
* Wed Jan 8 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
|
|
|
|
- Library path fixed.
|
|
|
|
|
|
2020-01-06 16:44:27 +01:00
|
|
|
* Mon Jan 6 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
|
|
|
|
- Initial build
|
|
|
|
|
|