%define _disable_source_fetch 0 %global toolchain clang %global debug_package %{nil} Name: youtube-dl Version: 2024.08.07 Release: 2%{?dist} Summary: A small command-line program to download online videos License: GPL-3.0 URL: https://github.com/ytdl-org Source0: https://github.com/ytdl-org/ytdl-nightly/releases/download/%{version}/youtube-dl-%{version}.tar.gz # 添加补丁文件的 Source1 # Source1: https://github.com/user-attachments/files/16450516/diff.txt BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: make BuildRequires: pandoc BuildRequires: python3 Requires: python%{python3_pkgversion}-setuptools %description Small command-line program to download videos from YouTube and other sites. %prep %autosetup -n youtube-dl # 下载补丁文件 # cp %{SOURCE1} diff.txt # 应用补丁 # patch -p1 < diff.txt %build # Nothing to build sed -i 's|/usr/bin/env python|/usr/bin/env python3|' Makefile %install # 使用 DESTDIR 確保文件被安裝到 BUILDROOT 下的正確位置 make install DESTDIR=%{buildroot} # Install additional files install -Dpm644 README.md %{buildroot}%{_datadir}/doc/%{name}/README.md %files %doc README.md /usr/local/bin/%{name} /usr/local/man/man1/%{name}.1 /etc/bash_completion.d/%{name} /usr/local/share/zsh/site-functions/_%{name} /etc/fish/completions/%{name}.fish %changelog * Sat Jan 27 2024 Fedora Release Engineering - 2023.08.04.git86e3cf5-2 - Rebuilt for Fedora 40 Mass Rebuild