A new user interface for you! Read more...

File mingw32-gdal.spec of Package mingw32-gdal

#
# spec file for package mingw32-gdal
#
# Copyright (c) 2015 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 pristine package itself (unless the
# license for the pristine 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/
#


%define _basename gdal
Name:           mingw32-%{_basename}
Version:        2.2.1
Release:        0
#!BuildIgnore: post-build-checks
Summary:        GDAL/OGR - a translator library for raster and vector geospatial data formats
License:        MIT and BSD-3-Clause and SUSE-Public-Domain
Group:          Applications/GIS
Url:            http://gdal.org/
Source:         http://download.osgeo.org/gdal/%{version}/gdal-%{version}.tar.gz
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-filesystem
BuildRequires:  mingw32-libgeos
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%_mingw32_package_header_debug
BuildArch:      noarch

%description
GDAL is a translator library for raster and vector geospatial data formats
that is released under an X/MIT style Open Source license by the Open Source
Geospatial Foundation.

This is a MinGW32 cross compilation for Windows, and contains a fairly minimal
set of drivers. More can be added if the dependencies are available.

%package devel
Summary:        Development files for GDAL
Group:          Development/Languages/C and C++
Requires:       %name = %version
Provides:       mingw32-libdal-devel = %{version}

%description devel
GDAL is a translator library for raster and vector geospatial data formats
that is released under an X/MIT style Open Source license by the Open Source
Geospatial Foundation.

This is a MinGW32 cross compilation for Windows, and contains a fairly minimal
set of drivers. More can be added if the dependencies are available.

%_mingw32_debug_package

%prep
%setup -q -n gdal-%{version}

%build
# following instructions from http://www.bostongis.com/blog/index.php?/archives/237-Building-GDAL-under-mingw-w64-with-native-windows-ODBC-support.html
%{_mingw32_configure} --with-geos=/usr/i686-w64-mingw32/sys-root/mingw/bin/i686-w64-mingw32-geos-config --with-odbc=/mingw/i686-w64-mingw32
%{_mingw32_make} %{?_smp_mflags} V=1

%install
%{_mingw32_make} DESTDIR=%{buildroot} install

%files
%defattr(-,root,root,-)
%{_mingw32_bindir}/libgdal-20.dll
%{_mingw32_bindir}
%{_mingw32_libdir}
%{_mingw32_includedir}
%{_mingw32_bindir}/../share

%files devel
%defattr(-,root,root,-)

%changelog