# gi-find-deps.sh is very slow but is not needed here, it may be installed locally %define __typelib_path %{nil} Summary: Small command-line program to download videos and audio from different websites Name: yt-dlp Version: 2021.10.10 Release: 2 License: Public Domain and GPLv2+ Group: Video Url: https://github.com/yt-dlp/yt-dlp # source from Github requires at least pandoc which is not packaged Source0: %{pypi_source} # Pick upstream commits to fix https://github.com/yt-dlp/yt-dlp/issues/1301 # https://github.com/yt-dlp/yt-dlp/commit/48ee10ee8adcf61e1136a252462670ec230e9439 Patch1: 48ee10ee8adcf61e1136a252462670ec230e9439.patch # https://github.com/yt-dlp/yt-dlp/commit/03b4de722a6cf86dbcc6d17a63145ec59a573bf6 Patch2: 03b4de722a6cf86dbcc6d17a63145ec59a573bf6.patch # https://github.com/yt-dlp/yt-dlp/commit/580d3274e50d9cca79189689ba53db7295ea267c Patch3: 580d3274e50d9cca79189689ba53db7295ea267c.patch BuildRequires: ffmpeg BuildRequires: gnupg2 BuildRequires: pkgconfig(python3) BuildRequires: python3egg(setuptools) BuildRequires: zip BuildArch: noarch Requires: python3-%{name} = %{EVRD} Recommends: ffmpeg # youtube-dl is not developed anymore, it is a fork of it Obsoletes: youtube-dl < 2021.10.10 Provides: youtube-dl = %{EVRD} %description Small command-line program to download videos and audio from different websites. Fork of youtube-dl. %files %license LICENSE %doc README.txt %{_bindir}/%{name} %{_bindir}/youtube-dl %{_datadir}/zsh/site-functions/_%{name} %{_mandir}/man1/%{name}.1* %{_datadir}/bash-completion/completions/%{name} %{_datadir}/fish/vendor_completions.d/%{name}.fish #----------------------------------------------------------------------------- %package -n python3-%{name} Summary: Python 3 bindings for %{name} Group: Development/Python BuildArch: noarch %description -n python3-%{name} This package contains the Python 3 bindings for %{name} (fork of youtube-dl) %files -n python3-%{name} %license LICENSE %doc README.txt %{python3_sitelib}/yt_dlp %{python3_sitelib}/yt_dlp-*-py%{py3_ver}.egg-info #----------------------------------------------------------------------------- %prep %autosetup -p1 %build %py3_build %install %py3_install # force the binary to use python 3 environment by default sed -i -e 's,#!/usr/bin/env python,#!%{__python3},' %{buildroot}%{_bindir}/%{name} # installed as %%doc into standard location unlink %{buildroot}%{_datadir}/doc/yt_dlp/README.txt rmdir %{buildroot}%{_datadir}/doc/yt_dlp rmdir %{buildroot}%{_datadir}/doc # compat symlink (e.g. mpv can use youtube-dl, but it is not developed anymore) ( cd %{buildroot}%{_bindir} && ln -s %{name} youtube-dl )