## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 7; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # This library is historically header-only. At some point, it gained a C++ # source file in an effort to reduce compile times. The upstream build system # supports building as a static library, and it could be extended to support a # shared library; see # # Add shared library support and fix library install path on Linux # https://github.com/amrayn/easyloggingpp/pull/815 # # for a demonstration and commentary. The problem is that there are a # significant number of compile-time configuration flags controlled by # preprocessor macros—not only conditional feature enablement, but behavior # changes—that are expected to be controlled by the code using Easylogging++ as # a library. See # # https://github.com/amrayn/easyloggingpp/tree/v9.97.0#configuration-macros # # for details. Building a system-wide shared library is therefore unlikely to # be useful, as whichever settings we choose, programs are likely to require # different ones. # # Instead, we treat the easylogging++.cc C++ source file as effectively “just # another header,” following the lead of the upstream build system—which # already installs it in “${PREFIX}/include”—and package this as a header-only # library with one strangely-named header. Name: easyloggingpp Version: 9.97.1 Release: %autorelease Epoch: 1 Summary: C++ logging library # SPDX License: MIT URL: https://github.com/abumq/easyloggingpp Source: %{url}/archive/v%{version}/easyloggingpp-%{version}.tar.gz # No shebang = not executable # https://github.com/amrayn/easyloggingpp/pull/817 Patch: %{url}/pull/817.patch # Convert words.txt from ISO-8859-1 to UTF-8 # https://github.com/amrayn/easyloggingpp/pull/818 Patch: %{url}/pull/818.patch # No compiled code is installed, so there are no debugging symbols. %global debug_package %{nil} BuildRequires: gcc-c++ BuildRequires: cmake # Our choice; the make backend would work just fine. BuildRequires: ninja-build BuildRequires: cmake(gtest) BuildRequires: hardlink BuildRequires: symlinks BuildRequires: dos2unix %global common_description %{expand: Easylogging++ is an efficient logging library for C++ applications. It is extremely powerful, highly extendable and configurable to a user’s requirements. It provides the ability to write your own sinks (via featured referred as LogDispatchCallback). This library is currently used by hundreds of open-source projects on github and other open-source source control management sites.} %description %{common_description} %package devel Summary: Development files for Easylogging++ BuildArch: noarch # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries Provides: easyloggingpp-static = %{?epoch:%{epoch}:}%{version}-%{release} %description devel %{common_description} The easyloggingpp-devel package contains libraries and header files for developing applications that use Easylogging++. %package doc Summary: Documentation and examples for Easylogging++ BuildArch: noarch Requires: easyloggingpp-devel = %{?epoch:%{epoch}:}%{version}-%{release} %description doc %{common_description} The easyloggingpp-doc package contains documentation and examples for developing applications that use Easylogging++. %prep %autosetup -n easyloggingpp-%{version} -p1 # Remove .gitignore and similar files that might accidentally be packaged, # especially in the samples. find . -type f \( -name '.git*' -o -name '.travis*' \) -print -delete find . -depth -type d -name '.vs' -print -execdir rm -rvf '{}' ';' # Fix CRNL line endings dos2unix --keepdate samples/Qt/fast-dictionary/words.txt find samples/VC++ -type f -execdir dos2unix --keepdate '{}' '+' %conf %cmake -GNinja -Dtest:BOOL=TRUE %build %cmake_build %install %cmake_install install -d '%{buildroot}%{_pkgdocdir}' cp -rvp *.md doc samples '%{buildroot}%{_pkgdocdir}' # Symlink headers to the -devel package: use absolute symlinks in the buildroot # and then use the symlinks utility to convert them into relative ones. find '%{buildroot}%{_pkgdocdir}/samples' -type f \ \( -name 'easylogging++.cc' -o -name 'easylogging++.h' \) | while read -r fn do ln -svf "%{buildroot}%{_includedir}/$(basename "${fn}")" "${fn}" symlinks -c -o "${fn}" done # Hardlink duplicate shell scripts and such within the examples hardlink '%{buildroot}%{_pkgdocdir}/samples' # The following allows us to mark samples/OpenGL/Cube/LICENCE as an additional # license file under the package documentation directory, without manually # listing the contents of the samples directory. That’s perhaps a little fussy, # but it works nicely. ( find samples/ -type d -printf '\045doc \045dir \045{_pkgdocdir}/%p\n' find samples/ -type f -name 'LICENCE' \ -printf '\045license \045{_pkgdocdir}/%p\n' find samples/ -type f ! -name 'LICENCE' \ -printf '\045doc \045{_pkgdocdir}/%p\n' ) | tee samples.files %check # Test failures related to --logging-flags # https://github.com/amrayn/easyloggingpp/issues/816 %{_vpath_builddir}/easyloggingpp-unit-tests \ --gtest_filter=-CommandLineArgsTest.LoggingFlagsArg %files devel %license LICENSE %{_includedir}/easylogging++.h # This “source” file is treated as a header; see the notes at the top of the # spec file. %{_includedir}/easylogging++.cc %{_datadir}/pkgconfig/easyloggingpp.pc %files doc -f samples.files %license LICENSE %dir %{_pkgdocdir} %doc %{_pkgdocdir}/*.md %doc %{_pkgdocdir}/doc/ %changelog ## START: Generated by rpmautospec * Fri Nov 01 2024 Benjamin A. Beasley - 1:9.97.1-7 - Invoke %%cmake in %%conf rather than in %%build * Wed Jul 17 2024 Fedora Release Engineering - 1:9.97.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Wed Jan 24 2024 Fedora Release Engineering - 1:9.97.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 1:9.97.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Sep 26 2023 Benjamin A. Beasley - 1:9.97.1-2 - Keep timestamps when converting text file line endings * Fri Jul 21 2023 Benjamin A. Beasley - 1:9.97.1-1 - Update to 9.97.1 (close RHBZ#2224462) - New upstream maintainer and project URL * Wed Jul 19 2023 Fedora Release Engineering - 1:9.97.0^20210202git8489989-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jun 03 2023 Benjamin A. Beasley - 1:9.97.0^20210202git8489989-3 - List directories with trailing slashes * Sat Jun 03 2023 Benjamin A. Beasley - 1:9.97.0^20210202git8489989-2 - Remove explicit %%set_build_flags, not needed since F36 > > https://www.fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck * Thu May 25 2023 Benjamin A. Beasley - 1:9.97.0^20210202git8489989-1 - Fix incorrect snapshot info field in Version - To preserve ordering, this required introducing an Epoch * Fri Jan 27 2023 Benjamin A. Beasley - 9.97.0^8489989git20210202-3 - Work around gtest 1.13.0 requiring C++14 * Thu Jan 19 2023 Fedora Release Engineering - 9.97.0^8489989git20210202-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Sep 02 2022 Benjamin A. Beasley - 9.97.0^8489989git20210202-1 - Initial package (close RHBZ#2122170) ## END: Generated by rpmautospec