File liborcus.spec of Package liborcus.3518

#
# spec file for package liborcus
#
# Copyright (c) 2016 SUSE LINUX 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/
#


%define libname liborcus-0_11-0
Name:           liborcus
Version:        0.11.2
Release:        0
Summary:        Spreadsheet file processing library
License:        MIT
Group:          Productivity/Publishing/Word
Url:            https://gitlab.com/orcus/orcus/
Source:         http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz
BuildRequires:  boost-devel
BuildRequires:  coreutils
BuildRequires:  gcc-c++
BuildRequires:  libstdc++-devel
BuildRequires:  pkg-config
BuildRequires:  python-xml
BuildRequires:  pkgconfig(libixion-0.11)
BuildRequires:  pkgconfig(mdds-1.2)
BuildRequires:  pkgconfig(python3)
BuildRequires:  pkgconfig(zlib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package -n %{libname}
Summary:        Spreadsheet file processing library
Group:          System/Libraries
# Same version, soname updated -> same file -> conflict
Conflicts:      liborcus-0_10-0

%description -n %{libname}
Standalone file import filter library for spreadsheet documents. Currently
under development are ODS, XLSX and CSV import filters.

%description
Standalone file import filter library for spreadsheet documents. Currently
under development are ODS, XLSX and CSV import filters.

%package devel
Summary:        Spreadsheet file processing library
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Requires:       pkgconfig(zlib)

%description devel
Standalone file import filter library for spreadsheet documents. Currently
under development are ODS, XLSX and CSV import filters.

%package tools
Summary:        Spreadsheet file processing library
Group:          Productivity/Publishing/Word
Requires:       %{libname} = %{version}

%description tools
Tools to work with various xml streams.

%package python3
Summary:        Python bindings for liborcus
Group:          Productivity/Publishing/Word

%description python3
Python 3 bindings for %{name}.

%prep
%setup -q

%build
%configure \
	--disable-silent-rules \
	--disable-static \
	--disable-debug \
	--disable-werror \
	--docdir=%{_docdir}/%{name}
make %{?_smp_mflags}

%check
make check %{?_smp_mflags}

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

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

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

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

%files tools
%defattr(-,root,root)
%{_bindir}/*

%files python3
%defattr(-,root,root)
%dir %{python3_sitelib}/orcus/
%{python3_sitelib}/orcus/__init__.py
%{python3_sitelib}/orcus/json.py
%{python3_sitearch}/_orcus.so
%{python3_sitearch}/_orcus_json.so

%changelog
openSUSE Build Service is sponsored by