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