pkgname=youtube-dl pkgver=2018.07.04 pkgrel=1 pkgdesc='A small command-line program to download videos from YouTube.com' arch=('x86_64') url='http://rg3.github.com/youtube-dl/' license=('custom') depends=('python3' 'python3-setuptools') optdepends=('ffmpeg: for video post-processing' 'rtmpdump: for rtmp streams support') categories=('network') source=("http://youtube-dl.org/downloads/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.sig}) sha1sums=('035a84ef34b6ed3901787cfeeb620cdccc8b54a6' 'SKIP') validpgpkeys=('7D33D762FD6C35130481347FDB4B54CBA4826A18' # Philipp Hagemeister 'ED7F5BF46B3BBED81C87368E2C393E0F18A9236D') # Sergey M. prepare() { cd "${pkgname}" sed -i -e 's|etc/bash_completion.d|share/bash-completion/completions|' \ -e 's|youtube-dl.bash-completion|youtube-dl|' \ -e 's|etc/fish/completions|share/fish/completions|' setup.py } package() { cd "${pkgname}" python3 setup.py install --root="${pkgdir}/" --optimize=1 install -Dm644 youtube-dl.zsh "${pkgdir}/usr/share/zsh/site-functions/_youtube-dl" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }