%global commit c854208ccf7938fa58b3bfbee6cb5bfd6432f11a %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commit_date 20220416 %global gitrel .%{commit_date}.git%{shortcommit} Name: yt-dlp Version: 2022.04.08 Release: 1%{gitrel}%{?dist} Summary: A command-line program to download videos from online video platforms License: Unlicense URL: https://github.com/%{name}/%{name} Source0: %{url}/archive/%{commit}.tar.gz BuildArch: noarch BuildRequires: python3-devel %if %{with tests} # Needed for %%check BuildRequires: python3dist(pytest) %endif # Needed for docs BuildRequires: pandoc BuildRequires: make %if 0%{?fedora} >= 36 # ffmpeg-free is now available in Fedora. Recommends: /usr/bin/ffmpeg /usr/bin/ffprobe %endif Suggests: python3dist(keyring) %global _description %{expand: yt-dlp is a command-line program to download videos from many different online video platforms, such as youtube.com. The project is a fork of youtube-dl with additional features and fixes.} %description %{_description} %package bash-completion Summary: Bash completion for %{name} Requires: %{name} = %{version} Requires: bash-completion Supplements: (%{name} and bash-completion) BuildArch: noarch %description bash-completion Bash command line completion support for %{name}. %package zsh-completion Summary: Zsh completion for %{name} Requires: %{name} = %{version} Requires: zsh Supplements: (%{name} and zsh) BuildArch: noarch %description zsh-completion Zsh command line completion support for %{name}. %package fish-completion Summary: Fish completion for %{name} Requires: %{name} = %{version} Requires: fish Supplements: (%{name} and fish) BuildArch: noarch %description fish-completion Fish command line completion support for %{name}. %prep %autosetup -n %{name}-%{commit} %generate_buildrequires %pyproject_buildrequires -r %build # Docs and shell completions make yt-dlp.1 completion-bash completion-zsh completion-fish # Docs and shell completions are also included in the wheel. %pyproject_wheel %install %pyproject_install %pyproject_save_files yt_dlp %check %if %{with tests} # See https://github.com/yt-dlp/yt-dlp/blob/master/devscripts/run_tests.sh %pytest -k "not download" %endif %files -f %{pyproject_files} %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %doc README.md %license LICENSE %files bash-completion %{_datadir}/bash-completion/completions/%{name} %files zsh-completion %{_datadir}/zsh/site-functions/_%{name} %files fish-completion %{_datadir}/fish/vendor_completions.d/%{name}.fish %changelog * Fri Apr 08 2022 Maxwell G - 2022.04.08-1 - Update to 2022.04.08. Fixes rhbz#2073359. * Sat Mar 12 2022 Artem Polishchuk - 2022.03.08.1-2 - build: Make ffmpeg and ffprobe conditional deps for >= f36 only * Thu Mar 10 2022 Maxwell G - 2022.03.08.1-1 - Update to 2022.03.08.1. Fixes rhbz#2061973. * Mon Mar 07 2022 Maxwell G - 2022.02.04-2 - Add weak dependency on ffmpeg and ffprobe. - Make shell-completion subpackages optional again. * Fri Feb 04 2022 Maxwell G - 2022.2.4-1 - Update to 2022.2.4. Fixes rhbz#2050497. * Mon Jan 24 2022 Maxwell G - 2022.01.21-1 - Update to 2022.01.21. * Sat Jan 22 2022 Fedora Release Engineering - 2021.12.27-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 27 2021 Maxwell G - 2021.12.27-1 - Update to 2021.12.27. * Sun Dec 26 2021 Maxwell G - 2021.12.25-1 - Update to 2021.12.25. * Wed Dec 01 2021 Maxwell G - 2021.12.01-1 - Update to 2021.12.01. * Tue Nov 9 2021 Maxwell G - 2021.11.10.1-1 - Update to 2021.11.10.1. * Tue Nov 9 2021 Maxwell G - 2021.10.22-2 - Skip installing unnecessary tox dependencies - Fix shell-completion subpackages - Only package README.md; don't generate extra README.txt * Sat Oct 23 2021 Maxwell G - 2021.10.22-1 - Update to 2021.10.22 * Sun Oct 10 2021 Maxwell G - 2021.10.10-1 - Mark LICENSE with %%license instead of %%doc - Update to 2021.10.10 - Fix non-executable-script rpmlint error - Use `python3dist(NAME)` for dependencies - Fix rpm-buildroot-usage rpmlint error * Sat Oct 9 2021 Maxwell G - 2021.10.09-1 - Initial package