1b9b803
%if 0%{?rhel} && 0%{?rhel} < 7
1b9b803
%bcond_with python3
1b9b803
%else
1b9b803
%bcond_without python3
1b9b803
%endif
1b9b803
1b9b803
%if ! %{with python3}
85645d1
%{!?__python2: %global __python2 /usr/bin/python2}
85645d1
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
85645d1
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
85645d1
%{!?__python2: %global __python2 /usr/bin/python2}
85645d1
%endif
85645d1
Krzysztof Kurzawski 992376b
Name:           youtube-dl
5e70e9f
Version:        2018.11.07
530ce6a
Release:        1%{?dist}
root e133e75
Summary:        A small command-line program to download online videos
85645d1
License:        Unlicense
Koji 71a4179
URL:            https://yt-dl.org
657db03
Source0:        https://github.com/rg3/youtube-dl/releases/download/%{version}/youtube-dl-%{version}.tar.gz
657db03
Source1:        https://github.com/rg3/youtube-dl/releases/download/%{version}/youtube-dl-%{version}.tar.gz.sig
b42e8a7
# 2016-06-09:
b42e8a7
# Merged GPG keys from https://rg3.github.io/youtube-dl/download.html in one file
b42e8a7
# gpg --export  --export-options export-minimal "428D F5D6 3EF0 7494 BB45 5AC0 EBF0 1804 BCF0 5F6B" \
b42e8a7
# "ED7F 5BF4 6B3B BED8 1C87 368E 2C39 3E0F 18A9 236D" \
b42e8a7
# "7D33 D762 FD6C 3513 0481 347F DB4B 54CB A482 6A18" > youtube-dl-gpgkeys.gpg
b42e8a7
Source2:        youtube-dl-gpgkeys.gpg
9a0da09
Source3:        %{name}.conf
1b9b803
%if %{with python3}
1b9b803
BuildRequires:  python%{python3_pkgversion}-devel
4c6bd1d
%else
4c6bd1d
BuildRequires:  python2-devel
4c6bd1d
%endif
Koji 71a4179
# Tests failed because of no connection in Koji.
Christopher Meng 801bd70
# BuildRequires:  python-nose
Koji 983ef37
BuildArch:      noarch
9a0da09
# For source verification with gpgv
d71a36c
BuildRequires:  gnupg2
Krzysztof Kurzawski 992376b
0b9d8b2
Krzysztof Kurzawski 992376b
%description
root e133e75
Small command-line program to download videos from YouTube and other sites.
Krzysztof Kurzawski 992376b
0b9d8b2
Krzysztof Kurzawski 992376b
%prep
df92e2c
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
root e133e75
%setup -qn %{name}
2145153
5766e33
# remove pre-built file
5766e33
rm youtube-dl
5766e33
b978157
cp -a setup.py setup.py.installpath
b978157
# Remove files that are installed to the wrong path
b978157
sed -i '/youtube-dl.bash-completion/d' setup.py
b978157
sed -i '/youtube-dl.fish/d' setup.py
b978157
sed -i '/README.txt/d' setup.py
b978157
0f721ee
# Remove interpreter shebang from module files.
0f721ee
find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {} +
0b9d8b2
Krzysztof Kurzawski 992376b
%build
1b9b803
%if %{with python3}
7bf943f
%py3_build
4c6bd1d
%else
7bf943f
%py2_build
4c6bd1d
%endif
Krzysztof Kurzawski 992376b
0b9d8b2
Krzysztof Kurzawski 992376b
%install
1b9b803
%if %{with python3}
7bf943f
%py3_install
4c6bd1d
%else
7bf943f
%py2_install
4c6bd1d
%endif
b978157
Christopher Meng c3bfaae
mkdir -p %{buildroot}%{_sysconfdir}
9a0da09
install -pm644 %{S:3} %{buildroot}%{_sysconfdir}
17468b8
%if 0%{?fedora}
7bf943f
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
7bf943f
install -pm644 youtube-dl.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/youtube-dl
7bf943f
%else
b978157
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
b978157
install -pm644 youtube-dl.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/youtube-dl
7bf943f
%endif
b978157
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions/
b978157
install -pm644 youtube-dl.zsh %{buildroot}%{_datadir}/zsh/site-functions/_youtube-dl
root e133e75
0b9d8b2
root e133e75
%check
ac36624
# This basically cannot work without massive .flake8rc
ac36624
# starts with flake8 and of course no contributors bothered to make
ac36624
# their code truly PEP8 compliant.
ac36624
#
ac36624
# make offlinetest
Krzysztof Kurzawski 992376b
0b9d8b2
Krzysztof Kurzawski 992376b
%files
cf4c22a
%doc README.md
1b9b803
%if %{with python3}
4c6bd1d
%{python3_sitelib}/youtube_dl/
4c6bd1d
%{python3_sitelib}/youtube_dl*.egg-info
85645d1
%else
4c6bd1d
%{python2_sitelib}/youtube_dl/
4c6bd1d
%{python2_sitelib}/youtube_dl*.egg-info
85645d1
%endif
4c6bd1d
%license LICENSE
Krzysztof Kurzawski 992376b
%{_bindir}/%{name}
2145153
%{_mandir}/man1/%{name}.1*
218cfb1
%config(noreplace) %{_sysconfdir}/%{name}.conf
17468b8
%if 0%{?fedora}
7bf943f
%{_datadir}/bash-completion/completions/%{name}
7bf943f
%else
2145153
%{_sysconfdir}/bash_completion.d/%{name}
7bf943f
%endif
9a0da09
%{_datadir}/zsh/site-functions/_youtube-dl
Krzysztof Kurzawski 992376b
0b9d8b2
Krzysztof Kurzawski 992376b
%changelog
06a4379
* Sun Sep 30 2018 Matěj Cepl <mcepl@cepl.eu> - 2018.09.26-1
06a4379
- Update to the latest upstream release.
06a4379
ba58a9d
* Sat Sep 08 2018 Matěj Cepl <mcepl@suse.com> - 2018.09.08-1
ba58a9d
- Update to the latest upstream release.
ba58a9d
530ce6a
* Sat Aug 18 2018 Matěj Cepl <mcepl@suse.com> - 2018.08.04-1
530ce6a
- Update to the latest release.
530ce6a
844b406
* Mon Jul 23 2018 Matěj Cepl <mcepl@redhat.com> - 2018.07.21-2
844b406
- Add youtube-dl-2018.07.21-ceskatelevize-https.patch to workaround
844b406
  (badly) around https://github.com/rg3/youtube-dl/issues/16307
844b406
d57cabf
* Sat Jul 21 2018 Matěj Cepl <mcepl@redhat.com> - 2018.07.21-1
d57cabf
- Update to the latest release.
d57cabf
c1e6b65
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2018.05.18-3
c1e6b65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
c1e6b65
b3e9e30
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2018.05.18-2
b3e9e30
- Rebuilt for Python 3.7
b3e9e30
e83c36a
* Fri May 25 2018 Matěj Cepl <mcepl@redhat.com> - 2018.05.18-1
e83c36a
- Update to the latest release.
e83c36a
1dad347
* Tue Apr 24 2018 Matěj Cepl <mcepl@redhat.com> - 2018.04.16-1
1dad347
- Update to the latest release.
1dad347
1b9b803
* Mon Mar 26 2018 Matěj Cepl <mcepl@redhat.com> - 2018.03.26.1-1
1b9b803
- Use Python 3 for EPEL-7.
1b9b803
405b00f
* Wed Mar 14 2018 Matěj Cepl <mcepl@redhat.com> - 2018.03.10-1
405b00f
- Update to the latest release.
405b00f
da15f6e
* Tue Feb 27 2018 Matěj Cepl <mcepl@redhat.com> - 2018.02.26-1
da15f6e
- Update to the latest release.
da15f6e
0f721ee
* Fri Feb 09 2018 Matěj Cepl <mcepl@redhat.com> - 2018.02.08-2
0f721ee
- Remove hardcoded-library-path (#1539993)
0f721ee
8af3789
* Fri Feb 09 2018 Matěj Cepl <mcepl@redhat.com> - 2018.02.08-1
8af3789
- Update to the latest release.
8af3789
5902f50
* Tue Jan 23 2018 Matěj Cepl <mcepl@redhat.com> - 2018.01.21-1
5902f50
- Update to the latest release.
5902f50
90355e0
* Thu Dec 28 2017 Matěj Cepl <mcepl@redhat.com> - 2017.12.23-1
90355e0
- Update to latest release
90355e0
b89c03f
* Wed Dec 13 2017 Matěj Cepl <mcepl@redhat.com> - 2017.12.10-1
b89c03f
- Update to latest release
b89c03f
a2b4951
* Sat Nov 25 2017 Matěj Cepl <mcepl@redhat.com> - 2017.11.15-1
a2b4951
- Update to latest release
a2b4951
ea7978e
* Tue Nov 07 2017 Matěj Cepl <mcepl@redhat.com> - 2017.11.06-1
ea7978e
- Update to latest release
ea7978e
d8f512b
* Thu Oct 19 2017 Matěj Cepl <mcepl@redhat.com> - 2017.10.15.1-1
d8f512b
- Update to latest release
d8f512b
946eeb8
* Mon Oct 02 2017 Till Maas <opensource@till.name> - 2017.10.01-1
946eeb8
- Update to latest release
946eeb8
aa19b42
* Sat Sep 23 2017 Matěj Cepl <mcepl@redhat.com> - 2017.09.15-1
aa19b42
- Update to latest release.
aa19b42
3dd333f
* Sat Sep 02 2017 Matěj Cepl <mcepl@redhat.com> - 2017.09.02-1
3dd333f
- Update to latest release.
3dd333f
657db03
* Thu Aug 31 2017 Till Maas <opensource@till.name> - 2017.08.23-2
657db03
- Manually follow redirect for source URLs to please rpmlint (#1414964)
657db03
526b037
* Fri Aug 25 2017 Matěj Cepl <mcepl@redhat.com> - 2017.08.23-1
526b037
- Update to latest release.
526b037
9751e02
* Wed Aug 16 2017 Matěj Cepl <mcepl@redhat.com> - 2017.08.13-1
9751e02
- Update to latest release.
9751e02
6a305b7
* Sat Jul 29 2017 Matěj Cepl <mcepl@redhat.com> - 2017.07.23-1
6a305b7
- Update to latest release.
6a305b7
60be2fd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2017.07.09-2
60be2fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
60be2fd
d176dc8
* Fri Jul 14 2017 Matěj Cepl <mcepl@redhat.com> - 2017.07.09-1
d176dc8
- Update to latest release.
d176dc8
b993102
* Wed Jun 28 2017 Matěj Cepl <mcepl@redhat.com> - 2017.06.25-1
b993102
- Update to latest release.
b993102
f004895
* Sat Jun 03 2017 Matěj Cepl <mcepl@redhat.com> - 2017.05.29-1
f004895
- Update to latest release.
f004895
81130d2
* Thu May 18 2017 Matěj Cepl <mcepl@redhat.com> - 2017.05.18.1-1
81130d2
- Update to latest release.
81130d2
a8ba7ff
* Thu May 18 2017 Gwyn Ciesla <limburgher@gmail.com> - 2017.05.14-1
a8ba7ff
- Update to latest release.
a8ba7ff
0cdec01
* Mon May 08 2017 Matěj Cepl <mcepl@redhat.com> - 2017.05.07-1
0cdec01
- Update to the latest release.
0cdec01
ac36624
* Tue Apr 25 2017 Matěj Cepl <mcepl@redhat.com> - 2017.04.17-1
ac36624
- Update to the latest release.
ac36624
a2ddd30
* Mon Apr 10 2017 Matěj Cepl <mcepl@redhat.com> - 2017.04.09-1
a2ddd30
- Update to the latest release.
a2ddd30
a4c3781
* Thu Mar 23 2017 Matěj Cepl <mcepl@redhat.com> - 2017.03.22-1
a4c3781
- Update to the latest release.
a4c3781
4f8b9df
* Thu Feb 16 2017 Matěj Cepl <mcepl@redhat.com> - 2017.02.16-1
4f8b9df
- Update to the new release.
4f8b9df
78fa7df
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2017.01.31-2
78fa7df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
78fa7df
1541428
* Wed Feb 01 2017 Matěj Cepl <mcepl@redhat.com> - 2017.01.31-1
1541428
- Update to the new release.
1541428
355feb4
* Sun Jan 29 2017 Till Maas <opensource@till.name> - 2017.01.28-1
355feb4
- Update to new release
355feb4
4775fb8
* Thu Jan 12 2017 Till Maas <opensource@till.name> - 2017.01.10-1
4775fb8
- Update to new release
4775fb8
90c8977
* Wed Dec 28 2016 Matěj Cepl <mcepl@redhat.com> - 2016.12.22-1
90c8977
- Update to latest upstream release
90c8977
d570a96
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2016.12.09-2
d570a96
- Rebuild for Python 3.6
d570a96
a91d080
* Sun Dec 11 2016 Matěj Cepl <mcepl@redhat.com> - 2016.12.09-1
a91d080
- Update to latest upstream release
a91d080
1b7496e
* Fri Nov 25 2016 Matěj Cepl <mcepl@redhat.com> - 2016.11.22-1
1b7496e
- Update to latest upstream release
1b7496e
95faa3b
* Sun Nov 20 2016 Till Maas <opensource@till.name> - 2016.11.18-1
95faa3b
- Update to 2016.11.18
95faa3b
7bf943f
* Tue Oct 25 2016 Till Maas <opensource@till.name> - 2016.10.25-1
7bf943f
- Update to 2016-10-25
7bf943f
- Cleanup changelog
7bf943f
- Remove %%license workaround for EPEL, %%license is now defined in EPEL
7bf943f
- Remove interpreter line from module files
7bf943f
- Move bash completion to new path on Fedora
7bf943f
- Use py_build/py_install macros
7bf943f
d8fffb1
* Wed Oct 12 2016 Matěj Cepl <mcepl@redhat.com> - 2016.10.12-1
d8fffb1
- Update to latest upstream release
d8fffb1
411eeeb
* Sun Sep 18 2016 Till Maas <opensource@till.name> - 2016.09.18-1
411eeeb
- Update to lastest upstream release
411eeeb
6150e9f
* Sat Sep 17 2016 Till Maas <opensource@till.name> - 2016.09.15-1
6150e9f
- Update to latest upstream release
6150e9f
724d148
* Tue Aug 30 2016 Matěj Cepl <mcepl@redhat.com> - 2016.08.31-1
724d148
- Update to the latest upstream release.
724d148
e8f885f
* Wed Jul 20 2016 Matěj Cepl <mcepl@redhat.com> - 2016.07.17-1
e8f885f
- Update to the latest upstream release.
e8f885f
3a0464b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2016.06.25-2
3a0464b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
3a0464b
906a4ca
* Sun Jun 26 2016 Matěj Cepl <mcepl@redhat.com> - 2016.06.25-1
906a4ca
- Update to the latest upstream release.
906a4ca
e17bdd3
* Thu May 19 2016 Matěj Cepl <mcepl@redhat.com> 2016.05.16-1
e17bdd3
- Update to the latest upstream release.
b42e8a7
- Update upstream GPG keys
e17bdd3
c349988
* Wed May  4 2016 Matěj Cepl <mcepl@redhat.com> - 2016.05.01-1
c349988
- Update to the latest release.
c349988
d71a36c
* Fri Apr 15 2016 Till Maas <opensource@till.name> - 2016.04.13-2
d71a36c
- Fix build deps
d71a36c
06d39b4
* Thu Apr 14 2016 Matěj Cepl <mcepl@redhat.com> 2016.04.13-1
06d39b4
- Update to the latest release.
06d39b4
df92e2c
* Mon Mar 21 2016 Till Maas <opensource@till.name> - 2016.03.06-2
df92e2c
- Use gpgv2 for source verification
df92e2c
0a21ba0
* Thu Mar 10 2016 Matěj Cepl <mcepl@redhat.com> - 2016.03.06-1
0a21ba0
- Update to latest release.
0a21ba0
dd64a02
* Mon Feb 15 2016 Matěj Cepl <mcepl@redhat.com> - 2016.02.13-1
dd64a02
- Update to latest release.
dd64a02
7dda041
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015.12.23-2
7dda041
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7dda041
6bacd93
* Sat Dec 26 2015 Matěj Cepl <mcepl@redhat.com> - 2015.12.23-1
6bacd93
- Update to latest release.
6bacd93
5ac1440
* Sun Dec 06 2015 Till Maas <opensource@till.name> - - 2015.12.05-1
5ac1440
- Update to latest release
5ac1440
2e30074
* Tue Dec 01 2015 Jon Ciesla <limburgher@gmail.com> - 2015.11.27.1-1
2e30074
- Update to latest release.
2e30074
2d5f652
* Sun Nov 22 2015 Till Maas <opensource@till.name> - 2015.11.21-1
2d5f652
- Update to new release
2d5f652
0baccbe
* Mon Nov 16 2015 Matěj Cepl <mcepl@redhat.com> - 2015.11.15-1
0baccbe
- Update to new release.
0baccbe
4c6bd1d
* Sun Nov 15 2015 Till Maas <opensource@till.name> - 2015.11.13-2
4c6bd1d
- Use python3 on Fedora (#1282086)
4c6bd1d
8223d7f
* Fri Nov 13 2015 Till Maas <opensource@till.name> - 2015.11.13-1
8223d7f
- Update to new release
8223d7f
85e20d3
* Sun Oct 18 2015 Matěj Cepl <mcepl@redhat.com> - 2015.10.16-1
85e20d3
- Update to the latest release (#1270800)
85e20d3
5c9e81f
* Fri Oct 09 2015 Matěj Cepl <mcepl@redhat.com> - 2015.10.09-1
5c9e81f
- Update to the latest release (#1265448)
5c9e81f
4130f24
* Sun Sep 20 2015 Matěj Cepl <mcepl@redhat.com> - 2015.09.09-1
4130f24
- Update to the latest release (#1251785)
4130f24
bbf3d34
* Sat Aug 08 2015 Matej Cepl <mcepl@redhat.com> - 2015.08.06.1-1
bbf3d34
- Update to the latest release (#1240646)
bbf3d34
6d48c69
* Sat Jul 04 2015 Matej Cepl <mcepl@redhat.com> - 2015.07.04-1
6d48c69
- Update to the latest release (#1231593)
6d48c69
6632e4d
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.06.04.1-3
6632e4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6632e4d
85645d1
* Fri Jun 05 2015 Matej Cepl <mcepl@redhat.com> - 2015.06.04.1-2
85645d1
- Fix the License: field to Unlicense.
85645d1
8b41b14
* Fri Jun 05 2015 Matej Cepl <mcepl@redhat.com> - 2015.06.04.1-1
8b41b14
- Update to the latest release (#1222017)
8b41b14
0f250a0
* Fri May 15 2015 Matej Cepl <mcepl@redhat.com> - 2015.05.10-1
0f250a0
- Update to the latest release (#1218015, 1200569, 1206484)
0f250a0
0b9d8b2
* Wed Apr 29 2015 Matej Cepl <mcepl@redhat.com> - 2015.04.28-1
0b9d8b2
- Update to the latest release (#1210132)
0b9d8b2
289f972
* Sat Apr 04 2015 Matej Cepl <mcepl@redhat.com> - 2015.04.03-1
289f972
- Update to the latest release (#1205700)
289f972
8f973da
* Thu Mar 19 2015 Matej Cepl <mcepl@redhat.com> - 2015.03.18-1
8f973da
- Update to latest release (# 1201585)
8f973da
ae6d085
* Thu Mar 05 2015 Matej Cepl <mcepl@redhat.com> - 2015.03.03.1-1
ae6d085
- Update to latest release (# 1195539, 1195779)
ae6d085
b78eb2a
* Sun Feb 22 2015 Matej Cepl <mcepl@redhat.com> - 2015.02.21-1
b78eb2a
- Update to latest release
b78eb2a
9234726
* Wed Feb 18 2015 Matej Cepl <mcepl@redhat.com> - 2015.02.18.1-1
9234726
- Update to latest release
9234726
98f337e
* Mon Feb 16 2015 Matej Cepl <mcepl@redhat.com> - 2015.02.11-1
98f337e
- Show must go on!
98f337e
b9d2fb2
* Tue Feb 10 2015 Till Maas <opensource@till.name> - 2015.02.10.4-1
b9d2fb2
- Update to latest release
b9d2fb2
5766e33
* Tue Feb 10 2015 Till Maas <opensource@till.name> - 2015.02.10.2-1
5766e33
- Update to latest release
5766e33
- remove pre-built file in %%setup
5766e33
cf4c22a
* Sat Jan 31 2015 Till Maas <opensource@till.name> - 2015.01.30.1-1
cf4c22a
- Update to new release
cf4c22a
- Use %%license
cf4c22a
b978157
* Tue Jan 27 2015 Till Maas <opensource@till.name> - 2015.01.25-1
b978157
- Update to new release
b978157
b978157
* Tue Jan 27 2015 Alexey Kurov <nucleo@fedoraproject.org> - 2015.01.25.1-1
b978157
- Python 2.7 byte compile
b978157
58db9ae
* Fri Jan 16 2015 Matej Cepl <mcepl@redhat.com> - 2015.01.15.1-1
58db9ae
- Update to new release.
58db9ae
5275c35
* Wed Jan 14 2015 Till Maas <opensource@till.name> - 2015.01.11-1
5275c35
- Update to new release