You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

82 lines
2.1 KiB

Name: yt-dlp
Version: 2023.11.16
Release: 1%{?dist}
Summary: A command-line program to download videos from online video platforms
License: Unlicense
URL: https://github.com/%{name}/%{name}
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: make
Recommends: /usr/bin/ffmpeg
Recommends: /usr/bin/ffprobe
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}-%{release}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
%description bash-completion
Bash command line completion support for %{name}.
%package zsh-completion
Summary: Zsh completion for %{name}
Requires: %{name} = %{version}-%{release}
Requires: zsh
Supplements: (%{name} and zsh)
%description zsh-completion
Zsh command line completion support for %{name}.
%package fish-completion
Summary: Fish completion for %{name}
Requires: %{name} = %{version}-%{release}
Requires: fish
Supplements: (%{name} and fish)
%description fish-completion
Fish command line completion support for %{name}.
%prep
%autosetup
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
%generate_buildrequires
%pyproject_buildrequires -r
%build
make completion-bash completion-zsh completion-fish
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files yt_dlp
%files -f %{pyproject_files}
%{_bindir}/%{name}
%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