summaryrefslogtreecommitdiff
path: root/pcr/avideo/PKGBUILD
blob: e0929e9f900983386c26114c4c51db293a3a0221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer(Hyperbola): André Silva <emulatorman@hyperbola.info>
# Contributor(Hyperbola): Márcio Silva <coadde@hyperbola.info>

pkgname=avideo
pkgver=2017.9.27
pkgrel=2
pkgdesc="A small command-line program to download videos from YouTube.com and a few more sites (a libre fork of youtube-dl)"
arch=('any')
url="https://notabug.org/GPast/avideo"
license=('GPL3')
conflicts=('youtube-dl')
provides=('youtube-dl' 'avideo')
depends=('python' 'python-setuptools')
optdepends=('ffmpeg: for video post-processing'
            'rtmpdump: for rtmp streams support'
            'atomicparsley: for embedding thumbnails into m4a files')
source=(https://notabug.org/GPast/${pkgname}/raw/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('45426b563b6c8fdab6ef41c1ec54d5bf7376fc56d69e5e862899ed6753add00f2e66101636f591ef3a56b85ddb0c00bcd684d06a8682f3ecbe3b37e47e4d4765')

prepare() {
  cd ${pkgname}
  sed -i 's|etc/bash_completion.d|share/bash-completion/completions|' setup.py
  sed -i 's|etc/fish/completions|share/fish/completions|' setup.py
}

package() {
  cd ${pkgname}
  python setup.py install --root="${pkgdir}/" --optimize=1
  mv "${pkgdir}/usr/share/bash-completion/completions/avideo.bash-completion" \
     "${pkgdir}/usr/share/bash-completion/completions/avideo"
  install -Dm644 avideo.zsh "${pkgdir}/usr/share/zsh/site-functions/_avideo"
  install -Dm644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  ln -sv avideo "${pkgdir}/usr/bin/youtube-dl"
}