yt-dlp/youtube-dl.spec

70 lines
1.8 KiB
RPMSpec
Raw Normal View History

2018-08-10 15:46:56 +03:00
%define pypi_name youtube_dl
2013-07-04 22:48:15 +11:00
Summary: Small command-line program to download videos from YouTube
Name: youtube-dl
2020-11-03 22:59:56 +03:00
Version: 2020.11.01.1
2019-09-11 22:09:15 +03:00
Release: 1
License: Public Domain and GPLv2+
Group: Video
2020-10-24 05:46:04 +00:00
# https://youtube-dl.org
2017-10-19 23:33:45 +03:00
Url: https://yt-dl.org
2020-11-03 22:59:56 +03:00
#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
2015-01-19 20:50:12 +01:00
BuildRequires: ffmpeg
2017-09-16 15:46:36 +02:00
BuildRequires: gnupg2
2018-08-10 15:46:56 +03:00
BuildRequires: pkgconfig(python3)
BuildRequires: python3egg(setuptools)
2018-07-18 15:10:33 +03:00
BuildRequires: zip
2017-10-19 23:33:45 +03:00
BuildArch: noarch
Requires: python3
2020-01-04 09:41:38 +03:00
Recommends: ffmpeg
2016-01-25 18:56:02 +01:00
%description
2015-08-30 20:13:39 +02:00
Small command-line program to download videos from YouTube and similar sites.
2015-08-30 20:13:39 +02:00
%files
2018-09-26 21:50:41 +03:00
%doc LICENSE README.txt
2015-08-30 20:13:39 +02:00
%{_bindir}/%{name}
2017-09-16 15:46:36 +02:00
%{_datadir}/zsh/site-functions/_%{name}
2019-10-16 00:06:45 +03:00
%{_mandir}/man1/%{name}.1*
2015-08-30 20:13:39 +02:00
%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
%config(noreplace) %{_sysconfdir}/fish/completions/%{name}.fish
#-----------------------------------------------------------------------------
2018-08-10 15:46:56 +03:00
%package -n python3-%{name}
Summary: Python 3 bindings for %{name}
Group: Development/Python
BuildArch: noarch
%description -n python3-%{name}
2018-11-05 20:51:30 +01:00
This package contains the Python 3 bindings for %{name}.
%files -n python3-%{name}
2018-09-26 21:50:41 +03:00
%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
2017-10-19 23:33:45 +03:00
%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