# $Id: PKGBUILD 142744 2015-10-02 09:03:39Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-game
pkgver=2014.2
pkgrel=3
pkgdesc="Deepin Game Center"
arch=('any')
url="https://gitcafe.com/Deepin/deepin-game"
license=('GPL3')
depends=('python2-deepin-ui' 'flashplugin' 'hicolor-icon-theme' 'python2-dbus'
         'python2-jswebkit' 'python2-deepin-storm')
makedepends=('deepin-gettext-tools' 'git')
groups=('deepin-extra')
install="${pkgname}.install"
source=("git+https://github.com/linuxdeepin/deepin-game.git#tag=$pkgver")
sha256sums=('SKIP')

prepare() {
  cd deepin-game

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

build() {
  cd deepin-game
  deepin-generate-mo tools/locale_config.ini
}

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