%global debug_package %{nil} %global gituser yt-dlp %global gitname yt-dlp %global foldername yt_dlp %global commit 4ce05f57599961c853253398b993c94efb504048 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global gitcounter 2 Name: yt-dlp Version: 2022.05.18.git.%{gitcounter} Release: %{shortcommit}%{?dist}.1sunshine Summary: A small command-line program to download online videos License: Unlicense URL: https://github.com/%{gituser}/%{gitname} Source0: %{url}/tarball/%{commit}#/%{gituser}-%{name}-%{shortcommit}.tar.gz BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools # Needed to query completion locations BuildRequires: bash-completion fish >= 2.7.1 Requires: python%{python3_pkgversion}-setuptools Requires: python3-websockets Requires: python3-pycryptodomex Requires: python3-brotli Requires: python3-certifi Recommends: AtomicParsley # Obsoletes: youtube-dlc # BuildRequires: python-nose BuildArch: noarch # Facebook titles # https://github.com/barsnick/yt-dlp/tree/facebook_extract.06 # Patch0: yt-dlp-0001-facebook-extract-proper-titles.patch # ServusTV # https://github.com/barsnick/yt-dlp/tree/change-servustv-url.02 Patch0: yt-dlp-0001-servus-change-to-site-new-url.patch Patch1: yt-dlp-0002-Servus-update-api.patch # ListenNow and Radioplay # https://github.com/barsnick/yt-dlp/tree/radioplay.17 Patch10: yt-dlp-0001-radioplay-new-extractor.patch Patch11: yt-dlp-0002-listennow-new-extractor.patch Patch12: yt-dlp-0003-radioplay-add-support-for-radio-station-archives.patch Patch13: yt-dlp-0004-radioplay-extend-support-to-Denmark-.dk.patch Patch14: yt-dlp-0005-radioplay-add-RadioplayRedirect-extractor.patch Patch15: yt-dlp-0006-radioplay-add-RadioplayPodcastRedirect-extractor.patch # Veeps # https://github.com/barsnick/yt-dlp/tree/veeps.01 Patch20: yt-dlp-0001-Veeps-add-extractor.patch Patch21: yt-dlp-0002-Veeps-provide-_NETRC_MACHINE.patch # arte.tv v2 API # https://github.com/fstirlitz/yt-dlp/tree/arte-v2 Patch30: yt-dlp-0001-arte-Move-to-v2-API.patch Patch31: yt-dlp-0002-arte-Less-hacky-geoblocking-bypass.patch Patch32: yt-dlp-0003-arte-Remove-link-to-player-JS-in-a-comment.patch %description Small command-line program to download videos from YouTube and other sites. It's a fork of youtube-dl(c). %prep %autosetup -p1 -n %{gituser}-%{gitname}-%{shortcommit} cp -a setup.py setup.py.installpath cp -a CONTRIBUTORS AUTHORS # Remove pycryptodome requirement sed -i "s|, 'pycryptodome'||" setup.py sed -i '/pycryptodome/d' requirements.txt # Remove README.txt sed -i '/README.txt/d' setup.py mkdir -p completions/{bash,zsh,fish} python3 devscripts/bash-completion.py python3 devscripts/fish-completion.py python3 devscripts/zsh-completion.py python3 devscripts/prepare_manpage.py %{name}.1 # Remove interpreter shebang from module files find %{foldername} -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {} + %build %py3_build %install %py3_install # Remove test stuff if [[ -d "%{buildroot}%{python3_sitelib}/test" ]]; then rm -r %{buildroot}%{python3_sitelib}/test; fi mkdir -p %{buildroot}%{_sysconfdir} cat > %{buildroot}%{_sysconfdir}/%{name}.conf << EOF # Default configuration for yt-dlp. --prefer-free-formats --hls-prefer-native EOF # Check completion locations cd %{buildroot}$(pkg-config --variable completionsdir bash-completion) if ! [ -f "%{name}" ]; then exit 1; fi cd %{buildroot}$(pkg-config --variable completionsdir fish) if ! [ -f "%{name}.fish" ]; then exit 1; fi %check # make offlinetest %files %doc AUTHORS Changelog.md README.md supportedsites.md %{python3_sitelib}/%{foldername}/ %{python3_sitelib}/%{foldername}*.egg-info %license LICENSE %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %config(noreplace) %{_sysconfdir}/%{name}.conf %{_datadir}/bash-completion/completions/%{name} %{_datadir}/fish/vendor_completions.d/%{name}.fish %{_datadir}/zsh/site-functions/_%{name} %changelog * Sun Jun 12 2022 Moritz Barsnick 2022.05.18.git.2-4ce05f5.1sunshine - update to latest git commit - rebase Radioplay patchset * Wed May 25 2022 Moritz Barsnick 2022.05.18.git.1-7879e79.1sunshine - update to 2022.05.18 plus latest git commit - update patchset for Radioplay to support new URLs - add patchset to fix arte.tv * Fri May 06 2022 Moritz Barsnick 2022.04.08.git.2-10fa247.1sunshine - update to latest git commit - rebase patches - update patchset for Radioplay to support new URLs * Sat Apr 09 2022 Moritz Barsnick 2022.04.08.git.1-98804d0.1sunshine - update to 2022.04.08 plus latest git commit * Mon Apr 04 2022 Moritz Barsnick 2022.03.08.1.git.1-5fa3c9a.1sunshine - update to 2022.03.08.1 plus latest git commit - add Requires: python3-brotli and python3-certifi - drop patches to fix and enhance URPlay, they are partly upstream - drop the patch to fix NRK podcasts, a different fix is upstream * Sun Feb 27 2022 Moritz Barsnick 2022.02.04.git.2-195c228.1sunshine - update to latest git commit - add a patch to fix NRK podcasts * Fri Feb 04 2022 Moritz Barsnick 2022.02.04.git.1-b761428 .1sunshine - update to 2022.02.04 * Thu Feb 03 2022 Moritz Barsnick 2022.02.03.git.1-3cea9ec.1sunshine - update to 2022.02.03 * Sat Jan 15 2022 Moritz Barsnick 2021.12.27.git.2-aa06271.1sunshine - update to latest git commit - rebase patches * Mon Dec 27 2021 Moritz Barsnick 2021.12.27.git.1-6223f67.1sunshine - update to 2021.12.27 * Sat Dec 25 2021 Moritz Barsnick 2021.12.25.git.1-9980d3d.1sunshine - update to 2021.12.25 * Sun Nov 28 2021 Moritz Barsnick 2021.11.10.1.git.8-d298d33.2sunshine - add Requires: python3-pycryptodomex * Sun Nov 28 2021 Moritz Barsnick 2021.11.10.1.git.8-d298d33.1sunshine - update to 2021.11.10.1 * Sun Aug 29 2021 Moritz Barsnick 2021.08.10.git.8-abafce5.1sunshine - add BR fish >= 2.7.1 for the provided pkg-config file - add Requires: python3-websockets - add a patch for proper Facebook titles - add patches to fix ServusTV - add patches to add support for ListenNow and Radioplay - add patches to fix and enhance URPlay - add patches to add support for Veeps * Thu Feb 25 2021 samoht0 git-master - youtube-dlc is dead, fork now renamed to yt-dlp - shell completion changes - initial package for copr