yt-dlp/youtube-dl.spec

97 lines
2.4 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
2018-09-05 14:26:28 +03:00
Version: 2018.09.01
2018-08-10 15:46:56 +03:00
Release: 1
License: Public Domain and GPLv2+
Group: Video
2017-10-19 23:33:45 +03:00
Url: https://yt-dl.org
Source0: https://github.com/rg3/youtube-dl/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/rg3/youtube-dl/releases/download/%{version}/%{name}-%{version}.tar.gz.sig
2016-01-08 21:50:36 +01:00
# For tests
2015-01-19 20:50:12 +01:00
BuildRequires: ffmpeg
2017-09-16 15:46:36 +02:00
BuildRequires: gnupg2
BuildRequires: pythonegg(nose)
BuildRequires: pythonegg(setuptools)
2018-08-10 15:46:56 +03:00
BuildRequires: pkgconfig(python2)
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
2015-01-19 20:50:12 +01:00
Suggests: 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
%doc LICENSE README.txt
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
2017-09-16 15:46:36 +02:00
%{_datadir}/zsh/site-functions/_%{name}
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 python2-%{name}
Summary: Python 2 bindings for %{name}
Group: Development/Python
BuildArch: noarch
Provides: python-%{name}
%description -n python2-%{name}
This is the Python 2 bindings for %{name}.
%files -n python2-%{name}
%{py_puresitedir}/%{pypi_name}
%{py_puresitedir}/%{pypi_name}-*-py%{py_ver}.egg-info
#-----------------------------------------------------------------------------
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}
This is the Python 3 bindings for %{name}.
%files -n python3-%{name}
%{py3_puresitedir}/%{pypi_name}
%{py3_puresitedir}/%{pypi_name}-*-py%{py3_ver}.egg-info
#-----------------------------------------------------------------------------
%prep
%setup -qn %{name}
rm youtube-dl
cp -a . %{py3dir}
%build
%py2_build
pushd %{py3dir}
%py3_build
popd
%install
%py2_install
pushd %{py3dir}
%py3_install
popd
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