# # spec file for package liblogging # # Copyright (c) 2025 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 with_systemd_journal 0%{?suse_version} >= 1310 %define with_rst2man 0%{?suse_version} >= 1230 %define sover 0 Name: liblogging Version: 1.0.6 Release: 7.1 Summary: An easy to use logging library License: BSD-2-Clause Group: Development/Libraries/C and C++ URL: http://www.liblogging.org/ Source0: http://download.rsyslog.com/liblogging/%{name}-%{version}.tar.gz Patch0: 0001-support-build-with-gcc-14.patch BuildRequires: dos2unix %if 0%{?is_opensuse} && 0%{?suse_version} < 1600 %global force_gcc_version 13 %endif BuildRequires: gcc%{?force_gcc_version} BuildRequires: pkgconfig >= 0.9.0 %if %{with_rst2man} %if 0%{?suse_version} < 1600 BuildRequires: python-docutils %else BuildRequires: python3-docutils %endif %endif %if %{with_systemd_journal} %if 0%{?suse_version} == 1310 BuildRequires: pkgconfig(libsystemd-journal) >= 197 %else BuildRequires: pkgconfig(libsystemd) >= 209 %endif %endif %description Liblogging is an easy to use logging library. It contains the Libstdlog component is used for standard logging (syslog replacement) purposes via multiple channels. %package -n %{name}%{sover} Summary: An easy to use logging library Group: System/Libraries %description -n %{name}%{sover} Liblogging is an easy to use logging library. It contains the Libstdlog component is used for standard logging (syslog replacement) purposes via multiple channels. %package devel Summary: Development files for LibLogging stdlog library Group: Development/Libraries/C and C++ Requires: %{name}%{sover} = %{version}-%{release} %description devel The liblogging-devel package includes header files, libraries necessary for developing programs which use liblogging library. %prep %setup -q %autopatch -p1 %build %if 0%{?force_gcc_version} export CC="gcc-%{?force_gcc_version}" %endif %configure \ --disable-static \ --enable-rfc3195 \ %if %{with_systemd_journal} --enable-journal \ %else --disable-journal \ %endif %if %{with_rst2man} --disable-cached-man-pages \ %else --enable-cached-man-pages \ %endif make %{?_smp_mflags:%{?_smp_mflags}} V=1 dos2unix AUTHORS ChangeLog COPYING README %install %make_install find %{buildroot} -type f -name "*.la" -delete -print rm -v rfc3195/doc/html/Makefile* %post -n %{name}%{sover} -p /sbin/ldconfig %postun -n %{name}%{sover} -p /sbin/ldconfig %files -n %{name}%{sover} %defattr(-,root,root) %license COPYING %{_libdir}/liblogging-rfc3195.so.* %{_libdir}/liblogging-stdlog.so.* %{_bindir}/stdlogctl %{_mandir}/man1/stdlogctl* %files devel %defattr(-,root,root) %license COPYING %doc ChangeLog README %doc rfc3195/doc/html %{_libdir}/liblogging-rfc3195.so %{_libdir}/liblogging-stdlog.so %dir %{_includedir}/%{name} %{_includedir}/liblogging/*.h %{_libdir}/pkgconfig/liblogging-rfc3195.pc %{_libdir}/pkgconfig/liblogging-stdlog.pc %{_mandir}/man3/stdlog* %changelog * Wed May 14 2025 Thomas Blume - use gcc13 for Code 15 - Use python3-docutils for Code 16 * Fri Apr 18 2025 Max Lin - Compile with gcc15 instead of gcc14 * gcc14 is not availalbe in the Leap16 codestream * Wed Jun 19 2024 Thomas Blume - fix build error with gcc14 (bsc#1221715) * add 0001-support-build-with-gcc-14.patch * Mon Mar 26 2018 kukuk@suse.de - Use %%license instead of %%doc [bsc#1082318] * Tue Nov 14 2017 astieger@suse.com - fix SLE 12 build * Thu Nov 9 2017 mpluskal@suse.com - Use python3 version of rst2man when available - Run spec-cleaner * Tue Mar 14 2017 astieger@suse.com - liblogging 1.0.6: * fix small memory leaks in libstdlog * enhancement: sigsafe_printf now recognizes the "j" length modifier * fix: build_file_line and build_syslog_frame call the __stdlog_print_* functions incorrectly * Implement a STDLOG_PID option * bugfix: potentialSEGV in the stdlog_sigsafe_string formatter if NULL pointer was passed in * bugfix: stdlog_sigsafe_printf mis-handles an int or unsigned int * build system: auto-detect presence of journal libraries * Mon Dec 12 2016 dimstar@opensuse.org - When building with systemd-journal support, only buildrequire pkgconfig(libsystemd-journal) on openSUSE 13.1. On newer versions, buildrequrie pkgconfig(libsystemd). The sublibaries have been merged in version 209 (13.2 shipped systemd 210). * Tue Feb 2 2016 mrueckert@suse.de - make the suse_version portable * Thu Jan 28 2016 mrueckert@suse.de - fix broken conditional with sles_version macro * Sun Mar 15 2015 jengelh@inai.de - Remove redundant ldconfig requires * Tue Dec 9 2014 andreas.stieger@gmx.de - liblogging 1.0.5: + cleanup for systemd-journal >= 209 + bugfix: date stamp was incorrectly formatted * Thu Apr 3 2014 andreas.stieger@gmx.de - update to liblogging 1.0.4: * build system changes * Tue Mar 18 2014 andreas.stieger@gmx.de - update to liblogging 1.0.3: * fix build problem with invalid va_list (remove patch liblogging-1.0.2-fix-SLE-va_list.patch) * do not override user varibale CFLAGS * make liblogging-rfc3195 not export private symbols * documentation update on stdlog_log() return code * Mon Mar 3 2014 andreas.stieger@gmx.de - update to liblogging 1.0.2: * API of liblogging-stdlog is now feature-complete with multiple channels, signal-safeness, and logging drivers for syslog, the systemd journal, unix sockets and files. - add libsystemd-journal dependency for journal driver - add python-docutils dependencies for rst2man - add liblogging-1.0.2-fix-SLE-va_list.patch to fix build on SLE * Mon Feb 10 2014 andreas.stieger@gmx.de - update to liblogging 1.0.1: - rfc3195 component now 2-clause BSD licensed This means the complete liblogging is now under 2-clause BSD - new component names: * liblogging-stdlog * liblogging-rfc3195 * Wed Jan 29 2014 andreas.stieger@gmx.de - imported for openSUSE - package documentation in -devel package - apply shared library packaging guidelines - add source URL