%global commit e01ae885cdbef3af265341110a434f6fa7b8e8ac %global snapdate 20210722 Name: cr-marcstevens-snippets # Neither the repository as a whole nor the individual header-only libraries # have ever been versioned or formally released. %global snapinfo ^%{snapdate}git%(echo '%{commit}' | cut -b -7) Version: 0%{snapinfo} Release: %autorelease -p Summary: Collection of useful one-file C/C++ headers # The entire source is MIT except: # # - cxxheaderonly/progress_display.hpp is Boost # (cr-marcstevens-snippets-progress_display-devel supbackage) # - contents of autoconf/, removed in %%prep and not packaged, are under FSFAP, # GPLv3+, or GPLv2+, depending on the file License: MIT URL: https://github.com/cr-marcstevens/snippets Source0: %{url}/archive/%{commit}/snippets-%{commit}.tar.gz # Replace using declaration with typedef # https://github.com/cr-marcstevens/snippets/pull/2 Patch: %{url}/pull/2.patch # For compile-only “smoke tests”: BuildRequires: gcc-c++ # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %description %{summary}. %package base64-devel Summary: A header only C++ base64 encoder/decoder library BuildArch: noarch Provides: %{name}-base64-static = %{?epoch:%{epoch}:}%{version}-%{release} %description base64-devel %{summary}. %package concurrent_unordered_map-devel Summary: A header only C++ light-weight concurrent unordered map BuildArch: noarch Provides: %{name}-concurrent_unordered_map-static = %{?epoch:%{epoch}:}%{version}-%{release} %description concurrent_unordered_map-devel %{summary}. %package cpuperformance-devel Summary: A header only C++ light-weight aids for CPU cycle counting BuildArch: noarch Provides: %{name}-cpuperformance-static = %{?epoch:%{epoch}:}%{version}-%{release} %description cpuperformance-devel %{summary}. %package parallel_algorithms-devel Summary: A header only C++ light-weight parallel algorithms library BuildArch: noarch Provides: %{name}-parallel_algorithms-static = %{?epoch:%{epoch}:}%{version}-%{release} %description parallel_algorithms-devel %{summary}. %package program_options-devel Summary: A header only C++ C++ boost-like program options class BuildArch: noarch Provides: %{name}-program_options-static = %{?epoch:%{epoch}:}%{version}-%{release} %description program_options-devel %{summary}. %package progress_display-devel Summary: Extension from boost::progress_display License: Boost BuildArch: noarch Provides: %{name}-progress_display-static = %{?epoch:%{epoch}:}%{version}-%{release} %description progress_display-devel %{summary}. %package string_algo-devel Summary: A header only C++ string algorithms BuildArch: noarch Provides: %{name}-string_algo-static = %{?epoch:%{epoch}:}%{version}-%{release} %description string_algo-devel %{summary}. %package thread_pool-devel Summary: A header only C++ light-weight thread pool BuildArch: noarch Provides: %{name}-thread_pool-static = %{?epoch:%{epoch}:}%{version}-%{release} %description thread_pool-devel %{summary}. %prep %autosetup -n snippets-%{commit} -p1 # We are not packaging these, and many have licenses that are acceptable for # packaging but differ from those listed in the breakdown above the License # field. To keep things clean, we remove them. rm -rvf autoconf %build # There is no compiled code to install, since all libraries are header-only. We # do do a compile-only “smoke test” for each library. %set_build_flags mkdir -p _test '%{_vpath_builddir}' for hdr in cxxheaderonly/*.hpp do lib="$(basename "${hdr}" '.hpp')" cat > "_test/${lib}.cpp" <