# Contributor: Peter Bui # Contributor: Sören Tempel # Contributor: Łukasz Jendrysik # Contributor: Timo Teräs # Maintainer: Timo Teräs pkgname=youtube-dl pkgver=2015.12.13 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-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 } 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="6e16ef95bd8d69ff5453c36b6a3532c0 youtube-dl-2015.12.13.tar.gz" sha256sums="9c788925865ff559b6c9f124d35aed1125046efda7c6a386f0da59d4eac2ead8 youtube-dl-2015.12.13.tar.gz" sha512sums="039778326955ee126ce18ebe9133c9fca03d3fd14bbb56ebff50335e47ce2b24b9ddc8558c35bb4596692ee03b415f72bc238a74bd3034de7ed80a869cc4d64a youtube-dl-2015.12.13.tar.gz"