summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMarvin Dalheimer2018-03-01 20:44:40 +0100
committerMarvin Dalheimer2018-03-01 20:44:40 +0100
commit207e0078e6a1446247efe2101554cc8880478c02 (patch)
tree2ce0e591eab0991694908a7ce97ba68c746f50b3 /PKGBUILD
downloadaur-207e0078e6a1446247efe2101554cc8880478c02.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD75
1 files changed, 75 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a98b16e21b15
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+pkgname=godot-mono
+pkgver=3.0.1
+pkgrel=1
+pkgdesc="An advanced, feature packed, multi-platform 2D and 3D game engine."
+arch=('x86_64')
+url="https://godotengine.org/"
+license=('MIT')
+depends=('mono>=5.4.0' 'xterm')
+optdepends=('dotnet-sdk')
+makedepends=(
+ 'scons>=3.0'
+ 'libxcursor'
+ 'libxinerama'
+ 'libxi'
+ 'libxrandr'
+ 'mesa'
+ 'glu'
+ 'alsa-lib'
+ 'pulseaudio'
+ 'freetype2'
+ 'gcc'
+ 'pkg-config'
+)
+provides=('godot-mono')
+conflicts=('godot-mono-bin')
+source=(${pkgname}::git+https://github.com/godotengine/godot.git)
+md5sums=('SKIP')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ #Checkout actual version of Godot
+ git checkout ${pkgver}-stable
+
+ #Build temporary binaries to generate needed files for mono support
+ TERM=xterm scons platform=x11 tools=yes module_mono_enabled=yes mono_glue=no
+ bin/godot.x11.tools.64.mono --generate-mono-glue modules/mono/glue
+
+ # Build normal binaries
+ TERM=xterm scons platform=x11 target=release_debug tools=yes module_mono_enabled=yes bits=64
+}
+
+package() {
+ install -d \
+ "${pkgdir}/opt/${pkgname}/" \
+ "${pkgdir}/usr/bin/" \
+ "${pkgdir}/usr/share/applications/"
+
+ rsync -a \
+ "${srcdir}/${pkgname}/bin" "${pkgdir}/opt/${pkgname}"
+
+ # I have to use TERM=xterm because of an bug in mono
+ cat > "${pkgdir}/usr/bin/${pkgname}" <<-EOF
+ #!/usr/bin/env bash
+ TERM=xterm /opt/godot-mono/bin/godot.x11.opt.tools.64.mono
+ EOF
+
+ chmod a+x ${pkgdir}/usr/bin/${pkgname}
+
+ install -Dm644 \
+ "${srcdir}/${pkgname}/icon.svg" \
+ "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
+
+ cat > "${pkgdir}/usr/share/applications/${pkgname}.desktop" <<-EOF
+ [Desktop Entry]
+ Type=Application
+ Name=Godot-Mono
+ GenericName=Godot 2D and 3D game engine
+ Comment=Godot is an Open-Source game engine for 2D and 3D games
+ Keywords=game-dev;development;
+ Categories=Development;
+ Exec=/usr/bin/${pkgname}
+ Icon=${pkgname}
+ EOF
+}