blob: 8ced2612d23bd603bdfdbb225a3917bccb358eb8 (
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
|
# Maintainer: Martin Reboredo <yakoyoku@gmail.com>
pkgname=godot-cpp
pkgver=4.3
pkgrel=1
pkgdesc='C++ bindings for the Godot script API'
arch=('x86_64')
url='https://godotengine.org'
license=('MIT')
makedepends=(cmake godot=$pkgver python)
source=(
https://github.com/godotengine/$pkgname/archive/refs/tags/godot-$pkgver-stable.tar.gz
godot-cpp.pc.in
)
sha256sums=('e6dfe8ee1ab3eeaadc9dba2dcb5ef39c4a99635986148fa893ce5c414153743f'
'675cbdf08979edcf5cbd951b88a6b00b5d5a24fd9c68418b8d7b4c77dcf722a3')
prepare() {
cd "$srcdir"/${pkgname}-godot-${pkgver}-stable
sed "s/@VERSION@/$pkgver/" "$srcdir"/godot-cpp.pc.in > godot-cpp.pc
}
build() {
cd "$srcdir"/${pkgname}-godot-${pkgver}-stable
cd gdextension
godot --display-driver headless --dump-extension-api --dump-gdextension-interface
cd ..
cmake -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
package() {
cd "$srcdir"/${pkgname}-godot-${pkgver}-stable
install -dm755 "$pkgdir"/usr/{lib,include}
install -Dm644 build/bin/libgodot-cpp.linux.*.a "$pkgdir"/usr/lib/libgodot-cpp.a
install -Dm644 godot-cpp.pc "$pkgdir"/usr/lib/pkgconfig/godot-cpp.pc
cp -rup {,build/gen/}include/godot_cpp "$pkgdir"/usr/include
install -Dm644 gdextension/gdextension_interface.h "$pkgdir"/usr/include/godot_cpp
install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
}
|