summaryrefslogtreecommitdiff
path: root/pcr/avideo/PKGBUILD
blob: 682094f674b3b5272a5f8535c73a0846ec0c6485 (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
35
# Maintainer(Hyperbola): André Silva <emulatorman@hyperbola.info>
# Contributor(Hyperbola): Márcio Silva <coadde@hyperbola.info>

pkgname=avideo
pkgver=2017.7.145
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')
replaces=('youtube-dl' 'avideo')
conflicts=('youtube-dl' 'avideo')
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=('67733ce3c7e412431108ceb777c566c2da7f61f22385a040426d7e15200dbe5db43a1ba76624ee69ea843cb644942d3304b8741bc0db0bc8e95c3b2164577998')

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"
}