blob: a785c58a216259929d6b9afb3e4855953c0f362d (
plain) (
tree)
|
|
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=youtube-dl
pkgver=2019.08.02
pkgrel=0
pkgdesc="Command-line program to download videos from YouTube and many other sites"
url="https://youtube-dl.org"
arch="noarch"
options="!check" # Takes way too long, and uses network
license="Unlicense AND Public-Domain"
depends="ffmpeg python3"
subpackages="$pkgname-doc
$pkgname-zsh-completion:zshcomp
$pkgname-bash-completion:bashcomp
$pkgname-fish-completion:fishcomp"
source="https://github.com/rg3/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname"
prepare() {
default_prepare
sed -i \
-e 's|etc/bash_completion.d|share/bash-completion/completions|' \
-e 's|etc/fish/completions|share/fish/completions|' \
"$builddir/setup.py"
}
check() {
python3 -m unittest discover
}
package() {
python3 setup.py install --root="$pkgdir/" --optimize=1
}
zshcomp() {
pkgdesc="Zsh completions for $pkgname"
depends=""
install_if="$pkgname=$pkgver-r$pkgrel zsh"
install -Dm644 "$builddir/$pkgname.zsh" \
"$subpkgdir/usr/share/zsh/site-functions/_$pkgname"
}
bashcomp() {
pkgdesc="Bash completions for $pkgname"
depends=""
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
mkdir -p "$subpkgdir/usr/share/bash-completion/completions/"
mv "$pkgdir/usr/share/bash-completion/completions/$pkgname.bash-completion" \
"$subpkgdir/usr/share/bash-completion/completions/$pkgname"
}
fishcomp() {
pkgdesc="Fish completions for $pkgname"
depends=""
install_if="$pkgname=$pkgver-r$pkgrel fish"
mkdir -p "$subpkgdir/usr/share/fish/completions/"
mv "$pkgdir/usr/share/fish/completions/$pkgname.fish" \
"$subpkgdir/usr/share/fish/completions/"
}
sha512sums="9740fd8cb16ce73695ecc40017b8807d8a40d2df6bb7c1f89db00d0c490bd5a67718dffdf39b2b7d65071f01738c684a1deb520eef5efcf87f1e39ac8f3e103f youtube-dl-2019.08.02.tar.gz"
|