summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b89c798fe46c4d4d8a41fdef441d4780dec49c83 (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
# Maintainer: Ysblokje <ysblokje at gmail dot com>
pkgname=('gamemode-git' 'lib32-gamemode-git')
pkgbase='gamemode-git'
pkgver=r613.4934191
pkgrel=2
pkgdesc="A daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS."
arch=('x86_64')
url="https://github.com/FeralInteractive/gamemode.git"
license=('BSD 3-Clause License (Revised)')
depends=('libinih')
optdepends=('systemd')
makedepends=('meson' 'ninja' 'pkg-config' 'git')
conflicts=('gamemode')
source=("git+https://github.com/FeralInteractive/gamemode.git")
sha256sums=('SKIP')

pkgver() {
    cd gamemode
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  meson gamemode build --prefix /usr -Dwith-systemd-user-unit-dir=/usr/lib/systemd/user -Dwith-privileged-group=gamemode
  ninja -C build

  export CFLAGS+=" -m32"
  export CXXFLAGS+=" -m32"
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  meson gamemode build32 --prefix /usr \
  -Dwith-sd-bus-provider=no-daemon \
  -Dwith-examples=false \
  -Dwith-util=false \
  --libdir lib32
  meson compile -C build32
}

package_gamemode-git() {
  DESTDIR=${pkgdir} ninja -C build install
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" gamemode/LICENSE.txt
}

package_lib32-gamemode-git() {
  depends=('gamemode-git' 'lib32-dbus')
  DESTDIR=${pkgdir} ninja -C build32 install
  rm -rf $pkgdir/usr/{include,bin,lib,share}
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" gamemode/LICENSE.txt
}