summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-pymedia/PKGBUILD
blob: 54334710ea8ac3dd9c63357e8f67abed341b74b1 (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: TDY <tdy@gmx.com>

pkgname=python-pymedia
pkgver=1.3.7.3
pkgrel=2
pkgdesc="A Python library for accessing and manipulating multimedia files"
arch=('i686' 'x86_64')
url="http://pymedia.org/"
license=('LGPL')
depends=('alsa-lib' 'ffmpeg-svn' 'python2')
optdepends=('faad2:     AAC support'
            'lame:      MP3 support'
            'libogg:    Ogg support'
            'libvorbis: Vorbis support')
source=(http://downloads.sourceforge.net/${pkgname/*-}/${pkgname/*-}-$pkgver.tar.gz
        ${pkgname/*-}-$pkgver-amd64-gentoo.diff)
md5sums=('2f4930c63866c97af5090b176e2a118a'
         '3137e65e1208db98e404ee894fcd744a')

build() {
  cd "$srcdir/${pkgname/*-}-$pkgver"
  patch -Np1 -i ../${pkgname/*-}-$pkgver-amd64-gentoo.diff || return 1

  find "$srcdir/${pkgname/*-}-$pkgver" -name '*.py' | \
    xargs sed -i "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" || return 1
  find "$srcdir/${pkgname/*-}-$pkgver" -name '*.py' | \
    xargs sed -i "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" || return 1

  python2 setup.py build || return 1
}

package() {
  cd "$srcdir/${pkgname/*-}-$pkgver"
  python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
}