LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libspatialite.spec of Package libspatialite (Project Application:Geo)

#
# spec file for package libspatialite
#
# 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/
#


Name:           libspatialite
Version:        4.2.0
Release:        0
Summary:        Spatial SQLite
License:        MPL-1.1
Group:          Development/Libraries/C and C++
Url:            http://www.gaia-gis.it/spatialite/
Source:         http://www.gaia-gis.it/gaia-sins/%{name}-sources/%{name}-%{version}.tar.gz
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  freexl-devel
BuildRequires:  gcc-c++
BuildRequires:  libgeos-devel
BuildRequires:  libproj-devel
BuildRequires:  libxml2-devel
BuildRequires:  pkg-config
BuildRequires:  sqlite-devel >= 3.7.3
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The SpatiaLite extension enables SQLite to support spatial data too [aka
GEOMETRY], in a way conformant to OpenGis specifications.

%package -n %{name}7
Summary:        Spatial SQLite
Group:          System/Libraries

%description -n %{name}7
The SpatiaLite extension enables SQLite to support spatial data too [aka
GEOMETRY], in a way conformant to OpenGis specifications.

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{name}7 = %{version}
Requires:       freexl-devel
Requires:       glibc-devel
Requires:       libgeos-devel
Requires:       libproj-devel
Requires:       zlib-devel

%description devel
This package contains all necessary include files and libraries needed
to compile and develop applications that use libspatialite.

%prep
%setup -q

%build
%if 0%{?centos_version} == 505 || 0%{?rhel_version} == 406 || 0%{?rhel_version} == 505 || 0%{?suse_version} == 1010 || 0%{?suse_version} == 1110
CFLAGS="-std=c99" \
%endif
%configure --with-proj-include=%{_includedir} \
           --with-proj-lib=%{_libdir} \
           --with-geos-include=%{_includedir} \
           --with-geos-lib=%{_libdir} \
	   --enable-libxml2 \
%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version}
           --disable-geocallbacks \
%endif
           --disable-static

make %{?_smp_mflags}
doxygen

%if 0%{?suse_version} > 1210
%check
make check %{?_smp_mflags}
%endif

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print

%fdupes -s %{buildroot}

%post -n %{name}7 -p /sbin/ldconfig

%postun -n %{name}7 -p /sbin/ldconfig

%files -n %{name}7
%defattr(-,root,root,-)
%doc COPYING README README.coverage
%{_libdir}/lib*.so.*
%{_libdir}/mod_spatialite.so.*

%files devel
%defattr(-,root,root,-)
%doc COPYING README README.coverage html
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/mod_spatialite.so
%{_libdir}/pkgconfig/spatialite.pc

%changelog