xattr-set-filesize by default
[packages/youtube-dl.git] / youtube-dl.spec
CommitLineData
652733c1 1# full version number as seen on youtube-dl website
9c4c9116 2%define verlong 2017.04.15
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
9c4c9116 19# Source0-md5: c0e550cd3f1ba82c3f115b4cf256b717
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
872960a4 26Requires: python-setuptools
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
e0c61189 32%define zsh_compdir %{_datadir}/zsh/site-functions
b9296b05 33
28341d8e 34%description
35youtube-dl is a small command-line program to download videos from
36YouTube.com.
37
38%description -l pl.UTF-8
39youtube-dl jest programem do ściągania plików video z YouTube.com.
40
97454f03
JB
41%package -n bash-completion-%{name}
42Summary: Bash completion for youtube-dl command
43Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia youtube-dl
44Group: Applications/Shells
9a77a05b 45Requires: %{name} = %{epoch}:%{version}-%{release}
b9296b05 46Requires: bash-completion >= 2.0
97454f03
JB
47
48%description -n bash-completion-%{name}
49Bash completion for youtube-dl command.
50
51%description -n bash-completion-%{name} -l pl.UTF-8
52Bashowe dopełnianie parametrów polecenia youtube-dl.
53
cd179393
JP
54%package -n fish-completion-%{name}
55Summary: Fish completion for youtube-dl command
56Summary(pl.UTF-8): Dopełnianie parametrów w fish dla polecenia youtube-dl
57Group: Applications/Shells
58Requires: %{name} = %{epoch}:%{version}-%{release}
59Requires: fish
60
61%description -n fish-completion-%{name}
62Fish completion for youtube-dl command.
63
64%description -n fish-completion-%{name} -l pl.UTF-8
65Dopełnianie parametrów w fish dla polecenia youtube-dl.
66
e0c61189
JP
67%package -n zsh-completion-%{name}
68Summary: Zsh completion for youtube-dl command
69Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla polecenia youtube-dl
70Group: Applications/Shells
71Requires: %{name} = %{epoch}:%{version}-%{release}
72Requires: zsh
73
74%description -n zsh-completion-%{name}
75Zsh completion for youtube-dl command.
76
77%description -n zsh-completion-%{name} -l pl.UTF-8
78Dopełnianie parametrów w zsh dla polecenia youtube-dl.
79
28341d8e 80%prep
58a481cb
ER
81%setup -qc
82mv %{name} .tmp; mv .tmp/* .
48cee41a
AM
83
84%build
8212b4a0 85%py_build
28341d8e 86
28341d8e 87%install
88rm -rf $RPM_BUILD_ROOT
8212b4a0 89%py_install
58a481cb
ER
90%py_postclean
91
3ff34f8f
ER
92install -d $RPM_BUILD_ROOT%{_sysconfdir}
93cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
94
e0c61189 95install -d $RPM_BUILD_ROOT{%{bash_compdir},%{fish_compdir},%{zsh_compdir}}
b9296b05
ER
96%{__mv} $RPM_BUILD_ROOT%{_prefix}/etc/bash_completion.d/youtube-dl.bash-completion \
97 $RPM_BUILD_ROOT%{bash_compdir}/%{name}
cd179393
JP
98%{__mv} $RPM_BUILD_ROOT%{_prefix}/etc/fish/completions/youtube-dl.fish \
99 $RPM_BUILD_ROOT%{fish_compdir}/%{name}.fish
e0c61189 100cp -p youtube-dl.zsh $RPM_BUILD_ROOT%{zsh_compdir}/_youtube-dl
58a481cb 101%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/youtube_dl
28341d8e 102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%files
107%defattr(644,root,root,755)
4c1746c0 108%doc README.md LICENSE
3ff34f8f 109%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/youtube-dl.conf
28341d8e 110%attr(755,root,root) %{_bindir}/youtube-dl
58a481cb
ER
111%{_mandir}/man1/youtube-dl.1*
112%{py_sitescriptdir}/youtube_dl
3ff34f8f 113%{py_sitescriptdir}/youtube_dl-*-py*.egg-info
97454f03
JB
114
115%files -n bash-completion-%{name}
116%defattr(644,root,root,755)
b9296b05 117%{bash_compdir}/%{name}
cd179393
JP
118
119%files -n fish-completion-%{name}
120%defattr(644,root,root,755)
121%{fish_compdir}/%{name}.fish
e0c61189
JP
122
123%files -n zsh-completion-%{name}
124%defattr(644,root,root,755)
125%{zsh_compdir}/_youtube-dl
This page took 0.297905 seconds and 4 git commands to generate.