summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c64da6e2d2e76c7aecb9a127f7c502961d8c432 (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
# Maintainer:  Christopher Reimer <mail at c-reimer dot de>

pkgname=opengothic
pkgver=1.0.2324
pkgrel=1
pkgdesc="Open source remake of Gothic 2: Night of the raven"
arch=('x86_64')
url='https://github.com/Try/OpenGothic'
license=('MIT')
depends=('alsa-lib' 'gcc-libs' 'libx11' 'libxcursor' 'vulkan-icd-loader')
makedepends=('cmake' 'git' 'glslang' 'libglvnd' 'vulkan-headers')
source=("git+https://github.com/Try/OpenGothic#commit=c8cd3d68cb0b16159118a537008932ec82884496" #tag=opengothic-v1.0.2207
        "git+https://github.com/Try/Tempest.git"
        "git+https://github.com/schellingb/TinySoundFont.git"
        "git+https://github.com/bulletphysics/bullet3.git"
        "git+https://github.com/GothicKit/phoenix.git"
        "git+https://github.com/doctest/doctest.git"
        "git+https://github.com/g-truc/glm.git"
        "git+https://github.com/lmichaelis/phoenix-libsquish.git"
        "git+https://github.com/mandreyel/mio.git"
)
sha512sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')
options=('!emptydirs')

prepare() {
  cd "${srcdir}/OpenGothic"
  git submodule init
  git config submodule.lib/Tempest.url "$srcdir/Tempest"
  git config submodule.lib/bullet3.url "$srcdir/bullet3"
  git config submodule.lib/TinySoundFont.url "$srcdir/TinySoundFont"
  git config submodule.lib/phoenix.url "$srcdir/phoenix"
  git -c protocol.file.allow=always submodule update
  
  cd "${srcdir}/OpenGothic/lib/phoenix"
  git submodule init
  git config submodule.vendor/doctest.url "$srcdir/doctest"
  git config submodule.vendor/glm.url "$srcdir/glm"
  git config submodule.vendor/libsquish.url "$srcdir/phoenix-libsquish"
  git config submodule.vendor/mio.url "$srcdir/mio"


  git -c protocol.file.allow=always submodule update
}

build() {
  cd "OpenGothic"
  
  cmake -B build \
    -DOpenGL_GL_PREFERENCE=GLVND \
    -DTEMPEST_BUILD_SHARED=OFF \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr
  make -C build
}

package() {
  cd "OpenGothic"
  DESTDIR="${pkgdir}" make -C build install
  rm -r "${pkgdir}/usr/lib"
  rm -r "${pkgdir}/usr/include"
  
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}