%if 0%{?rhel} && 0%{?rhel} < 7 %bcond_with python3 %else %bcond_without python3 %endif %if ! %{with python3} %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?__python2: %global __python2 /usr/bin/python2} %endif Name: youtube-dl Version: 2021.06.06 Release: 1%{?dist}.3sunshine Summary: A small command-line program to download online videos License: Unlicense URL: https://yt-dl.org Source0: https://yt-dl.org/downloads/%{version}/youtube-dl-%{version}.tar.gz Source1: https://yt-dl.org/downloads/%{version}/youtube-dl-%{version}.tar.gz.sig # 2016-06-09: # Merged GPG keys from https://rg3.github.io/youtube-dl/download.html in one file # gpg --export --export-options export-minimal "428D F5D6 3EF0 7494 BB45 5AC0 EBF0 1804 BCF0 5F6B" \ # "ED7F 5BF4 6B3B BED8 1C87 368E 2C39 3E0F 18A9 236D" \ # "7D33 D762 FD6C 3513 0481 347F DB4B 54CB A482 6A18" > youtube-dl-gpgkeys.gpg Source2: youtube-dl-gpgkeys.gpg Source3: %{name}.conf # radioplay.{no,se} Patch0: 0001-radioplay-new-extractor.patch Patch1: 0002-listennow-new-extractor.patch Patch2: 0003-radioplay-add-support-for-radio-station-archives.patch # facebook titles Patch4: 0001-facebook-extract-proper-titles.patch # urplay subtitles Patch5: 0001-urplay-re-add-subtitle-support.patch # TV2 Patch6: 0001-TV2-Fix-extractor-766.patch %if %{with python3} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools Requires: python%{python3_pkgversion}-setuptools %else BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-setuptools %endif # Tests failed because of no connection in Koji. # BuildRequires: python-nose BuildArch: noarch # For source verification with gpgv BuildRequires: gnupg2 # https://bugzilla.redhat.com/show_bug.cgi?id=1951630 Recommends: AtomicParsley %description Small command-line program to download videos from YouTube and other sites. %prep gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} %autosetup -p1 -n %{name} # remove pre-built file rm youtube-dl cp -a setup.py setup.py.installpath # Remove files that are installed to the wrong path sed -i '/youtube-dl.bash-completion/d' setup.py sed -i '/youtube-dl.fish/d' setup.py sed -i '/README.txt/d' setup.py # Remove interpreter shebang from module files. find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {} + %build %if %{with python3} %py3_build %else %py2_build %endif %install %if %{with python3} %py3_install %else %py2_install %endif mkdir -p %{buildroot}%{_sysconfdir} install -pm644 %{S:3} %{buildroot}%{_sysconfdir} %if 0%{?fedora} mkdir -p %{buildroot}%{_datadir}/bash-completion/completions install -pm644 youtube-dl.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/youtube-dl %else mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ install -pm644 youtube-dl.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/youtube-dl %endif mkdir -p %{buildroot}%{_datadir}/zsh/site-functions/ install -pm644 youtube-dl.zsh %{buildroot}%{_datadir}/zsh/site-functions/_youtube-dl mkdir -p %{buildroot}%{_datadir}/fish/vendor_functions.d install -pm644 youtube-dl.fish %{buildroot}%{_datadir}/fish/vendor_functions.d/youtube-dl.fish %check # This basically cannot work without massive .flake8rc # starts with flake8 and of course no contributors bothered to make # their code truly PEP8 compliant. # # make offlinetest %files %doc AUTHORS ChangeLog README.md %if %{with python3} %{python3_sitelib}/youtube_dl/ %{python3_sitelib}/youtube_dl*.egg-info %else %{python2_sitelib}/youtube_dl/ %{python2_sitelib}/youtube_dl*.egg-info %endif %license LICENSE %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %config(noreplace) %{_sysconfdir}/%{name}.conf %if 0%{?fedora} %{_datadir}/bash-completion/completions/%{name} %else %{_sysconfdir}/bash_completion.d/%{name} %endif %{_datadir}/zsh/site-functions/_youtube-dl %{_datadir}/fish/vendor_functions.d/youtube-dl.fish %changelog * Sun Aug 29 2021 Moritz Barsnick 2021.06.06-1.3sunshine - add a patch to fix TV2 * Sat Aug 28 2021 Moritz Barsnick 2021.06.06-1.2sunshine - add a patch for urplay subtitles * Sun Jun 13 2021 Moritz Barsnick 2021.06.06-1.1sunshine - use %%autosetup macro to automatically apply patches - add patches for radioplay and listennow - add a patch for Facebook titles * Wed Jun 09 2021 David Schwörer - 2021.06.06-1 - Update to 2021.06.06 * Fri Jun 04 2021 Python Maint - 2021.05.16-2 - Rebuilt for Python 3.10 * Thu May 20 2021 David Schwörer - 2021.05.16-1 - Update to 2021.05.16 * Tue Apr 27 2021 David Schwörer - 2021.04.26-1 - Update to 2021.04.26 * Tue Apr 20 2021 David Schwörer - 2021.04.17-2 - Recommand AtomicParsley * Sat Apr 17 2021 David Schwörer - 2021.04.17-1 - Update to 2021.04.17 * Thu Apr 08 2021 David Schwörer - 2021.04.07-1 - Update to 2021.04.07 * Thu Apr 01 2021 David Schwörer - 2021.04.01-1 - Update to 2021.04.01 * Wed Mar 31 2021 David Schwörer - 2021.03.31-1 - Update to 2021.03.31 * Sun Mar 14 2021 David Schwörer - 2021.03.14-1 - Update to 2021.03.14 * Wed Mar 03 2021 David Schwörer - 2021.03.03-1 - Update to 2021.03.03 * Tue Mar 02 2021 David Schwörer - 2021.03.02-1 - Update to 2021.03.02 * Sun Feb 21 2021 David Schwörer - 2021.02.22-1 - Update to 2021.02.22 * Fri Feb 12 2021 David Schwörer - 2021.02.10-1 - Update to 2021.02.10 * Sat Feb 06 2021 David Schwörer - 2021.02.04.1-1 - Update to 2021.02.04.1 * Wed Jan 27 2021 David Schwörer - 2021.01.24.1-1 - Update to 2021.01.24.1 * Mon Jan 18 2021 David Schwörer - 2021.01.16-1 - Update to 2021.01.16 * Fri Jan 08 2021 David Schwörer - 2021.01.08-1 - Update to 2021.01.08 * Tue Jan 05 2021 David Schwörer - 2021.01.03-2 - Update to 2021.01.03 * Sun Jan 03 2021 David Schwörer - 2021.01.03-1 - Update to 2021.01.03 * Thu Dec 31 2020 David Schwörer - 2020.12.31-1 - Update to 2020.12.31 * Tue Dec 29 2020 David Schwörer - 2020.12.29-1 - Update to 2020.12.29 * Tue Dec 22 2020 David Schwörer - 2020.12.22-1 - Update to 2020.12.22 * Sun Dec 13 2020 David Schwörer - 2020.12.14-1 - Update to 2020.12.14 * Sat Dec 12 2020 David Schwörer - 2020.12.12-1 - Update to 2020.12.12 * Wed Dec 09 2020 David Schwörer - 2020.12.09-1 - Update to 2020.12.09 * Sun Dec 06 2020 David Schwörer - 2020.12.07-1 - Update to 2020.12.07 * Sun Dec 06 2020 David Schwörer - 2020.12.05-1 - Update to 2020.12.05 * Wed Dec 02 2020 David Schwörer - 2020.12.02-1 - Update to 2020.12.02 * Mon Nov 30 2020 David Schwörer - 2020.11.29-1 - Update to 2020.11.29 * Thu Nov 26 2020 David Schwörer - 2020.11.26-1 - Update to 2020.11.26 * Thu Nov 12 2020 Peter Hazenberg - 2020.11.12-1 - Update to 2020.11.12 - Get releases from yt-dl.org instead of github * Sun Sep 20 2020 David Schwörer - 2020.09.20-1 - Update to 2020.09.20 * Mon Sep 14 2020 David Schwörer - 2020.09.14-1 - Update to 2020.09.14 * Sun Sep 13 2020 David Schwörer - 2020.09.06-1 - Update to 2020.09.06 * Tue Jul 28 2020 David Schwörer - 2020.07.28-1 - Update to 2020.07.28 * Thu Jun 11 2020 David Schwörer - 2020.06.06-1 - Update to 2020.06.06 * Tue May 26 2020 Miro Hrončok - 2020.03.24-2 - Rebuilt for Python 3.9 * Mon Apr 13 2020 Robert-André Mauchin - 2020.03.24-1 - Update to 2020.03.24 * Mon Mar 02 2020 Robert-André Mauchin - 2020.03.01-1 - Update to 2020.03.01 * Wed Feb 19 2020 Robert-André Mauchin - 2020.02.16-1 - Update to 2020.02.16 * Fri Jan 31 2020 Fedora Release Engineering - 2020.01.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Jan 27 2020 Till Maas - 2020.01.24-1 - Update to new release * Tue Dec 03 2019 Till Maas - 2019.11.28-1 - Update to new release * Sat Nov 23 2019 Robert-André Mauchin - 2019.11.22-1 - Update to 2019.11.22 * Thu Oct 10 2019 Robert-André Mauchin - 2019.09.28-1 - Update to 2019.09.28 (#1756482) * Wed Sep 11 2019 Robert-André Mauchin - 2019.09.12.1-1 - Update to 2019.09.12.1 * Wed Sep 11 2019 Robert-André Mauchin - 2019.09.12-2 - Add Fish shell completion * Wed Sep 11 2019 Robert-André Mauchin - 2019.09.12-1 - Update to 2019.09.12 * Mon Aug 19 2019 Miro Hrončok - 2019.07.30-2 - Rebuilt for Python 3.8 * Tue Jul 30 2019 Gwyn Ciesla - 2019.07.30-1 - 2019.07.30 * Sat Jul 27 2019 Fedora Release Engineering - 2019.06.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Jun 23 2019 Till Maas - 2019.06.21-1 - Update to new upstream release with important bugfixes * Sun Jun 16 2019 Michael Cronenworth - 2019.06.08-1 - Update to 2019.06.08 * Wed Apr 24 2019 Till Maas - 2019.04.24-1 - Update to new upstream release with important bugfixes * Sun Feb 03 2019 Fedora Release Engineering - 2019.01.30-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Jan 29 2019 Till Maas - 2019.01.30-1 - Update to 2019.01.30 * Thu Jan 24 2019 Richard Shaw - 2019.01.24-1 - Update to 2019.01.24. * Thu Dec 27 2018 Matěj Cepl - 2018.12.17-1 - Update to the latest upstream release. - Make python-setuptools Required. * Sat Dec 15 2018 Matěj Cepl - 2018.12.09-1 - Update to the latest upstream release. * Sun Sep 30 2018 Matěj Cepl - 2018.09.26-1 - Update to the latest upstream release. * Sat Sep 08 2018 Matěj Cepl - 2018.09.08-1 - Update to the latest upstream release. * Sat Aug 18 2018 Matěj Cepl - 2018.08.04-1 - Update to the latest release. * Mon Jul 23 2018 Matěj Cepl - 2018.07.21-2 - Add youtube-dl-2018.07.21-ceskatelevize-https.patch to workaround (badly) around https://github.com/rg3/youtube-dl/issues/16307 * Sat Jul 21 2018 Matěj Cepl - 2018.07.21-1 - Update to the latest release. * Sat Jul 14 2018 Fedora Release Engineering - 2018.05.18-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 2018.05.18-2 - Rebuilt for Python 3.7 * Fri May 25 2018 Matěj Cepl - 2018.05.18-1 - Update to the latest release. * Tue Apr 24 2018 Matěj Cepl - 2018.04.16-1 - Update to the latest release. * Mon Mar 26 2018 Matěj Cepl - 2018.03.26.1-1 - Use Python 3 for EPEL-7. * Wed Mar 14 2018 Matěj Cepl - 2018.03.10-1 - Update to the latest release. * Tue Feb 27 2018 Matěj Cepl - 2018.02.26-1 - Update to the latest release. * Fri Feb 09 2018 Matěj Cepl - 2018.02.08-2 - Remove hardcoded-library-path (#1539993) * Fri Feb 09 2018 Matěj Cepl - 2018.02.08-1 - Update to the latest release. * Tue Jan 23 2018 Matěj Cepl - 2018.01.21-1 - Update to the latest release. * Thu Dec 28 2017 Matěj Cepl - 2017.12.23-1 - Update to latest release * Wed Dec 13 2017 Matěj Cepl - 2017.12.10-1 - Update to latest release * Sat Nov 25 2017 Matěj Cepl - 2017.11.15-1 - Update to latest release * Tue Nov 07 2017 Matěj Cepl - 2017.11.06-1 - Update to latest release * Thu Oct 19 2017 Matěj Cepl - 2017.10.15.1-1 - Update to latest release * Mon Oct 02 2017 Till Maas - 2017.10.01-1 - Update to latest release * Sat Sep 23 2017 Matěj Cepl - 2017.09.15-1 - Update to latest release. * Sat Sep 02 2017 Matěj Cepl - 2017.09.02-1 - Update to latest release. * Thu Aug 31 2017 Till Maas - 2017.08.23-2 - Manually follow redirect for source URLs to please rpmlint (#1414964) * Fri Aug 25 2017 Matěj Cepl - 2017.08.23-1 - Update to latest release. * Wed Aug 16 2017 Matěj Cepl - 2017.08.13-1 - Update to latest release. * Sat Jul 29 2017 Matěj Cepl - 2017.07.23-1 - Update to latest release. * Thu Jul 27 2017 Fedora Release Engineering - 2017.07.09-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Jul 14 2017 Matěj Cepl - 2017.07.09-1 - Update to latest release. * Wed Jun 28 2017 Matěj Cepl - 2017.06.25-1 - Update to latest release. * Sat Jun 03 2017 Matěj Cepl - 2017.05.29-1 - Update to latest release. * Thu May 18 2017 Matěj Cepl - 2017.05.18.1-1 - Update to latest release. * Thu May 18 2017 Gwyn Ciesla - 2017.05.14-1 - Update to latest release. * Mon May 08 2017 Matěj Cepl - 2017.05.07-1 - Update to the latest release. * Tue Apr 25 2017 Matěj Cepl - 2017.04.17-1 - Update to the latest release. * Mon Apr 10 2017 Matěj Cepl - 2017.04.09-1 - Update to the latest release. * Thu Mar 23 2017 Matěj Cepl - 2017.03.22-1 - Update to the latest release. * Thu Feb 16 2017 Matěj Cepl - 2017.02.16-1 - Update to the new release. * Sat Feb 11 2017 Fedora Release Engineering - 2017.01.31-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Feb 01 2017 Matěj Cepl - 2017.01.31-1 - Update to the new release. * Sun Jan 29 2017 Till Maas - 2017.01.28-1 - Update to new release * Thu Jan 12 2017 Till Maas - 2017.01.10-1 - Update to new release * Wed Dec 28 2016 Matěj Cepl - 2016.12.22-1 - Update to latest upstream release * Mon Dec 19 2016 Miro Hrončok - 2016.12.09-2 - Rebuild for Python 3.6 * Sun Dec 11 2016 Matěj Cepl - 2016.12.09-1 - Update to latest upstream release * Fri Nov 25 2016 Matěj Cepl - 2016.11.22-1 - Update to latest upstream release * Sun Nov 20 2016 Till Maas - 2016.11.18-1 - Update to 2016.11.18 * Tue Oct 25 2016 Till Maas - 2016.10.25-1 - Update to 2016-10-25 - Cleanup changelog - Remove %%license workaround for EPEL, %%license is now defined in EPEL - Remove interpreter line from module files - Move bash completion to new path on Fedora - Use py_build/py_install macros * Wed Oct 12 2016 Matěj Cepl - 2016.10.12-1 - Update to latest upstream release * Sun Sep 18 2016 Till Maas - 2016.09.18-1 - Update to lastest upstream release * Sat Sep 17 2016 Till Maas - 2016.09.15-1 - Update to latest upstream release * Tue Aug 30 2016 Matěj Cepl - 2016.08.31-1 - Update to the latest upstream release. * Wed Jul 20 2016 Matěj Cepl - 2016.07.17-1 - Update to the latest upstream release. * Tue Jul 19 2016 Fedora Release Engineering - 2016.06.25-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Sun Jun 26 2016 Matěj Cepl - 2016.06.25-1 - Update to the latest upstream release. * Thu May 19 2016 Matěj Cepl 2016.05.16-1 - Update to the latest upstream release. - Update upstream GPG keys * Wed May 4 2016 Matěj Cepl - 2016.05.01-1 - Update to the latest release. * Fri Apr 15 2016 Till Maas - 2016.04.13-2 - Fix build deps * Thu Apr 14 2016 Matěj Cepl 2016.04.13-1 - Update to the latest release. * Mon Mar 21 2016 Till Maas - 2016.03.06-2 - Use gpgv2 for source verification * Thu Mar 10 2016 Matěj Cepl - 2016.03.06-1 - Update to latest release. * Mon Feb 15 2016 Matěj Cepl - 2016.02.13-1 - Update to latest release. * Fri Feb 05 2016 Fedora Release Engineering - 2015.12.23-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sat Dec 26 2015 Matěj Cepl - 2015.12.23-1 - Update to latest release. * Sun Dec 06 2015 Till Maas - - 2015.12.05-1 - Update to latest release * Tue Dec 01 2015 Jon Ciesla - 2015.11.27.1-1 - Update to latest release. * Sun Nov 22 2015 Till Maas - 2015.11.21-1 - Update to new release * Mon Nov 16 2015 Matěj Cepl - 2015.11.15-1 - Update to new release. * Sun Nov 15 2015 Till Maas - 2015.11.13-2 - Use python3 on Fedora (#1282086) * Fri Nov 13 2015 Till Maas - 2015.11.13-1 - Update to new release * Sun Oct 18 2015 Matěj Cepl - 2015.10.16-1 - Update to the latest release (#1270800) * Fri Oct 09 2015 Matěj Cepl - 2015.10.09-1 - Update to the latest release (#1265448) * Sun Sep 20 2015 Matěj Cepl - 2015.09.09-1 - Update to the latest release (#1251785) * Sat Aug 08 2015 Matej Cepl - 2015.08.06.1-1 - Update to the latest release (#1240646) * Sat Jul 04 2015 Matej Cepl - 2015.07.04-1 - Update to the latest release (#1231593) * Fri Jun 19 2015 Fedora Release Engineering - 2015.06.04.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Jun 05 2015 Matej Cepl - 2015.06.04.1-2 - Fix the License: field to Unlicense. * Fri Jun 05 2015 Matej Cepl - 2015.06.04.1-1 - Update to the latest release (#1222017) * Fri May 15 2015 Matej Cepl - 2015.05.10-1 - Update to the latest release (#1218015, 1200569, 1206484) * Wed Apr 29 2015 Matej Cepl - 2015.04.28-1 - Update to the latest release (#1210132) * Sat Apr 04 2015 Matej Cepl - 2015.04.03-1 - Update to the latest release (#1205700) * Thu Mar 19 2015 Matej Cepl - 2015.03.18-1 - Update to latest release (# 1201585) * Thu Mar 05 2015 Matej Cepl - 2015.03.03.1-1 - Update to latest release (# 1195539, 1195779) * Sun Feb 22 2015 Matej Cepl - 2015.02.21-1 - Update to latest release * Wed Feb 18 2015 Matej Cepl - 2015.02.18.1-1 - Update to latest release * Mon Feb 16 2015 Matej Cepl - 2015.02.11-1 - Show must go on! * Tue Feb 10 2015 Till Maas - 2015.02.10.4-1 - Update to latest release * Tue Feb 10 2015 Till Maas - 2015.02.10.2-1 - Update to latest release - remove pre-built file in %%setup * Sat Jan 31 2015 Till Maas - 2015.01.30.1-1 - Update to new release - Use %%license * Tue Jan 27 2015 Till Maas - 2015.01.25-1 - Update to new release * Tue Jan 27 2015 Alexey Kurov - 2015.01.25.1-1 - Python 2.7 byte compile * Fri Jan 16 2015 Matej Cepl - 2015.01.15.1-1 - Update to new release. * Wed Jan 14 2015 Till Maas - 2015.01.11-1 - Update to new release