up to 2015.04.17
[packages/youtube-dl.git] / youtube-dl.spec
CommitLineData
652733c1 1# full version number as seen on youtube-dl website
a42524a3 2%define verlong 2015.04.17
ffca9320
ER
3
4# transform version so we don't have to bump epoch after four digit upgrades:
5# 2013.01.17.1 becomes 20130117_1
6# 2013.01.28 becomes 20130128
7# $ rpmvercmp 20130117_1 20130128
8# 20130117_1 < 20130128
9%define ver %(echo %{verlong} | awk -F. 'NF == 3 {printf("%d%d%d", $1, $2, $3)} NF == 4 {printf("%d%d%d_%d", $1, $2, $3, $4)}')
28341d8e 10Summary: Video extraction utility for YouTube
11Summary(pl.UTF-8): Narzędzie do wydobywania filmów z YouTube
12Name: youtube-dl
652733c1 13Version: %{ver}
4c1746c0 14Release: 1
652733c1 15Epoch: 2
ae11d3cf 16License: Public Domain
28341d8e 17Group: Applications/System
652733c1 18Source0: http://youtube-dl.org/downloads/%{verlong}/%{name}-%{verlong}.tar.gz
a42524a3 19# Source0-md5: 42324b60cdcaf818c26ce9e4d3d0ea43
3ff34f8f 20Source1: %{name}.conf
9f1b4a7d 21URL: http://youtube-dl.org/
6715ceef 22BuildRequires: python-distribute
28341d8e 23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.219
c24ed57f 25Requires: python-distribute
d70b68ae 26Requires: python-pyxattr
28341d8e 27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
b9296b05 30%define bash_compdir %{_datadir}/bash-completion/completions
cd179393 31%define fish_compdir %{_datadir}/fish/completions
b9296b05 32
28341d8e 33%description
34youtube-dl is a small command-line program to download videos from
35YouTube.com.
36
37%description -l pl.UTF-8
38youtube-dl jest programem do ściągania plików video z YouTube.com.
39
97454f03
JB
40%package -n bash-completion-%{name}
41Summary: Bash completion for youtube-dl command
42Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia youtube-dl
43Group: Applications/Shells
9a77a05b 44Requires: %{name} = %{epoch}:%{version}-%{release}
b9296b05 45Requires: bash-completion >= 2.0
97454f03
JB
46
47%description -n bash-completion-%{name}
48Bash completion for youtube-dl command.
49
50%description -n bash-completion-%{name} -l pl.UTF-8
51Bashowe dopełnianie parametrów polecenia youtube-dl.
52
cd179393
JP
53%package -n fish-completion-%{name}
54Summary: Fish completion for youtube-dl command
55Summary(pl.UTF-8): Dopełnianie parametrów w fish dla polecenia youtube-dl
56Group: Applications/Shells
57Requires: %{name} = %{epoch}:%{version}-%{release}
58Requires: fish
59
60%description -n fish-completion-%{name}
61Fish completion for youtube-dl command.
62
63%description -n fish-completion-%{name} -l pl.UTF-8
64Dopełnianie parametrów w fish dla polecenia youtube-dl.
65
28341d8e 66%prep
58a481cb
ER
67%setup -qc
68mv %{name} .tmp; mv .tmp/* .
48cee41a
AM
69
70%build
58a481cb 71%{__python} setup.py build
28341d8e 72
28341d8e 73%install
74rm -rf $RPM_BUILD_ROOT
75install -d $RPM_BUILD_ROOT%{_bindir}
58a481cb
ER
76%{__python} setup.py install \
77 --skip-build \
78 --optimize=2 \
79 --root=$RPM_BUILD_ROOT
80
81%py_postclean
82
3ff34f8f
ER
83install -d $RPM_BUILD_ROOT%{_sysconfdir}
84cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
85
cd179393 86install -d $RPM_BUILD_ROOT{%{bash_compdir},%{fish_compdir}}
b9296b05
ER
87%{__mv} $RPM_BUILD_ROOT%{_prefix}/etc/bash_completion.d/youtube-dl.bash-completion \
88 $RPM_BUILD_ROOT%{bash_compdir}/%{name}
cd179393
JP
89%{__mv} $RPM_BUILD_ROOT%{_prefix}/etc/fish/completions/youtube-dl.fish \
90 $RPM_BUILD_ROOT%{fish_compdir}/%{name}.fish
58a481cb 91%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/youtube_dl
28341d8e 92
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%files
97%defattr(644,root,root,755)
4c1746c0 98%doc README.md LICENSE
3ff34f8f 99%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/youtube-dl.conf
28341d8e 100%attr(755,root,root) %{_bindir}/youtube-dl
58a481cb
ER
101%{_mandir}/man1/youtube-dl.1*
102%{py_sitescriptdir}/youtube_dl
3ff34f8f 103%{py_sitescriptdir}/youtube_dl-*-py*.egg-info
97454f03
JB
104
105%files -n bash-completion-%{name}
106%defattr(644,root,root,755)
b9296b05 107%{bash_compdir}/%{name}
cd179393
JP
108
109%files -n fish-completion-%{name}
110%defattr(644,root,root,755)
111%{fish_compdir}/%{name}.fish
This page took 0.332549 seconds and 4 git commands to generate.