summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGokberk Yaltirakli2019-10-26 19:16:29 +0100
committerGokberk Yaltirakli2019-10-26 19:16:29 +0100
commitc3b262f8726cadc83e25870960ddede791b2743c (patch)
treeaa0fff038baa8ebf87fcc754396518b6bbd43c41 /PKGBUILD
downloadaur-c3b262f8726cadc83e25870960ddede791b2743c.tar.gz
First commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f1ab1bde9af2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Gokberk Yaltirakli <aur at gkbrk dot com>
+pkgname=nothing
+_pkgname=nothing
+pkgver=r2505.9945a78
+pkgrel=1
+epoch=
+pkgdesc="A game about nothing"
+arch=('x86_64')
+url="https://github.com/tsoding/nothing"
+license=('GPL')
+depends=('sdl2')
+makedepends=('gcc' 'cmake')
+provides=('nothing')
+conflicts=('nothing')
+source=("nothing::git+$url")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+ # No patches needed for now
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+ rm -rf build
+ mkdir build
+ cd build
+ cmake ..
+ make
+
+ cat > "nothing-with-dir" <<EOF
+#!/bin/sh
+cd /usr/share/games/nothing
+exec /usr/lib/games/nothing/nothing
+EOF
+}
+
+check() {
+ cd "$srcdir/$_pkgname"
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+
+ ls assets/
+ install -Dm755 -d "$pkgdir/usr/share/games/nothing"
+ cp -r assets/* "$pkgdir/usr/share/games/nothing"
+
+ install -Dm755 "build/nothing" "$pkgdir/usr/lib/games/nothing/nothing"
+ install -Dm755 "build/nothing-with-dir" "$pkgdir/usr/bin/nothing"
+}