File yt-dlp.spec of Package yt-dlp (Revision 92647e0502907589e3699bb500c6acda)
Currently displaying revision 92647e0502907589e3699bb500c6acda , Show latest
117
1
#
2
# spec file for package yt-dlp
3
#
4
# Copyright (c) 2024 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: 2024.08.06
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 hatchling}
39
BuildRequires: %{python_module pip}
40
BuildRequires: fdupes
41
BuildRequires: make >= 4
42
BuildRequires: python-rpm-macros
43
BuildRequires: zip
44
BuildArch: noarch
45
Obsoletes: yt-dlp-bash-completion < %version-%release
46
Provides: yt-dlp-bash-completion = %version-%release
47
Obsoletes: yt-dlp-fish-completion < %version-%release
48
Provides: yt-dlp-fish-completion = %version-%release
49
Obsoletes: yt-dlp-zsh-completion < %version-%release
50
Provides: yt-dlp-zsh-completion = %version-%release
51
# %%primary_python not available in Leap yet
52
Requires: %(echo %{python_module yt-dlp} | perl -pe 's{.* }{}g')
53
%define python_subpackage_only 1
54
%python_subpackages
55
56
%description
57
yt-dlp is a command-line program to retrieve videos from
58
YouTube.com and other video sites for later watching.
59
60
%package -n yt-dlp-youtube-dl
61
Summary: Compat symlinks for youtube-dl
62
Requires: yt-dlp
63
Provides: youtube-dl
64
Conflicts: youtube-dl
65
66
%description -n yt-dlp-youtube-dl
67
This package installs "youtube-dl" as a symlink to yt-dlp.
68
69
%package -n python-yt-dlp
70
Summary: yt-dlp Python library
71
Group: Development/Languages/Python
72
Requires: ffmpeg
73
Suggests: python-Brotli
74
Suggests: python-certifi
75
Suggests: python-mutagen
76
Suggests: python-pycryptodomex
77
Suggests: python-websockets
78
79
%description -n python-yt-dlp
80
The direct Python interface into yt-dlp.
81
82
%prep
83
%autosetup -p1 -n %name
84
85
%build
86
rm -f youtube-dl yt-dlp
87
#
88
# A self-decompressing yt-dlp is built only when python_build is not
89
# exercised; else yt-dlp is a loader.
90
#
91
%pyproject_wheel
92
%make_build yt-dlp
93
94
%install
95
b="%buildroot"
96
%pyproject_install
97
ln -s yt-dlp "$b/%_bindir/youtube-dl"
98
%fdupes %buildroot/usr
99
rm -Rf "$b/%_datadir/doc"
100
101
%files -n yt-dlp
102
%license LICENSE
103
%doc README.md
104
%_bindir/%name
105
%_mandir/man1/%name.1%ext_man
106
%_datadir/bash-completion/
107
%_datadir/fish/
108
%_datadir/zsh/
109
110
%files -n yt-dlp-youtube-dl
111
%_bindir/youtube-dl
112
113
%files %{python_files yt-dlp}
114
%python_sitelib/y*
115
116
%changelog
117