2021-10-16 10:55:29 +03:00
|
|
|
# gi-find-deps.sh is very slow but is not needed here, it may be installed locally
|
|
|
|
%define __typelib_path %{nil}
|
|
|
|
|
|
|
|
Summary: Small command-line program to download videos and audio from different websites
|
|
|
|
Name: yt-dlp
|
2024-01-15 13:11:39 +00:00
|
|
|
Version: 2023.12.30
|
2023-07-08 00:52:52 +03:00
|
|
|
Release: 1
|
2021-10-16 10:55:29 +03:00
|
|
|
License: Public Domain and GPLv2+
|
|
|
|
Group: Video
|
2024-01-21 23:46:30 +00:00
|
|
|
URL: https://github.com/yt-dlp/yt-dlp
|
2022-02-11 19:03:53 +03:00
|
|
|
# pure source from Github requires at least pandoc which is not packaged
|
|
|
|
Source0: https://github.com/yt-dlp/yt-dlp/releases/download/%{version}/yt-dlp.tar.gz?/yt-dlp-%{version}.tar.gz
|
2023-02-12 14:41:21 +01:00
|
|
|
Source100: yt-dlp.1
|
|
|
|
|
2021-10-16 10:55:29 +03:00
|
|
|
BuildRequires: ffmpeg
|
|
|
|
BuildRequires: gnupg2
|
2024-01-21 23:46:30 +00:00
|
|
|
BuildRequires: python38-devel
|
|
|
|
BuildRequires: python38-setuptools
|
2024-01-23 23:30:56 +00:00
|
|
|
BuildRequires: python38-brotlicffi
|
2024-01-28 20:44:11 +00:00
|
|
|
BuildRequires: python38-urllib3 >= 1.26.17
|
2024-01-30 11:59:46 +00:00
|
|
|
BuildRequires: python38-pycryptodomex
|
2021-10-16 10:55:29 +03:00
|
|
|
BuildRequires: zip
|
2023-02-12 14:41:21 +01:00
|
|
|
|
2021-10-16 10:55:29 +03:00
|
|
|
Recommends: ffmpeg
|
2023-02-12 14:41:21 +01:00
|
|
|
|
2021-10-16 10:55:29 +03:00
|
|
|
# youtube-dl is not developed anymore, it is a fork of it
|
|
|
|
Obsoletes: youtube-dl < 2021.10.10
|
2023-02-12 14:41:21 +01:00
|
|
|
|
2021-10-16 10:55:29 +03:00
|
|
|
Provides: youtube-dl = %{EVRD}
|
|
|
|
|
2023-02-12 14:41:21 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2021-10-16 10:55:29 +03:00
|
|
|
%description
|
2024-01-21 23:46:30 +00:00
|
|
|
Small command-line program to download videos and audio from
|
|
|
|
different websites.
|
2021-10-16 10:55:29 +03:00
|
|
|
Fork of youtube-dl.
|
|
|
|
|
|
|
|
%files
|
2024-01-21 23:46:30 +00:00
|
|
|
%doc README.* LICENSE
|
2021-10-16 10:55:29 +03:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_bindir}/youtube-dl
|
|
|
|
%{_datadir}/zsh/site-functions/_%{name}
|
|
|
|
%{_mandir}/man1/%{name}.1*
|
|
|
|
%{_datadir}/bash-completion/completions/%{name}
|
|
|
|
%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2024-01-21 23:46:30 +00:00
|
|
|
%package -n python38-%{name}
|
2021-10-16 10:55:29 +03:00
|
|
|
Summary: Python 3 bindings for %{name}
|
|
|
|
Group: Development/Python
|
|
|
|
BuildArch: noarch
|
2024-01-30 21:09:03 +00:00
|
|
|
Requires: python38-%{name} = %{EVRD}
|
|
|
|
Requires: python38-pycryptodomex
|
2021-10-16 10:55:29 +03:00
|
|
|
|
2024-01-21 23:46:30 +00:00
|
|
|
%description -n python38-%{name}
|
|
|
|
This package contains the Python 3 bindings for %{name}
|
|
|
|
(fork of youtube-dl)
|
2021-10-16 10:55:29 +03:00
|
|
|
|
2024-01-21 23:46:30 +00:00
|
|
|
%files -n python38-%{name}
|
|
|
|
%doc README.* LICENSE
|
|
|
|
%{python38_sitelib}/yt_dlp
|
|
|
|
%{python38_sitelib}/yt_dlp-*-py%{py38_ver}.egg-info
|
2021-10-16 10:55:29 +03:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%prep
|
2024-01-21 23:46:30 +00:00
|
|
|
%setup -qn %{name}
|
2021-10-16 10:55:29 +03:00
|
|
|
|
|
|
|
%build
|
2023-02-12 14:41:21 +01:00
|
|
|
# include completions
|
|
|
|
make completion-bash completion-zsh completion-fish
|
2024-01-21 23:46:30 +00:00
|
|
|
%py38_build
|
2021-10-16 10:55:29 +03:00
|
|
|
|
|
|
|
%install
|
2024-01-21 23:46:30 +00:00
|
|
|
%py38_install
|
2021-10-16 10:55:29 +03:00
|
|
|
|
|
|
|
# force the binary to use python 3 environment by default
|
2024-01-30 21:09:03 +00:00
|
|
|
#sed -i -e 's,#!/usr/bin/env python,#!%{__python3},' %{buildroot}%{_bindir}/%{name}
|
2021-10-16 10:55:29 +03:00
|
|
|
|
|
|
|
# installed as %%doc into standard location
|
2023-07-08 00:52:52 +03:00
|
|
|
rm -fvr %{buildroot}%{_datadir}/doc
|
2021-10-16 10:55:29 +03:00
|
|
|
|
|
|
|
# compat symlink (e.g. mpv can use youtube-dl, but it is not developed anymore)
|
|
|
|
( cd %{buildroot}%{_bindir} && ln -s %{name} youtube-dl )
|
2023-02-12 14:41:21 +01:00
|
|
|
|
|
|
|
# fix permits
|
|
|
|
pushd %{buildroot}%{_bindir}
|
|
|
|
chmod a+rx yt-dlp youtube-dl
|
|
|
|
popd
|
|
|
|
|
|
|
|
# external man since we don't have pandoc
|
|
|
|
install -m644 %{SOURCE100} %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
|
|
|