%global numjobs %{_smp_build_ncpus} Name: chromium-source Version: 130.0.6723.69 Release: clean Summary: Cleaned chromium source. Url: http://www.chromium.org/Home License: BSD-3-Clause BuildRequires: git BuildRequires: python3 %description Vanilla, cleaned, source of chromium. Used by hardened-chromium. %build # obtain cleaning utilities git clone https://github.com/rknf404/chromium-source-cache.git cp chromium-source-cache/* . # obtain depot tools for obtaining source git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH="$(pwd)/depot_tools:$PATH" mkdir chromium cp ffmpeg-clean.patch chromium/ cd chromium # obtain source, specific version of source, and needed deps (hooks) fetch --nohooks --no-history chromium cd src git fetch origin refs/tags/%{version}:refs/tags/%{version} git checkout %{version} gclient runhooks # clean rm -rf ./build/linux/debian_bullseye_amd64-sysroot ./build/linux/debian_bullseye_i386-sysroot ./third_party/node/linux/node-linux-x64 ./third_party/rust-toolchain ./third_party/rust-src chmod a+rx ./../../clean_ffmpeg.sh cp ./../../get_free_ffmpeg_source_files.py ./ ./../../clean_ffmpeg.sh . 0 rm ./get_free_ffmpeg_source_files.py find ./third_party/openh264/src -type f -not -name '*.h' -delete # compress tar -cJf "chromium-%{version}-clean.tar.xz" . mv chromium-%{version}-clean.tar.xz ./../../ %install mkdir -p %{buildroot}%{_usrsrc}/chromium/ install -m 0644 chromium-%{version}-clean.tar.xz %{buildroot}%{_usrsrc}/chromium/ %files %{buildroot}%{_usrsrc}/chromium/chromium-%{version}-clean.tar.xz