- up to 20130306
[packages/youtube-dl.git] / youtube-dl.spec
CommitLineData
652733c1 1# full version number as seen on youtube-dl website
74b9956f 2%define verlong 2016.03.06
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
bee68788 9%define ver %(echo %{verlong} | awk -F. 'NF == 3 {printf("%s%s%s", $1, $2, $3)} NF == 4 {printf("%s%s%s_%s", $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}
a3268abd 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
74b9956f 19# Source0-md5: 16f2b337c9adcec228c15a24c3dbc6b0
3ff34f8f 20Source1: %{name}.conf
9f1b4a7d 21URL: http://youtube-dl.org/
5f5c6c14 22BuildRequires: python-setuptools
28341d8e 23BuildRequires: rpm-pythonprov
8212b4a0 24BuildRequires: rpmbuild(macros) >= 1.713
cd3037f4 25Requires: python-pyxattr >= 0.5.0
28341d8e 26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
b9296b05 29%define bash_compdir %{_datadir}/bash-completion/completions
cd179393 30%define fish_compdir %{_datadir}/fish/completions
b9296b05 31
28341d8e 32%description
33youtube-dl is a small command-line program to download videos from
34YouTube.com.
35
36%description -l pl.UTF-8
37youtube-dl jest programem do ściągania plików video z YouTube.com.
38
97454f03
JB
39%package -n bash-completion-%{name}
40Summary: Bash completion for youtube-dl command
41Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia youtube-dl
42Group: Applications/Shells
9a77a05b 43Requires: %{name} = %{epoch}:%{version}-%{release}
b9296b05 44Requires: bash-completion >= 2.0
97454f03
JB
45
46%description -n bash-completion-%{name}
47Bash completion for youtube-dl command.
48
49%description -n bash-completion-%{name} -l pl.UTF-8
50Bashowe dopełnianie parametrów polecenia youtube-dl.
51
cd179393
JP
52%package -n fish-completion-%{name}
53Summary: Fish completion for youtube-dl command
54Summary(pl.UTF-8): Dopełnianie parametrów w fish dla polecenia youtube-dl
55Group: Applications/Shells
56Requires: %{name} = %{epoch}:%{version}-%{release}
57Requires: fish
58
59%description -n fish-completion-%{name}
60Fish completion for youtube-dl command.
61
62%description -n fish-completion-%{name} -l pl.UTF-8
63Dopełnianie parametrów w fish dla polecenia youtube-dl.
64
28341d8e 65%prep
58a481cb
ER
66%setup -qc
67mv %{name} .tmp; mv .tmp/* .
48cee41a
AM
68
69%build
8212b4a0 70%py_build
28341d8e 71
28341d8e 72%install
73rm -rf $RPM_BUILD_ROOT
8212b4a0 74%py_install
58a481cb
ER
75%py_postclean
76
3ff34f8f
ER
77install -d $RPM_BUILD_ROOT%{_sysconfdir}
78cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
79
cd179393 80install -d $RPM_BUILD_ROOT{%{bash_compdir},%{fish_compdir}}
b9296b05
ER
81%{__mv} $RPM_BUILD_ROOT%{_prefix}/etc/bash_completion.d/youtube-dl.bash-completion \
82 $RPM_BUILD_ROOT%{bash_compdir}/%{name}
cd179393
JP
83%{__mv} $RPM_BUILD_ROOT%{_prefix}/etc/fish/completions/youtube-dl.fish \
84 $RPM_BUILD_ROOT%{fish_compdir}/%{name}.fish
58a481cb 85%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/youtube_dl
28341d8e 86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%files
91%defattr(644,root,root,755)
4c1746c0 92%doc README.md LICENSE
3ff34f8f 93%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/youtube-dl.conf
28341d8e 94%attr(755,root,root) %{_bindir}/youtube-dl
58a481cb
ER
95%{_mandir}/man1/youtube-dl.1*
96%{py_sitescriptdir}/youtube_dl
3ff34f8f 97%{py_sitescriptdir}/youtube_dl-*-py*.egg-info
97454f03
JB
98
99%files -n bash-completion-%{name}
100%defattr(644,root,root,755)
b9296b05 101%{bash_compdir}/%{name}
cd179393
JP
102
103%files -n fish-completion-%{name}
104%defattr(644,root,root,755)
105%{fish_compdir}/%{name}.fish
This page took 0.446279 seconds and 4 git commands to generate.