## START: Set by rpmautospec ## (rpmautospec version 0.6.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 %global repo_name vcpkg-tool %global repo_tag 2024-06-10 Name: vcpkg Version: %(echo %{repo_tag} | sed 's/-/./g') Release: %autorelease License: MIT Summary: C++ Library Manager URL: https://github.com/microsoft/%{repo_name} Source0: %{url}/archive/%{repo_tag}/%{name}-%{version}.tar.gz Source1: %{name}.sh # adapt to fmt 11 Patch0: 0001-include-fmt-ranges.h-for-using-fmt-join.patch Patch1: 0001-prevent-fmt-from-formatting-StringView-as-a-sequence.patch BuildRequires: catch-devel >= 2.13.0 BuildRequires: cmake BuildRequires: cmrc-devel BuildRequires: fmt-devel >= 10.0.0 BuildRequires: gcc-c++ BuildRequires: ninja-build Requires: cmake%{?_isa} Requires: curl%{?_isa} Requires: gcc-c++%{?_isa} Requires: git-core%{?_isa} Requires: ninja-build%{?_isa} Recommends: aria2%{?_isa} %description Vcpkg is a package manager for the different C and C++ libraries. Vcpkg can collect usage data. The data collected by Microsoft is anonymous. This package has telemetry disabled by default and doesn't ship the repository with recipes. Please read README.fedora file for more information. %prep %autosetup -n %{repo_name}-%{repo_tag} -p1 # Adding a file with some useful information... cat << EOF >> README.fedora Fedora package has telemetry disabled by default. If you want to enable it, you should unset the VCPKG_DISABLE_METRICS environment variable from the %{_sysconfdir}/profile.d/%{name}.sh file. Fedora can't ship the official Git repository with recipes for various reasons (especially legal), so you'll need to manually clone it into the \$HOME/.local/share/%{name} directory (the path can be changed in the %{_sysconfdir}/profile.d/%{name}.sh file): git clone https://github.com/microsoft/%{name} \$VCPKG_ROOT You will have to update it manually too: git -C \$VCPKG_ROOT pull EOF # Fixing line endings... sed -e "s,\r,," -i README.md # Unbundling catch... rm -rf include/catch2 ln -svf %{_includedir}/catch2/ include/ # Patching fmt namespace... %if 0%{?fedora} >= 41 sed -e "s/namespace v10/namespace v11/g" -i include/vcpkg/base/fwd/fmt.h %endif %build %cmake -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ -DBUILD_TESTING:BOOL=OFF \ -DVCPKG_BASE_VERSION:STRING="%{repo_tag}" \ -DVCPKG_VERSION:STRING="%{release}" \ -DVCPKG_DEVELOPMENT_WARNINGS:BOOL=OFF \ -DVCPKG_WARNINGS_AS_ERRORS:BOOL=OFF \ -DVCPKG_DEPENDENCY_CMAKERC:BOOL=ON \ -DVCPKG_DEPENDENCY_EXTERNAL_FMT:BOOL=ON \ -DVCPKG_BUILD_TLS12_DOWNLOADER:BOOL=OFF \ -DVCPKG_BUILD_FUZZING:BOOL=OFF \ -DVCPKG_EMBED_GIT_SHA:BOOL=OFF \ -DVCPKG_BUILD_BENCHMARKING:BOOL=OFF \ -DVCPKG_ADD_SOURCELINK:BOOL=OFF %cmake_build %install %cmake_install # Installing environment options override... install -D -m 0644 -p "%{SOURCE1}" "%{buildroot}%{_sysconfdir}/profile.d/%{name}.sh" %files %doc README.md README.fedora %license LICENSE.txt NOTICE.txt %{_bindir}/%{name} %config(noreplace) %{_sysconfdir}/profile.d/%{name}.sh %changelog ## START: Generated by rpmautospec * Tue Jul 16 2024 Kefu Chai - 2024.06.10-2 - Rebuilt for fmt 11 * Thu Jun 13 2024 Vitaly - 2024.06.10-1 - Updated to version 2024.06.10. * Thu Apr 25 2024 Vitaly - 2024.04.23-1 - Updated to version 2024.04.23. * Thu Mar 28 2024 Vitaly - 2024.03.14-1 - Updated to version 2024.03.14. * Sat Jan 27 2024 Fedora Release Engineering - 2023.06.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild ## END: Generated by rpmautospec