# $Id: PKGBUILD 144523 2015-10-20 12:34:12Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-movie
pkgver=2.3.0.20151020
_commit=6bf276cd47e4c85568dd175dfb4e3705e39ccb93
pkgrel=2
pkgdesc='Movie player based on QtAV'
arch=('any')
url="https://gitcafe.com/Deepin/deepin-movie"
license=('GPL3')
depends=('python2-pyqt5' 'qtav' 'mediainfo' 'deepin-menu' 'python2-dbus'
         'python2-peewee' 'python2-pillow' 'python2-magic' 'python2-bottle'
         'deepin-qml-widgets' 'python2-xpybutil' 'python2-deepin-utils'
         'python2-requests' 'dleyna-renderer' 'deepin-dbus-factory')
makedepends=('deepin-gettext-tools' 'git')
groups=('deepin-extra')
install="${pkgname}.install"
source=("git+https://github.com/linuxdeepin/deepin-movie.git#commit=$_commit")
sha256sums=('SKIP')

prepare() {
  cd deepin-movie

  # fix python version
  find -iname "*.py" | xargs sed -i 's=\(^#! */usr/bin.*\)python *$=\1python2='
}

build() {
  cd deepin-movie
  python2 configure.py
  deepin-generate-mo locale/locale_config.ini
}

package() {
  cd deepin-movie
  make DESTDIR="${pkgdir}" PREFIX="/usr" install
}
