Name:          libspatialite
Version:       4.3.0a
Release:       10
Summary:       Library intended to extend thee SQLite core
License:       MPLv1.1 or GPLv2+ or LGPLv2+
URL:           https://www.gaia-gis.it/fossil/libspatialite
Source0:       http://www.gaia-gis.it/gaia-sins/%{name}-sources/%{name}-%{version}.tar.gz

BuildRequires: gcc freexl-devel geos-devel proj-devel sqlite-devel zlib-devel libxml2-devel

%description
SpatiaLite is an open source library inteded to extend the SQLite core to
support fully fledged Spatial SQL capabilities.

%package devel
Summary:       Development tools for SpatiaLite
Requires:      %{name} = %{version}-%{release}
Requires:      pkgconfig

%description devel
Library files and header files for SpatiaLite development.

%prep
%setup -q

%build
%configure \
    --disable-lwgeom

%make_build

%install
%make_install
%delete_la

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%doc COPYING AUTHORS
%{_libdir}/%{name}.so.7*
%{_libdir}/mod_spatialite.so.7*
%{_libdir}/mod_spatialite.so

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

%changelog
* Tue Mar 10 2020 tangjing <tangjing30@huawei.com> - 4.3.0a-10
- Package init