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) 2012 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 libspatialite package itself (unless the
# license for the libspatialite 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.0.0
Release:        0
License:        MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Summary:        Spatial SQLite
Url:            http://www.gaia-gis.it/spatialite/
Group:          Development/Libraries/C and C++
Source:         %{name}-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  libgeos-devel
BuildRequires:  libproj-devel
BuildRequires:  sqlite-devel >= 3.7.3
BuildRequires:	freexl-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes

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

%package -n %{name}5
Summary:        Spatial SQLite
Group:          Development/Libraries/C and C++

%description -n %{name}5
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++
BuildRequires:  pkg-config
Requires:       %{name}5 = %{version}
Requires:       glibc-devel
Requires:       libgeos-devel
Requires:       libproj-devel 
Requires:	freexl-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} \
           --without-freexl \
%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version}
           --disable-geocallbacks \
%endif
           --disable-static

make %{?_smp_flags}

%install
%makeinstall
rm %{buildroot}/%{_libdir}/*.la

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

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

%clean
rm -rf %{buildroot}

%files -n %{name}5
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*


%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/spatialite.pc

%changelog