File yt-dlp.spec of Package yt-dlp (Revision 8245cca3dc027035c2c3e2427f4080f7)
Currently displaying revision 8245cca3dc027035c2c3e2427f4080f7 , Show latest
130
1
#
2
# spec file for package yt-dlp
3
#
4
# Copyright (c) 2023 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
%define skip_python2 1
20
%define skip_python36 1
21
%define skip_python37 1
22
# For SLE-15-SP4, this would otherwise build against
23
# python3.6, which is not supported any more.
24
%if 0%{?sle_version} == 150400
25
#%%define skip_python3 1
26
%global pythons python310
27
%else
28
%{?sle15_python_module_pythons}
29
%endif
30
Name: yt-dlp
31
Version: 2023.11.16
32
Release: 0
33
Summary: Enhanced fork of youtube-dl, a video site downloader for offline watching
34
License: CC-BY-SA-3.0 AND SUSE-Public-Domain
35
Group: Productivity/Networking/Web/Utilities
36
URL: https://github.com/yt-dlp/yt-dlp
37
Source: https://github.com/yt-dlp/yt-dlp/releases/download/%version/yt-dlp.tar.gz
38
BuildRequires: %{python_module setuptools}
39
BuildRequires: fdupes
40
BuildRequires: make >= 4
41
BuildRequires: python-rpm-macros
42
BuildRequires: zip
43
BuildArch: noarch
44
# %%primary_python not available in Leap yet
45
Requires: %(echo %{python_module yt-dlp} | perl -pe 's{.* }{}g')
46
%define python_subpackage_only 1
47
%python_subpackages
48
49
%description
50
yt-dlp is a command-line program to retrieve videos from
51
YouTube.com and other video sites for later watching.
52
53
%package -n yt-dlp-bash-completion
54
Summary: Bash completion for yt-dlp
55
Group: System/Shells
56
Requires: bash-completion
57
Supplements: (yt-dlp and bash-completion)
58
59
%description -n yt-dlp-bash-completion
60
Bash command line completion support for yt-dlp.
61
62
%package -n yt-dlp-fish-completion
63
Summary: Fish completion for yt-dlp
64
Group: System/Shells
65
Requires: fish
66
Supplements: (yt-dlp and fish)
67
68
%description -n yt-dlp-fish-completion
69
Fish command line completion support for yt-dlp.
70
71
%package -n yt-dlp-zsh-completion
72
Summary: Zsh Completion for yt-dlp
73
Group: System/Shells
74
Requires: zsh
75
Supplements: (yt-dlp and zsh)
76
77
%description -n yt-dlp-zsh-completion
78
ZSH command line completion support for yt-dlp.
79
80
%package -n python-yt-dlp
81
Summary: yt-dlp Python library
82
Group: Development/Languages/Python
83
Requires: ffmpeg
84
Suggests: python-Brotli
85
Suggests: python-certifi
86
Suggests: python-mutagen
87
Suggests: python-pycryptodomex
88
Suggests: python-websockets
89
90
%description -n python-yt-dlp
91
The direct Python interface into yt-dlp.
92
93
%prep
94
%autosetup -p1 -n %name
95
96
%build
97
rm -f youtube-dl yt-dlp
98
#
99
# A self-decompressing yt-dlp is built only when python_build is not
100
# exercised; else yt-dlp is a loader.
101
#
102
%python_build
103
%make_build yt-dlp
104
105
%install
106
b="%buildroot"
107
%python_install
108
%fdupes %buildroot/usr
109
rm -Rf "$b/%_datadir/doc"
110
111
%files -n yt-dlp
112
%license LICENSE
113
%doc README.md
114
%_bindir/%name
115
%_mandir/man1/%name.1%ext_man
116
117
%files -n yt-dlp-bash-completion
118
%_datadir/bash-completion/
119
120
%files -n yt-dlp-fish-completion
121
%_datadir/fish/
122
123
%files -n yt-dlp-zsh-completion
124
%_datadir/zsh/
125
126
%files %{python_files yt-dlp}
127
%python_sitelib/y*
128
129
%changelog
130