# Contributor: Peter Bui # Contributor: Sören Tempel # Contributor: Łukasz Jendrysik # Contributor: Timo Teräs # Maintainer: Timo Teräs pkgname=youtube-dl pkgver=2015.11.02 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="7e81ffcda74b99810cbfc739d0dd4137 youtube-dl-2015.11.02.tar.gz" sha256sums="5c5bc5a7fec405ed353bd7052a4a83e8782742d246b24af73393fe70c7b28d8c youtube-dl-2015.11.02.tar.gz" sha512sums="99425739bf8802e50e5d4e11acd9915cb558f735918f145e78bb3e2d587c0b978882ac339ecbb0c8570510ea5843e19017fd40b5b4a2fbc44e5806ebb14bbaf2 youtube-dl-2015.11.02.tar.gz"