summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 75786c6fb476525da083c9a76128256bc11ac93b (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
# Maintainer: Alper T. <luperteverett at proton dot me>

# Note that you'll need to supply the UE1 games you want to play yourself
# And need a Vulkan capable GPU to run SurrealEngine

pkgname=surrealengine-git
pkgdesc="A reimplementation of Unreal Engine 1 (Git version)"
pkgver=r1042.784a270
pkgrel=1
arch=('x86_64')
depends=('libx11' 'spirv-tools' 'vulkan-icd-loader' 'vulkan-driver' 'sdl2' 'alsa-lib')
makedepends=('gcc' 'git' 'cmake' 'vulkan-driver' 'sdl2' 'alsa-lib' 'waylandpp')
optdepends=('waylandpp: For ZWidget Wayland backend')
provides=('surrealengine')
url="https://github.com/dpjudas/SurrealEngine"
license=('BSD-3-Clause AND MIT AND various others')
source=("git+${url}.git")
sha512sums=('SKIP')

pkgver() {
  cd "${srcdir}/SurrealEngine"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
  cd SurrealEngine
  [[ -d build ]] && rm -rf build
  mkdir build && cd build
  cmake -DCMAKE_BUILD_TYPE=Release ..

  make -j 16
}

package() {

  # Copy the built binaries
  install -Dm755 "${srcdir}/SurrealEngine/build/SurrealEngine" "${pkgdir}/usr/bin/surrealengine"
  install -Dm755 "${srcdir}/SurrealEngine/build/SurrealEditor" "${pkgdir}/usr/bin/surrealeditor"
  install -Dm755 "${srcdir}/SurrealEngine/build/SurrealDebugger" "${pkgdir}/usr/bin/surrealdebugger"

  # Copy SurrealEngine.pk3
  install -Dm755 "${srcdir}/SurrealEngine/build/SurrealEngine.pk3" "${pkgdir}/usr/share/surrealengine/SurrealEngine.pk3"

  # Copy license file and readme
  install -Dm644 "${srcdir}/SurrealEngine/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}"

  mkdir -p "${pkgdir}/usr/share/doc/surrealengine/"

  install -Dm644 "${srcdir}/SurrealEngine/README.md" "${pkgdir}/usr/share/doc/surrealengine/readme.md"
}