summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0088690c9f0e17a8711d1d288c533c3e82899324 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Maintainer: Javad <ja7ad@live.com>

pkgname=lutris-live-bin
pkgver=0.5.22
pkgrel=1
pkgdesc="Open Gaming Platform (Live version)"
arch=('any')
url="https://lutris.net"
license=('GPL-3.0-only')
depends=(
  '7zip'
  'cabextract'
  'curl'
  'glib2'
  'gnome-desktop'
  'gtk3'
  'hicolor-icon-theme'
  'libnotify'
  'mesa-utils'
  'psmisc'
  'python-cairo'
  'python-certifi'
  'python-dbus'
  'python-distro'
  'python-gobject'
  'python-lxml'
  'python-moddb'
  'python-pillow'
  'python-requests'
  'python-setproctitle'
  'python-urllib3'
  'python-yaml'
  'unzip'
  'webkit2gtk-4.1'
  'xdg-desktop-portal-impl'
  'xdg-utils'
  'xorg-xrandr'
)

optdepends=(
  'fluidsynth: For games that have MIDI music'
  'gamemode: Allows games to request a temporary set of optimisations'
  'gamescope: Draw the game window isolated from your desktop'
  'gvfs: GVFS backend'
  'innoextract: Extract Inno Setup installers'
  'lib32-gamemode: Allows games to request a temporary set of optimisations'
  'lib32-glibc: for 32bit games support'
  'lib32-gnutls: Required to login to some game platforms (e.g. Ubisoft Connect, EA Origin and GOG)'
  "lib32-mangohud: Display the games' FPS + other information"
  'lib32-mesa-libgl: OpenGL support'
  'lib32-vkd3d: DirectX 12 support'
  'lib32-vulkan-icd-loader: Vulkan support'
  'libayatana-appindicator: tray icon support'
  "mangohud: Display the games' FPS + other information"
  'python-evdev: Controller support'
  'python-pefile: Extract icons from Windows executables'
  'python-protobuf: BattleNet integration'
  'python-pypresence: Discord Rich Presence integration'
  'umu-launcher: For running games through Proton'
  'vkd3d: DirectX 12 support'
  'vulkan-icd-loader: Vulkan support'
  'vulkan-tools: Vulkan support'
  'wine: easiest way to get all the libraries missing from the Lutris runtime'
  'winetricks: use system winetricks'
)

provides=('lutris')
conflicts=('lutris' 'lutris-git')

_deb="lutris_${pkgver}_all.deb"
source=("$_deb::https://github.com/lutris/lutris/releases/download/v${pkgver}/${_deb}")

sha256sums=('SKIP')

package() {
  bsdtar -xf "${srcdir}/${_deb}" -C "${srcdir}"

  if [ -f "${srcdir}/data.tar.zst" ]; then
    bsdtar -xf "${srcdir}/data.tar.zst" -C "${pkgdir}/"
  elif [ -f "${srcdir}/data.tar.xz" ]; then
    bsdtar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}/"
  else
    bsdtar -xf "${srcdir}/data.tar.gz" -C "${pkgdir}/"
  fi

  install -dm755 "${pkgdir}/usr/bin"
  mv "${pkgdir}/usr/games/lutris" "${pkgdir}/usr/bin/lutris"
  rm -rf "${pkgdir}/usr/games"

  sed -i 's|/usr/games/lutris|/usr/bin/lutris|g' "${pkgdir}"/usr/share/applications/*.desktop

  local _pyver=$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')

  install -dm755 "${pkgdir}/usr/lib/python${_pyver}/site-packages"
  mv "${pkgdir}"/usr/lib/python3/dist-packages/* "${pkgdir}/usr/lib/python${_pyver}/site-packages/"
  rm -rf "${pkgdir}/usr/lib/python3"
}