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 http://bugs.opensuse.org/
#
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
URL: http://www.gdal.org/
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
%description
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
%prep
%setup -n gdal-grass-%{version}
./configure \
--enable-shared \
--prefix=%{_prefix} \
--with-grass=/opt/grass \
--with-gdal=%{_bindir}/gdal-config \
--with-autoload=%{plugindir} \
--libdir=%{_libdir}
%build
make
%install
mkdir -p %{buildroot}%{plugindir}
mkdir -p %{buildroot}%{datadir}
make \
AUTOLOAD_DIR=%{buildroot}%{plugindir} \
GRASSTABLES_DIR=%{buildroot}%{datadir} \
install
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo %{plugindir} > %{buildroot}/etc/ld.so.conf.d/libgdal-%{version}.conf
%post
/sbin/ldconfig
%postun
rm -f /etc/ld.so.conf.d/libgdal-%{version}.conf
/sbin/ldconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{datadir}/*
%defattr(0644,root,root)
%{plugindir}/gdal_GRASS.so
%{plugindir}/ogr_GRASS.so
/etc/ld.so.conf.d/*
%defattr(0755,root,root)
%dir %{datadir}
%changelog