File plog.spec of Package cmake-plog
#
# spec file for package plog
#
# Copyright (c) 2023 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 https://bugs.opensuse.org/
#
%global debug_package %{nil}
Name: plog
Version: 1.1.10
Release: 0
Summary: Portable, simple and extensible C++ logging library
License: MIT
URL: https://github.com/SergiusTheBest/plog
Group: Development/Libraries/C and C++
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: make
%description
Plog is a C++ logging library that is designed to be as simple,
small and flexible as possible. It is created as an alternative
to existing large libraries and provides some unique features
as CSV log format and wide string support.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup
%build
%cmake -DPLOG_BUILD_TESTS=ON
%cmake_build
%install
%cmake_install
# Delete wrongly installed doc content, we'll docify later
if [ -d "%{buildroot}%{_datadir}/doc/packages/%{name}" ];then rm -rv %{buildroot}%{_datadir}/doc/packages/%{name};else rm -rv %{buildroot}%{_datadir}/doc/%{name};fi
%check
%ctest
%files devel
%license LICENSE
%doc README.md doc
%{_includedir}/%{name}/
%{_libdir}/cmake/%{name}/
%changelog