Blob Blame History Raw
# This package requires libspatialite 4.2 and solves the tasks librasterlite
# and gaiagraphics solved in the past. It is not a drop-in replacement for either.
Name:      librasterlite2
Version:   1.0.0
Release:   3.rc0%{?dist}.3
Summary:   Stores and retrieves huge raster coverages using a SpatiaLite DBMS
Group:     System Environment/Libraries
License:   MPLv1.1 or GPLv2+ or LGPLv2+
URL:       https://www.gaia-gis.it/fossil/librasterlite2
Source0:   http://www.gaia-gis.it/gaia-sins/%{name}-sources/%{name}-%{version}-rc0.tar.gz

BuildRequires: cairo-devel
BuildRequires: giflib-devel
BuildRequires: libcurl-devel
BuildRequires: libgeotiff-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libspatialite-devel
BuildRequires: libwebp-devel
BuildRequires: libxml2-devel
BuildRequires: proj-devel
BuildRequires: sqlite-devel
BuildRequires: xz-devel
BuildRequires: zlib-devel

%description
librasterlite2 is a library that stores and retrieves huge raster coverages
using a SpatiaLite DBMS.

%package devel
Summary:  Development libraries and headers for %{name}
Group:    Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
This package contains libraries and header files for
developing applications that use %{name}.

%package tools
Summary:  Tools for %{name}
Group:    Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License:  GPLv3+

%description tools
The %{name}-tools package contains l2tool and rwmslite.
rl2tool is a CLI tool to create and manage rasterlite2 coverages.
wmslite is a simple WMS server (Web Map Service) based on librasterlite2.


%prep
%setup -q -n %{name}-%{version}-rc0


%build
# Let the author know on the mailing list
# This issue should be sorted out for releases after 1.0.0.rc0
export LDFLAGS="-lpthread"

# Link tools to sqlite3
# https://groups.google.com/forum/#!topic/spatialite-users/BGKWBxCO0DY
sed -i 's/lrasterlite2/lrasterlite2 -lsqlite3/' tools/Makefile.in

%configure \
    --disable-static

make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}

# Delete undesired libtool archives
rm -f %{buildroot}/%{_libdir}/%{name}.la
rm -f %{buildroot}/%{_libdir}/mod_rasterlite2.la

# Delete soname symlink for the sqlite extension
rm -f %{buildroot}/%{_libdir}/mod_rasterlite2.so.*


%check
# test_svg fails on at least i386
# Some tests are online tests and may fail as well, depending on availability
# Additional tests are failing on ARM; Let the author know on the mailing list
make check || true


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files 
%doc COPYING AUTHORS
%{_libdir}/%{name}.so.*
# The symlink must be present to allow loading the extension
# https://groups.google.com/forum/#!topic/spatialite-users/zkGP-gPByXk
%{_libdir}/mod_rasterlite2.so

%files devel
%doc examples/*.c
%{_includedir}/rasterlite2
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/rasterlite2.pc

%files tools
%{_bindir}/rl2tool
%{_bindir}/wmslite

#TODO: Make the release at least 4 on the final release, to fix the versioning mistake I made.
%changelog
* Mon Dec 28 2015 Volker Froehlich <volker27@gmx.at> - 1.0.0-3.rc0.3
- rebuilt

* Mon Dec 28 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0.0-3.rc0.2
- Rebuilt for libwebp soname bump

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-3.rc0.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Mar 11 2015 Devrim Gündüz <devrim@gunduz.org> - 1.0.0-3.rc0
- Rebuild for Proj 4.9.1

* Mon Aug 25 2014 Devrim Gündüz <devrim@gunduz.org> - 1.0.0-2.rc0
- Rebuilt for libgeotiff
- Add dependency for proj-devel

* Fri Aug  8 2014 Volker Fröhlich <volker27@gmx.at> - 1.0.0-1.rc0
- Remove pkgconfig requirement on the devel sub-package
- Delete soname symlink for the sqlite extension

* Wed Jun 11 2014 Volker Fröhlich <volker27@gmx.at> - 1.0.0-0.rc0
- Initial package for Fedora