summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 138cc6b6d3ddb0d365adc43a1ede5dc8361a9272 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# 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.r8.g3d019ca
pkgrel=3
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"
}