# $Id: PKGBUILD 96087 2013-08-20 06:32:26Z lcarlier $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Abhishek Dasgupta <abhidg@gmail.com>
# Contributor: Gabor Nyekhelyi (n0gabor) <n0gabor@vipmail.hu>

pkgname=pitivi
pkgver=0.15.2
pkgrel=6
pkgdesc="Editor for audio/video projects using the GStreamer framework"
arch=('any')
url="http://www.pitivi.org/"
license=('LGPL')
depends=('gstreamer0.10>=0.10.24' 'pygoocanvas' 'gstreamer0.10-good' 'pygtk>=2.14.0'
	 'gstreamer0.10-python>=0.10.19' 'gnonlin>=0.10.13'
	 'zope-interface' 'dbus-python' 'gnome-icon-theme' 'pyxdg'
	 'python2-setuptools')
makedepends=('pkgconfig' 'intltool' 'gnome-doc-utils')
optdepends=('frei0r-plugins: enable the video transformations'
	    'python2-numpy: enable the video transformations')
install=$pkgname.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/0.15/$pkgname-$pkgver.tar.xz)
md5sums=('e0e379fca759025140ac1316819b2173')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # python2 fix
  for file in $(find . -name '*.py' -print) bin/pitivi.in; do
    sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done
  sed -i 'y/\xc2\xa0/  /' help/Makefile.in

  ./configure --prefix=/usr --localedir=/usr/share/locale
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
}
