apkbuilds @ 595e07ac484ea0beb0066e7e2ad74f4137083748

 1# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
 2# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
 3# Contributor: Timo Teräs <timo.teras@iki.fi>
 4# Contributor: Leo <thinkabit.ukim@gmail.com>
 5# Maintainer: Sodface <sod@sodface.com>
 6pkgname=yt-dlp
 7pkgver=2022.10.04
 8pkgrel=1
 9pkgdesc="Command-line program to download videos from YouTube"
10url="https://github.com/yt-dlp/yt-dlp"
11arch="noarch"
12license="Unlicense"
13depends="python3 py3-mutagen py3-websockets py3-certifi py3-brotli"
14makedepends="py3-setuptools"
15checkdepends="py3-flake8 py3-nose py3-pytest"
16subpackages="
17	$pkgname-doc
18	$pkgname-zsh-completion
19	$pkgname-bash-completion
20	$pkgname-fish-completion
21	"
22source="$pkgname-$pkgver.tar.gz::https://github.com/yt-dlp/yt-dlp/releases/download/$pkgver/yt-dlp.tar.gz"
23builddir="$srcdir/$pkgname"
24
25build() {
26	python3 setup.py build
27
28	make completions
29}
30
31check() {
32	PYTHON=/usr/bin/python3 make offlinetest
33}
34
35package() {
36	python3 setup.py install --prefix=/usr --root="$pkgdir"
37
38	# Install fish completion to the correct directory
39	rm -r "$pkgdir"/usr/share/fish/vendor_completions.d
40	install -Dm644 completions/fish/yt-dlp.fish \
41		-t "$pkgdir"/usr/share/fish/completions
42}
43
44sha512sums="
455e24eea9739325349e975a92eed9d38605f62a423ae16127e1966bf96974419939f46986d7f61306f827edebd9f7408d048672e99c214bc59b2cdccad1938004  yt-dlp-2022.10.04.tar.gz
46"