%define bashcompletiondir %{_sysconfdir}/bash_completion.d Name: gdal Version: 3.0.2 Release: 2%{?dist} #define debug_package #{nil} License: MIT Group: Applications/System Summary: GIS file format library URL: http://www.gdal.org Source0: %name-%{version}.tar.gz 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) BuildRequires: %{_bindir}/pkg-config BuildRequires: libpq-devel BuildRequires: proj-devel >= 6.0.2 %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 Obsoletes: gdal < 3 %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. simple service for looking up your IP address. This is the code that powers https://echoip.daniel-steiner.org. %prep %setup -q -n %{name}-%{version} %build ./configure \ --datadir=%{_datadir}/%{name} \ --includedir=%{_includedir}/%{name} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --localstatedir=%{_var} \ --with-curl \ --with-freexl \ --with-geos \ --with-png=%{_prefix} \ --with-gif \ --with-gta \ --with-jpeg \ --without-jpeg12 \ --with-liblzma \ --with-libtiff=%{_prefix} \ --with-libz \ --without-mdb \ --without-msg \ --with-proj \ --with-threads \ --enable-shared make %install export DONT_REMOVE_RPATH=1 make install DESTDIR=%{buildroot} # 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.* %{_datadir}/%{name}/* #TODO: Possibly remove files like .dxf, .dgn, ... %dir %{_libdir}/%{name}plugins %files devel %{_bindir}/%{name}-config %{_includedir}/%{name}/*.h %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/%{name}.pc %changelog * Wed Jan 8 2020 Daniel Steiner - Library path fixed. * Mon Jan 6 2020 Daniel Steiner - Initial build