summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: db985905f09d5688688383fc19b525e4be151772 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: Jerry Lin <jerry73204 at gmail dot com>
pkgname=('python-av-git' 'python2-av-git')
pkgver=r1052.81b0037
pkgrel=2
pkgdesc='Pythonic bindings for FFmpeg.'
arch=('i686' 'x86_64')
url="https://github.com/mikeboers/PyAV/tree/master"
license=('BSD 3-Clause')
makedepends=('git' 'python-setuptools' 'python2-setuptools' 'cython')
source=('python-av::git+https://github.com/mikeboers/PyAV.git#branch=master')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/python-av"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir"
  cp -a python-av{,-py2}
}

build_python-av-git() {
  cd "$srcdir/python-av"
  python setup.py build
}

build_python2-av-git() {
  cd "$srcdir/python-av-py2"
  python2 setup.py build
}

package_python-av-git() {
  depends=('ffmpeg' 'python')
  provides=('python-av')
  conflicts=('python-av')

  cd "$srcdir/python-av"
  python setup.py install --root="$pkgdir" --optimize=1
}

package_python2-av-git() {
  depends=('ffmpeg' 'python2')
  provides=('python2-av')
  conflicts=('python2-av')

  cd "$srcdir/python-av-py2"
  python2 setup.py install --root="$pkgdir" --optimize=1

  # rename /usr/bin/pyav to avoid filename conflict
  mv "$pkgdir/usr/bin/pyav"{,2}
}