# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>

pkgname=lutris
pkgver=0.5.3
pkgrel=1
pkgdesc='Open Gaming Platform'
arch=('any')
url='https://lutris.net'
license=('GPL3')
depends=('python-gobject' 'python-yaml' 'python-evdev' 'gtk3' 'glib2' 'psmisc' 'cabextract' 'unzip' 'p7zip' 'curl' 'xorg-xrandr'
         'python-pillow' 'python-requests' 'gnome-desktop' 'webkit2gtk' 'gvfs' 'mesa-demos')
makedepends=('python-setuptools')
checkdepends=('xorg-server-xvfb' 'python-nose-cover3' 'wine' 'xterm')
optdepends=('wine: Windows support'
            'vulkan-icd-loader: Vulkan support'
            'lib32-vulkan-icd-loader: Vulkan support')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/lutris/lutris/archive/v$pkgver.tar.gz")
sha512sums=('c48be1cf1efada290847d86876dae40346142b041119e6c6733e41e27c0277771647992e5475bfa3a71b639a0d9ff2e2ca3527612cc1a723aa0bac46960606c9')

build() {
  cd $pkgname-$pkgver

  python setup.py build
}

check() {
  cd $pkgname-$pkgver

  xvfb-run nosetests --cover-erase --with-xunit --xunit-file=nosetests.xml --with-coverage --cover-package=lutris --cover-xml-file=coverage.xml
}

package() {
  cd $pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

