mirror of
https://abf.rosa.ru/djam/yt-dlp.git
synced 2025-02-23 15:22:53 +00:00
69 lines
1.8 KiB
RPMSpec
69 lines
1.8 KiB
RPMSpec
%define pypi_name youtube_dl
|
|
|
|
Summary: Small command-line program to download videos from YouTube
|
|
Name: youtube-dl
|
|
Version: 2020.11.01.1
|
|
Release: 1
|
|
License: Public Domain and GPLv2+
|
|
Group: Video
|
|
# https://youtube-dl.org
|
|
Url: https://yt-dl.org
|
|
#Source0: https://github.com/rg3/youtube-dl/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
Source0: https://youtube-dl.org/downloads/latest/youtube-dl-%{version}.tar.gz
|
|
BuildRequires: ffmpeg
|
|
BuildRequires: gnupg2
|
|
BuildRequires: pkgconfig(python3)
|
|
BuildRequires: python3egg(setuptools)
|
|
BuildRequires: zip
|
|
BuildArch: noarch
|
|
Requires: python3
|
|
Recommends: ffmpeg
|
|
|
|
%description
|
|
Small command-line program to download videos from YouTube and similar sites.
|
|
|
|
%files
|
|
%doc LICENSE README.txt
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/zsh/site-functions/_%{name}
|
|
%{_mandir}/man1/%{name}.1*
|
|
%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
|
|
%config(noreplace) %{_sysconfdir}/fish/completions/%{name}.fish
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
%package -n python3-%{name}
|
|
Summary: Python 3 bindings for %{name}
|
|
Group: Development/Python
|
|
BuildArch: noarch
|
|
|
|
%description -n python3-%{name}
|
|
This package contains the Python 3 bindings for %{name}.
|
|
|
|
%files -n python3-%{name}
|
|
%doc LICENSE README.txt
|
|
%{py3_puresitedir}/%{pypi_name}
|
|
%{py3_puresitedir}/%{pypi_name}-*-py%{py3_ver}.egg-info
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qn %{name}
|
|
rm youtube-dl
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
|
|
%makeinstall \
|
|
DESTDIR=%{buildroot} \
|
|
PREFIX=%{_prefix} \
|
|
MANDIR=%{_mandir}
|
|
|
|
# force the youtube-dl binary to use python 3 environment by default
|
|
sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' %{buildroot}%{_bindir}/%{name}
|
|
|
|
rm -rf %{buildroot}%{_prefix}/etc
|
|
rm -f %{buildroot}%{_datadir}/doc/youtube_dl/README.txt
|