# Contributor: Peter Bui # Contributor: Sören Tempel # Contributor: Timo Teräs # Contributor: Leo # Contributor: Sodface # Maintainer: Lauren N. Liberda pkgname=yt-dlp pkgver=2023.07.06 pkgrel=0 pkgdesc="Command-line program to download videos from YouTube" url="https://github.com/yt-dlp/yt-dlp" arch="noarch" license="Unlicense" depends="python3" _extradeps=" attr ca-certificates ffmpeg py3-brotli py3-mutagen py3-pycryptodomex py3-secretstorage py3-websockets " makedepends="$_extradeps py3-setuptools" checkdepends="py3-flake8 py3-nose py3-pytest-xdist" subpackages=" $pkgname-core-pyc $pkgname-core $pkgname-doc $pkgname-zsh-completion $pkgname-bash-completion $pkgname-fish-completion " source="$pkgname-$pkgver.tar.gz::https://github.com/yt-dlp/yt-dlp/releases/download/$pkgver/yt-dlp.tar.gz " builddir="$srcdir/$pkgname" prepare() { default_prepare :> requirements.txt } build() { python3 setup.py build make completions } check() { PYTHON=/usr/bin/python3 make offlinetest } package() { depends=" $_extradeps yt-dlp-core=$pkgver-r$pkgrel " python3 setup.py install --skip-build --root="$pkgdir" ln -sfv yt-dlp "$pkgdir"/usr/bin/youtube-dl } core() { # provide compat for removed old youtube-dl provides="youtube-dl=$pkgver-r$pkgrel" replaces="youtube-dl" amove usr/lib/python3*/site-packages/ amove usr/bin } sha512sums=" f9f276ccd01293d27a749575653449d73e13896c175a51f3687b2f6d1c6b97154f6c9fb2868f0c37a6e94cb692e223c7c595e741c5b2db82d2b9e1d0b2f8958d yt-dlp-2023.07.06.tar.gz "