summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiao Junxuan2024-03-29 13:23:15 +0800
committerLiao Junxuan2024-03-29 13:23:15 +0800
commit48b7016dfe67f47ff2911c9a9aba7cc50460bf11 (patch)
tree2145e2a0fa7f3026dc16c6b05913a9a897a628aa
downloadaur-48b7016dfe67f47ff2911c9a9aba7cc50460bf11.tar.gz
add eepers-git
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD41
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e84d0eb81a2c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = eepers-git
+ pkgdesc = Simple Turn-based Game
+ pkgver = 1.2.r18.gc951f11
+ pkgrel = 1
+ url = https://github.com/tsoding/eepers
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = gcc-ada
+ depends = raylib
+ provides = eepers
+ source = git+https://github.com/tsoding/eepers.git
+ sha256sums = SKIP
+
+pkgname = eepers-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a5fb6da9862d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Junxuan Liao <mikeljx at 126 dot com>
+_pkgname=eepers
+pkgname=${_pkgname}-git
+pkgver=1.2.r18.gc951f11
+pkgrel=1
+pkgdesc="Simple Turn-based Game"
+arch=('x86_64')
+url="https://github.com/tsoding/eepers"
+license=('MIT')
+depends=('raylib')
+makedepends=('git' 'gcc-ada')
+provides=("$_pkgname")
+source=("git+$url.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${_pkgname}"
+ git describe --always --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${_pkgname}"
+ sed -i 's|assets|/usr/share/'$_pkgname'/&|g' eepers.adb
+}
+
+build() {
+ cd "${_pkgname}"
+ mkdir -p build
+ cd build
+ # shellcheck disable=SC2086
+ gnatmake $CFLAGS -gnat2012 ../eepers.adb -largs "$LDFLAGS" -lraylib -lm -pthread
+}
+
+package() {
+ cd "${_pkgname}"
+ install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ find assets -type f -exec \
+ install -Dm 644 '{}' "${pkgdir}/usr/share/$_pkgname/{}" \;
+ install -Dm 755 ./build/eepers "${pkgdir}"/usr/bin/eepers
+}