summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04c94716ba4aa0ba04527e4923715d1338667821 (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
36
37
38
39
40
41
42
43
44
45
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Jason Stryker <public at jasonstryker dot com>
pkgname=protontricks-git
pkgver=1.11.1.r2.g1dabf82
pkgrel=1
pkgdesc="A simple wrapper that does winetricks things for Proton enabled games."
arch=('any')
url="https://github.com/Matoking/protontricks"
license=('GPL-3.0-or-later')
depends=('python-pillow' 'python-setuptools' 'python-vdf' 'winetricks')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm'
             'python-wheel')
checkdepends=('appstream' 'desktop-file-utils')
optdepends=('yad: for GUI'
            'zenity: fallback for GUI')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/Matoking/protontricks.git')
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${pkgname%-git}"
  python -m build --wheel --no-isolation
}

check() {
  cd "${pkgname%-git}"
  desktop-file-validate "src/${pkgname%-git}/data/share/applications/${pkgname%-git}.desktop"
  desktop-file-validate "src/${pkgname%-git}/data/share/applications/${pkgname%-git}-launch.desktop"
  appstreamcli validate --no-net "data/com.github.Matoking.${pkgname%-git}.metainfo.xml"
}

package() {
  cd "${pkgname%-git}"
  python -m installer --destdir="$pkgdir" dist/*.whl

  # Remove protontricks-desktop-install, since we already install
  # desktop files properly
  rm "$pkgdir/usr/bin/${pkgname%-git}-desktop-install"
}