# Contributor: Peter Bui # Contributor: Sören Tempel # Contributor: Łukasz Jendrysik # Contributor: Timo Teräs # Maintainer: Timo Teräs pkgname=youtube-dl pkgver=2016.06.27 pkgrel=0 pkgdesc="A small command-line program to download videos from YouTube." url="http://youtube-dl.org " arch="noarch" license="Public Domain" depends="python>=2.5 py-setuptools ffmpeg" subpackages=" $pkgname-doc $pkgname-zsh-completion:zshcomp $pkgname-bash-completion:bashcomp $pkgname-fish-completion:fishcomp" source="http://$pkgname.org/downloads/$pkgver/$pkgname-$pkgver.tar.gz" _builddir="$srcdir"/$pkgname prepare() { cd "$_builddir" sed -i 's|etc/bash_completion.d|share/bash-completion/completions|' setup.py || return 1 sed -i 's|etc/fish/completions|share/fish/completions|' setup.py || return 1 } package() { cd "$_builddir" python setup.py install --root="$pkgdir/" --optimize=1 || return 1 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1 } zshcomp() { depends="" pkgdesc="Zsh completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" arch="noarch" install -Dm644 "$_builddir"/$pkgname.zsh \ "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname || return 1 } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" arch="noarch" 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 || return 1 } fishcomp() { depends="" pkgdesc="Fish completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel fish" arch="noarch" mkdir -p "$subpkgdir"/usr/share/fish/completions/ mv "$pkgdir"/usr/share/fish/completions/$pkgname.fish \ "$subpkgdir"/usr/share/fish/completions/ || return 1 } md5sums="295537acf40c5390cd4532dd9da04c9a youtube-dl-2016.06.27.tar.gz" sha256sums="6ccb3ab1b2e3d5c231b9fff3bffe7c60b3c4973a8269bbe6a5b6835527109bcf youtube-dl-2016.06.27.tar.gz" sha512sums="e117e6c0cab79acc4225bbf6e4bdaa1d439ca35f6018ac49c20c48fd72a0297f703ba5885f6ce378eefa5f26ac94c080682d1012467971ab72803deca3a576f4 youtube-dl-2016.06.27.tar.gz"