summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose17112019-01-28 11:38:16 +0100
committerjose17112019-01-28 11:38:16 +0100
commitf296b543349938b60e0e03d6de0ef094035b9e1c (patch)
tree30fb994a4fe292068a8bda1c578320bcd1922848
downloadaur-lander-curses-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD43
-rw-r--r--lander-curses-git.install20
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..49da896a1a2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Mon Jan 28 10:37:58 UTC 2019
+pkgbase = lander-curses-git
+ pkgdesc = 1989 curses implementation of the ancient lunar lander video game
+ pkgver = r7.5d74b68
+ pkgrel = 1
+ url = https://github.com/staceycampbell/lander
+ install = lander-curses-git.install
+ arch = x86_64
+ arch = i686
+ license = GPL
+ makedepends = git
+ depends = ncurses
+ conflicts = lander-curses
+ source = lander-curses-git::git+https://github.com/staceycampbell/lander.git
+ md5sums = SKIP
+
+pkgname = lander-curses-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..920803b7a6c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Jose Riha <jose1711 gmail com>
+
+pkgname=lander-curses-git
+_pkgname=lander
+pkgver=r7.5d74b68
+pkgrel=1
+pkgdesc="1989 curses implementation of the ancient lunar lander video game"
+url="https://github.com/staceycampbell/lander"
+depends=('ncurses')
+makedepends=('git')
+conflicts=('lander-curses')
+license=('GPL')
+arch=('x86_64' 'i686')
+source=("${pkgname}"::'git+https://github.com/staceycampbell/lander.git')
+md5sums=('SKIP')
+install="${pkgname}.install"
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd ${srcdir}/${pkgname}
+ sed -i '/^HSFILE/s%.*%HSFILE := /usr/share/lander/lander.hs%' Makefile
+}
+
+build() {
+ cd ${srcdir}/${pkgname}
+ make
+ gzip lander.6
+}
+
+package() {
+ cd ${srcdir}/${pkgname}
+ install -d "${pkgdir}/usr/share/lander"
+ install -Dm755 lander "${pkgdir}/usr/bin/lander"
+ install -Dm644 lander.6.gz "${pkgdir}/usr/share/man/man6/lander.6.gz"
+ install -Dm644 README "${pkgdir}/usr/share/doc/lander/README"
+ touch "${pkgdir}/usr/share/lander/lander.hs"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/lander-curses-git.install b/lander-curses-git.install
new file mode 100644
index 00000000000..4bf0b1bdf67
--- /dev/null
+++ b/lander-curses-git.install
@@ -0,0 +1,20 @@
+post_install() {
+ chgrp games /usr/share/lander/lander.hs
+ chmod g+w /usr/share/lander/lander.hs
+
+ echo "Add user to group games to be able to save highscores"
+ /bin/true
+}
+
+post_upgrade() {
+/bin/true
+}
+
+pre_remove() {
+/bin/true
+}
+
+op=$1
+shift
+
+$op "$@"