From 0bb8636baffb9ca95bdb43c3550394aa623bf0a4ecdf3840e429d774bc2202ff Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 13 Aug 2024 20:42:15 +0200 Subject: [PATCH] Merge sh-completion, make new youtube-dl compat package --- yt-dlp.changes | 6 ++++++ yt-dlp.spec | 48 +++++++++++++++++------------------------------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/yt-dlp.changes b/yt-dlp.changes index 71789cb..eaf7182 100644 --- a/yt-dlp.changes +++ b/yt-dlp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 13 18:34:37 UTC 2024 - Jan Engelhardt + +- Merge sh completion packages into main package +- Add yt-dlp-youtube-dl subpackage + ------------------------------------------------------------------- Thu Aug 1 15:48:06 UTC 2024 - Jan Engelhardt diff --git a/yt-dlp.spec b/yt-dlp.spec index 122caac..4dd8d4a 100644 --- a/yt-dlp.spec +++ b/yt-dlp.spec @@ -35,6 +35,12 @@ BuildRequires: make >= 4 BuildRequires: python-rpm-macros BuildRequires: zip BuildArch: noarch +Obsoletes: youtube-dl-bash-completion < %version-%release +Provides: youtube-dl-bash-completion = %version-%release +Obsoletes: youtube-dl-fish-completion < %version-%release +Provides: youtube-dl-fish-completion = %version-%release +Obsoletes: youtube-dl-zsh-completion < %version-%release +Provides: youtube-dl-zsh-completion = %version-%release # %%primary_python not available in Leap yet Requires: %(echo %{python_module yt-dlp} | perl -pe 's{.* }{}g') %define python_subpackage_only 1 @@ -44,32 +50,14 @@ Requires: %(echo %{python_module yt-dlp} | perl -pe 's{.* }{}g') yt-dlp is a command-line program to retrieve videos from YouTube.com and other video sites for later watching. -%package -n yt-dlp-bash-completion -Summary: Bash completion for yt-dlp -Group: System/Shells -Requires: bash-completion -Supplements: (yt-dlp and bash-completion) +%package -n yt-dlp-youtube-dl +Summary: Compat symlinks for youtube-dl +Requires: yt-dlp +Provides: youtube-dl +Conflicts: youtube-dl -%description -n yt-dlp-bash-completion -Bash command line completion support for yt-dlp. - -%package -n yt-dlp-fish-completion -Summary: Fish completion for yt-dlp -Group: System/Shells -Requires: fish -Supplements: (yt-dlp and fish) - -%description -n yt-dlp-fish-completion -Fish command line completion support for yt-dlp. - -%package -n yt-dlp-zsh-completion -Summary: Zsh Completion for yt-dlp -Group: System/Shells -Requires: zsh -Supplements: (yt-dlp and zsh) - -%description -n yt-dlp-zsh-completion -ZSH command line completion support for yt-dlp. +%description -n yt-dlp-youtube-dl +This package installs "youtube-dl" as a symlink to yt-dlp. %package -n python-yt-dlp Summary: yt-dlp Python library @@ -99,6 +87,7 @@ rm -f youtube-dl yt-dlp %install b="%buildroot" %pyproject_install +ln -s yt-dlp "$b/%_bindir/youtube-dl" %fdupes %buildroot/usr rm -Rf "$b/%_datadir/doc" @@ -107,16 +96,13 @@ rm -Rf "$b/%_datadir/doc" %doc README.md %_bindir/%name %_mandir/man1/%name.1%ext_man - -%files -n yt-dlp-bash-completion %_datadir/bash-completion/ - -%files -n yt-dlp-fish-completion %_datadir/fish/ - -%files -n yt-dlp-zsh-completion %_datadir/zsh/ +%files -n yt-dlp-youtube-dl +%_bindir/youtube-dl + %files %{python_files yt-dlp} %python_sitelib/y*