SHA256
1
0
forked from pool/spdlog
spdlog/spdlog.spec
Bernd Ritter 2dbe712738 - Update to version 1.10.0
* Bump fmt to version 8.1.1.
  * Added file event handlers.
  * Fixed rotating file sink: when disk is full log rotation resulted zero size log files.
  * Added new udp_sink.
  * Improved file name for hourly file sink.
  * Added code location information for error handler.
  * Fixed qt_sinks ctor.
  * List Debian instructions in the README.
  * Updated to latest Travis CI Build Status.
  * Fixed unhandled errors in udp sink.
  * CMake improvement regarding cmake_minimum_required and policy. 
  * Fixed mongo_sink compile in older gcc versions.
  * Remove mutable keyword from mutex_ member in of sinks.
  * Fix typos.
  * Fixed udp sink build on FreeBSD
  * Avoid c-style casting in stdout sinks. 
  * Fixed tweakme.h compile error under msvcs when SPDLOG_FUNCTION is defined #2182. Thanks @Light3039 .
  * Fixed compiling errors on AIX #2181. Thanks @lisr .
  * Fixed runtime when build with -fsanitize=cfi #1972. Thanks @bansan85 .
  * Remove extraneous semicolon #2190. Thanks @sylveon.
  * Added example how to replace default logger.
  * Fixed usage of ranges and to_hex in the same compile unit.
  * Reduce warnings with pedantic compiler -Wuseless-cast.
  * Support using std::span in to_hex.
  * Reset current size if rotated files on open #2234.
  * Allow forward-declaration of level_enum.
  * Call localtime() only if pattern_formatter really needs it.
  * Removed unneeded spaces from code.
  * Added a few missing files/directories to the gitignore.

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/spdlog?expand=0&rev=52
2022-04-18 19:48:34 +00:00

103 lines
2.7 KiB
RPMSpec

#
# spec file for package spdlog
#
# Copyright (c) 2022 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/
#
%define _sover 1
Name: spdlog
Version: 1.10.0
Release: 0
Summary: C++ logging library
License: MIT
URL: https://github.com/gabime/spdlog
Source0: https://github.com/gabime/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99: baselibs.conf
BuildRequires: benchmark-devel >= 1.4.0
BuildRequires: cmake >= 3.10
%if 0%{?suse_version} > 1500
BuildRequires: gcc-c++ >= 8
%else
BuildRequires: gcc8-c++
%endif
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: pkgconfig(catch2) >= 2.13.4
BuildRequires: pkgconfig(fmt) >= 8.0.0
BuildRequires: pkgconfig(libsystemd)
%description
This is a packaged version of the gabime/spdlog header-only C++
logging library available at Github.
%package devel
Summary: Development files for %{name}
Requires: lib%{name}%{_sover} = %{version}
Requires: libstdc++-devel
Requires: pkgconfig(fmt)
%description devel
The %{name}-devel package contains C++ header files for developing
applications that use %{name}.
%package -n lib%{name}%{_sover}
Summary: C++ logging library
%description -n lib%{name}%{_sover}
This is a packaged version of the gabime/spdlog C++ logging library
available at Github.
%prep
%autosetup -p1
find . -name '.gitignore' -exec rm {} \;
sed -i -e "s,\r,," README.md LICENSE
%build
export CXX=g++
test -x "$(type -p g++-8)" && export CXX=g++-8
%cmake -G Ninja \
-DSPDLOG_BUILD_TESTS=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_FMT_EXTERNAL=ON \
-DCMAKE_BUILD_TYPE=Release \
-DSPDLOG_BUILD_EXAMPLES=OFF \
-DSPDLOG_BUILD_SHARED=ON \
..
%ninja_build
%install
%ninja_install -C build
%check
export LD_LIBRARY_PATH="%{_builddir}/%{name}-%{version}/build"
%ctest
%post -n lib%{name}%{_sover} -p /sbin/ldconfig
%postun -n lib%{name}%{_sover} -p /sbin/ldconfig
%files devel
%license LICENSE
%doc README.md
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
%{_libdir}/cmake/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%files -n lib%{name}%{_sover}
%{_libdir}/lib%{name}.so.%{_sover}*
%changelog