File libxlsxwriter.spec of Package libxlsxwriter
#
# spec file for package libxlsxwriter
#
# Copyright (c) 2021 SUSE LLC
#
# 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 libxlsxwriter5
Name: libxlsxwriter
Version: 1.1.5
Release: 0
Summary: C library for creating Excel XLSX files
License: BSD-2-Clause
Url: https://libxlsxwriter.github.io
Source: %{name}-RELEASE_%{version}.tar.gz
Patch1: allow-newer-zlib.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(minizip)
%description
Libxlsxwriter is a C library for creating Excel XLSX files.
%package -n %{libname}
Summary: Shared library for libxlsxwriter
%description -n %{libname}
Libxlsxwriter is a C library for creating Excel XLSX files.
This package holds the shared library files.
%package devel
Summary: Development files for libxlsxwriter
Requires: %{libname} = %{version}
%description devel
Libxlsxwriter is a C library for creating Excel XLSX files.
This package holds the development files.
%prep
%autosetup -p1 -n %{name}-RELEASE_%{version}
%build
# Delete bundled minizip
rm -rf third_party/minizip
rm -f include/xlsxwriter/third_party/zip.h
%cmake -DUSE_SYSTEM_MINIZIP:BOOL=ON -DUSE_FMEMOPEN:BOOL=ON
%cmake_build
%install
%cmake_install
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%license License.txt
%{_libdir}/libxlsxwriter.so.*
%files devel
%license License.txt
%doc Changes.txt Readme.md CONTRIBUTING.md
%{_includedir}/xlsxwriter.h
%{_includedir}/xlsxwriter/
%{_libdir}/libxlsxwriter.so
%{_libdir}/pkgconfig/xlsxwriter.pc
%changelog