File libgdal-grass.spec of Package libgdal-grass

# spec file for package libgdal-grass
# Copyright (c) 2014 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 libgdal-grass package itself (unless the
# license for the libgdal-grass 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

Summary:       GDAL and OGR support for GRASS GIS
Name:          libgdal-grass
Version:       1.11.0
Release:       1
Group:         Applications/GIS
Source0:       gdal-grass-%{version}.tar.gz
License:       MIT license; License by Frank Warmerdam
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++     
BuildRequires: libproj-devel
BuildRequires: zlib-devel
BuildRequires: libgdal-devel
BuildRequires: grass-devel
BuildRequires: geos-devel
BuildRequires: gdal
BuildRequires: python-wxWidgets
BuildRequires: -post-build-checks
Requires:      zlib grass 
Requires:      libgdal1 >= 1.11.0

GDAL and OGR support for GRASS GIS

# datadir and plugindir is hardcoded, needs to be fixed
%define plugindir /usr/lib/gdalplugins
%define datadir /usr/local/share/gdal_grass

%setup -n gdal-grass-%{version}
./configure \
 --enable-shared \
 --prefix=%{_prefix} \
 --with-grass=/opt/grass \
 --with-gdal=%{_bindir}/gdal-config \
 --with-autoload=%{plugindir} \


mkdir -p %{buildroot}%{plugindir}
mkdir -p %{buildroot}%{datadir}

make \
AUTOLOAD_DIR=%{buildroot}%{plugindir} \
GRASSTABLES_DIR=%{buildroot}%{datadir} \

mkdir -p %{buildroot}/etc/
echo %{plugindir} > %{buildroot}/etc/{version}.conf


rm -f /etc/{version}.conf

rm -rf %{buildroot}

%dir %{datadir}

openSUSE Build Service is sponsored by