File youtube-dl.spec of Package youtube-dl

# spec file for package youtube-dl
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           youtube-dl
Version:	 2020.05.29
Release:        0
Summary:        A tool for downloading from Youtube
License:        SUSE-Public-Domain AND CC-BY-SA-3.0
Group:          Productivity/Networking/Web/Utilities
#Git-Clone:	git://
Source3:        %name.keyring
BuildRequires:  bash-completion
%if 0%{?is_opensuse}
BuildRequires:  fish
BuildRequires:  python3
BuildRequires:  python3-xml
BuildRequires:  gpg-offline
BuildRequires:  zip
BuildRequires:  zsh
Requires:       ffmpeg
Requires:       python3
Requires:       python3-xml
BuildArch:      noarch

youtube-dl is a small command-line program to retrieve videos from and a few more sites.

%package        bash-completion
Summary:        Bash completion for %name
Group:          System/Shells
Requires:       bash-completion
Supplements:    packageand(%name:bash)
BuildArch:      noarch

%description    bash-completion
Bash command line completion support for %name.

%if 0%{?is_opensuse}
%package        fish-completion
Summary:        Fish completion for %name
Group:          System/Shells
Requires:       fish
Supplements:    packageand(%name:fish)
BuildArch:      noarch

%description    fish-completion
Fish command line completion support for %name.

%package        zsh-completion
Summary:        Zsh Completion for %name
Group:          System/Shells
Requires:       zsh
Supplements:    packageand(%name:zsh)
BuildArch:      noarch

%description zsh-completion
ZSH command line completion support for %name.

%{?gpg_verify: %gpg_verify %{SOURCE2}}
%setup -qn %name
rm -f youtube-dl

PYTHON=%{_bindir}/python3 make %{?_smp_mflags}

install -D -m 755 youtube-dl %buildroot/%_bindir/%name
install -D -m 644 youtube-dl.bash-completion %buildroot/%_datadir/bash-completion/completions/%name
install -D -m 644 youtube-dl.zsh %buildroot/%_datadir/zsh/site-functions/_%name
%if 0%{?is_opensuse}
install -D -m 644 %buildroot/%_datadir/fish/completions/
install -D -m 644 youtube-dl.1 %buildroot/%_mandir/man1/%name.1

%license LICENSE
%doc README.txt

%files bash-completion

%if 0%{?is_opensuse}
%files fish-completion

%files zsh-completion