aboutsummaryrefslogtreecommitdiffstats
path: root/community/yt-dlp/APKBUILD
blob: 42b11c77ed09103b9b82db313c02a7bc6b019b54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Sodface <sod@sodface.com>
pkgname=yt-dlp
pkgver=2022.01.21
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"
makedepends="py3-setuptools"
checkdepends="py3-flake8 py3-nose py3-pytest"
subpackages="$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"

build() {
	python3 setup.py build

	make completions
}

check() {
	PYTHON=/usr/bin/python3 make offlinetest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	# Install completions
	install -Dm644 completions/bash/yt-dlp \
		-t "$pkgdir"/usr/share/bash-completion/completions
	install -Dm644 completions/zsh/_yt-dlp \
		-t "$pkgdir"/usr/share/zsh/site-functions
	install -Dm644 completions/fish/yt-dlp.fish \
		-t "$pkgdir"/usr/share/fish/completions
}

sha512sums="
efc17e3195bb20eff9f7765bc0782dbd90f6826aecaccf79144ce343d18f59efce096435c1b40dec6ead0ac1a516ed25a3e238b62f8903b8f89f9bb4c059d79a  yt-dlp-2022.01.21.tar.gz
"