# # spec file for package yder # # Copyright (c) 2023 SUSE LLC # Copyright (c) 2018-2023, Martin Hauke # # 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/ # # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define sover 1_4 %define libname %mklibname %{name} %{sover} %define develname %mklibname %{name} -d %if "%{_vendor}" == "openEuler" # Buggy macros in OpenEuler 24.03. # Maybe this can be removed for OpenEuler 26.03. # Unfortunately, I can't find any way to get the version of openEuler. %undefine cmake_build %undefine cmake_install %endif Name: yder Version: 1.4.21 Release: %mkrel 1 Summary: Logging library written in C # Example programs in subfolder examples/ are licensed under MIT License: LGPL-2.1-or-later Group: Development/Languages/C and C++ URL: https://github.com/babelouest/yder Source: https://github.com/babelouest/yder/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: pkgconfig(liborcania) >= 2.0.0 BuildRequires: pkgconfig(libsystemd) %description Yder is a logging library where messages can be logged to console, files, syslog or journald. Yder is single-threaded, which means that only one instance of yder logging can be used at the same time in a program. %package -n %libname Summary: Logging library written in C Group: System/Libraries %description -n %libname Yder is a logging library where messages can be logged to console, files, syslog or journald. Yder is single-threaded, which means that only one instance of yder logging can be used at the same time in a program. %package -n %develname Summary: Header files for yder Group: Development/Libraries/C and C++ Requires: %libname = %{version} %description -n %develname Development and header files for yder. %prep %setup -q %build %if 0%{?cmake_build:1} %cmake %cmake_build %else %cmake -B build %make_build -C build %endif %install %if 0%{?cmake_install:1} %cmake_install %else %make_install -C build %endif rm -rf %{buildroot}/%{_datadir}/doc/ %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %files -n %libname %doc CHANGELOG.md README.md %license LICENSE %{_libdir}/libyder.so.* %files -n %develname %{_includedir}/yder.h %{_includedir}/yder-cfg.h %{_libdir}/libyder.so %{_libdir}/cmake/Yder %{_libdir}/pkgconfig/libyder.pc %changelog * Mon Sep 18 2023 Martin Hauke - Update to version 1.4.20 * cmake: remove DownloadProject feature, now dependencies must be previously installed * Thu Jan 12 2023 Martin Hauke - Update to version 1.4.19 * Improve cmake script and MSVC support * Build with flag -Wconversion * Sat Oct 15 2022 Martin Hauke - Update to version 1.4.18 * Minor bugfixes * Sun May 29 2022 Martin Hauke - Update to version 1.4.17 * Fix CMAKE_MODULE_PATH who was used as single value (for real) * Sat May 28 2022 Martin Hauke - Update to version 1.4.16 * Fix pkg-config file with absolute path for CMAKE_INSTALL_{INCLUDE,LIB}DIR * Fix CMAKE_MODULE_PATH who was used as single value * Add y_set_split_message_newline to split log messages on newline characters * Sun Mar 13 2022 Martin Hauke - Update to version 1.4.15 * Use `o_strnullempty` instead of `o_strlen` to check if a `char *` has data * Sat May 29 2021 Ferdinand Thiessen - Update to version 1.4.14 * Bugfix release * Mon Mar 1 2021 Martin Hauke - Update to version 1.4.13 * Bugfix release * Wed Sep 2 2020 Martin Hauke - Update to version 1.4.12 * Use `gmtime_r` instead of `localtime` * Fix documentation typos * Fri Jul 3 2020 Martin Hauke - Update to version 1.4.11 - cmake script: Add option `DOWNLOAD_DEPENDENCIES` - Harmonize licenses - Fix install pkgconfig by Makefile * Sat Mar 14 2020 Martin Hauke - Update to version 1.4.10 * Add y_set_date_format, closes #17 * Remove generated doc from source package * Sun Jan 19 2020 Martin Hauke - Update to versin 1.4.9 * Fix pkgconfig dependency * Sat Oct 5 2019 Martin Hauke - Update to versin 1.4.8 * Avoid running y_init_logs without closing between * Fri Jul 12 2019 Martin Hauke - Update to version 1.4.7 * Clean build process * Clean static variables if error initializing logs with file - Drop not longer needed patch: * yder-fix-build.patch * Tue Jul 2 2019 Martin Hauke - Update to version 1.4.6 * Fix package dependencies in cmake script * Fix pkgconfig bugs * Fri Dec 28 2018 mardnh@gmx.de - Update to version 1.4.4 * Improve build config file and install headers. * Add config file yder-cfg.h dynamically built with the options. * Fix a bug about including time.h in the wrong place. * Add y_init_callback_logs to redirect all logs in a callback function. - Remove patch: * 0001-Fix-pkg-config-information-add-requires-fields-as-me.patch - Update patch: * yder-fix-build.patch * Sat Aug 11 2018 jengelh@inai.de - Update descriptions for grammar. * Sun Jul 29 2018 mardnh@gmx.de - Initial package, version 1.3.4