summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 209f3cd3a4f2a44589162c5b9c23ecfa7690d471 (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
# Maintainer:

_pkgname="gpu-screen-recorder"
pkgname="$_pkgname-git"
pkgver=5.6.3.r0.g53e879b
pkgrel=1
pkgdesc="A shadowplay-like screen recorder"
arch=('x86_64')
url="https://git.dec05eba.com/gpu-screen-recorder"
license=('GPL-3.0-only')
depends=(
  'dbus'
  'ffmpeg'
  'libcap'
  'libdrm'
  'libglvnd'
  'libpipewire'
  'libpulse'
  'libva'
  'libx11'
  'libxcomposite'
  'libxdamage'
  'libxfixes'
  'libxrandr'
  'wayland'
)
makedepends=(
  'git'
  'meson'
  'vulkan-headers'
)
optdepends=(
  'nvidia-utils: Required to record your screen on NVIDIA'
  'libxnvctrl: Required when using the -oc option to overclock the NVIDIA GPU to workaround NVIDIA p2 state bug'
  'mesa: Required to record your screen on AMD/Intel'
  'libva-mesa-driver: Required to record your screen on AMD'
  'libva-intel-driver: Required to record your screen on Intel G45 and HD Graphics family'
  'intel-media-driver: Required to record your screen on Intel Broadwell or later iGPUs or Intel Arc'
  'linux-firmware-intel: Required to record your screen on Intel Skylake or later iGPUs'
)

install="$_pkgname.install" # setcap cap_sys_admin (gsr-kms-server)

provides=("$_pkgname")
conflicts=("$_pkgname")

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$(sed 's&//git\.&//repo.&' <<< "$url")")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' \
    | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  arch-meson "$_pkgsrc" build
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}