%define debug_package %nil Name: yt-dlp Version: 2026.03.03 Release: 1%{?dist} Summary: A small command-line program to download online videos License: Unlicense URL: https://github.com/yt-dlp/yt-dlp %undefine _disable_source_fetch Source0: https://github.com/yt-dlp/yt-dlp/archive/refs/tags/%{version}.tar.gz Source1: %{name}.conf Source2: https://github.com/denoland/deno/releases/download/v2.7.4/deno-x86_64-unknown-linux-gnu.zip BuildRequires: make, python3.10, pandoc Requires: ffmpeg7m Obsoletes: youtube-dl < %{version} Provides: youtube-dl = %{version} %description Small command-line program to download videos from YouTube and other sites. %prep %setup -qn %{name}-%{version} # remove pre-built file #rm youtube-dl #cp -a setup.py setup.py.installpath # Remove files that are installed to the wrong path #sed -i '/youtube-dl.bash-completion/d' setup.py #sed -i '/youtube-dl.fish/d' setup.py #sed -i '/README.txt/d' setup.py # Remove interpreter shebang from module files. #find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {} + %build PYTHON="/usr/bin/python3.10" make %install PREFIX="/usr" PYTHON="/usr/bin/python3.10" make DESTDIR=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yt-dlp.d mkdir -p $RPM_BUILD_ROOT/tmp/youtube-dl/cache mkdir -p $RPM_BUILD_ROOT/usr/bin/ unzip %{S:2} -d $RPM_BUILD_ROOT/usr/bin chmod -R 0777 $RPM_BUILD_ROOT/tmp/youtube-dl #shared cookies install -pm666 %{S:1} %{buildroot}%{_sysconfdir} #install -pm644 %{S:2} %{buildroot}%{_sysconfdir}/yt-dlp.d cd %{buildroot}%{_sysconfdir}/yt-dlp.d ln -s ../yt-dlp.conf yt-dlp.conf cd %{buildroot}%{_bindir} ln -s yt-dlp youtube-dl %files %doc Changelog.md README.md %dir /tmp/youtube-dl/cache %license LICENSE %attr(755,root,root) /usr/bin/deno /usr/bin/yt-dlp /usr/bin/youtube-dl %config(noreplace) /etc/yt-dlp.conf /etc/yt-dlp.d/yt-dlp.conf /usr/man/man1/yt-dlp.1.gz /usr/share/bash-completion/completions/yt-dlp /usr/share/fish/vendor_completions.d/yt-dlp.fish /usr/share/zsh/site-functions/_yt-dlp