aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-11-17 16:38:04 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2015-06-01 16:03:44 +0200
commit3f4c117cef63b425066df2d9807b108041b45ec8 (patch)
tree8870cc458702bc481a169756be65661f808e6ff3
downloadpkgbuilds-3f4c117cef63b425066df2d9807b108041b45ec8.tar.xz
vitetris: Import packagevitetris
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD49
-rw-r--r--vitetris-makefile.patch14
-rw-r--r--vitetris.install7
-rw-r--r--vitetris.tmpfiles.conf2
5 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..105ffc9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by makepkg 4.2.1
+# Mon Jun 1 15:00:01 UTC 2015
+pkgbase = vitetris
+ pkgdesc = A terminal-based Tetris clone with 2-player mode
+ pkgver = 0.57
+ pkgrel = 2
+ url = http://victornils.net/tetris
+ install = vitetris.install
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = patch
+ depends = ncurses
+ options = !makeflags
+ source = http://victornils.net/tetris/vitetris-0.57.tar.gz
+ source = vitetris-makefile.patch
+ source = vitetris.tmpfiles.conf
+ md5sums = 07d02ee03e2edd66a8741729e237f21f
+ md5sums = 23be30294af1dbc43c594a8b737091c8
+ md5sums = c4c6a6d4250c0aa3bbf3c4a7d911fa1c
+
+pkgname = vitetris
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..19ee809
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+pkgname=vitetris
+pkgver=0.57
+pkgrel=2
+
+pkgdesc="A terminal-based Tetris clone with 2-player mode"
+url="http://victornils.net/tetris"
+arch=('i686' 'x86_64')
+license=('BSD')
+
+depends=('ncurses')
+makedepends=('patch')
+
+options=('!makeflags')
+
+install=$pkgname.install
+
+source=(http://victornils.net/tetris/vitetris-$pkgver.tar.gz
+ vitetris-makefile.patch
+ vitetris.tmpfiles.conf)
+
+md5sums=('07d02ee03e2edd66a8741729e237f21f'
+ '23be30294af1dbc43c594a8b737091c8'
+ 'c4c6a6d4250c0aa3bbf3c4a7d911fa1c')
+
+prepare() {
+ cd vitetris-${pkgver}
+ patch -Np1 -i "$srcdir"/vitetris-makefile.patch
+
+# Change configuration file to a standard one:
+ sed -i 's|#define CONFIG_FILENAME ".vitetris"|#define CONFIG_FILENAME ".config/vitetris"|' src/config2.h
+}
+
+build() {
+ cd vitetris-$pkgver
+
+ ./configure --prefix="$pkgdir"/usr --docdir="$pkgdir"/usr/share/vitetris --without-x --with-ncurses
+ make
+ make gameserver
+}
+
+package() {
+ install -Dm644 vitetris.tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/vitetris.conf
+
+ cd vitetris-$pkgver
+ make install
+ install -Dm755 gameserver "$pkgdir"/usr/bin/vitetris-gameserver
+
+ install -Dm644 licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/vitetris-makefile.patch b/vitetris-makefile.patch
new file mode 100644
index 0000000..5c7fd31
--- /dev/null
+++ b/vitetris-makefile.patch
@@ -0,0 +1,14 @@
+--- a/Makefile.orig
++++ b/Makefile
+@@ -3 +3 @@
+-PROGNAME = tetris$(EXE)
++PROGNAME = vitetris$(EXE)
+@@ -6 +6 @@
+-#HISCORE_FILENAME = /var/games/vitetris-hiscores
++HISCORE_FILENAME = /var/games/vitetris/hiscores
+@@ -59 +59 @@
+- $(INSTALL) -m644 README licence.txt $(DESTDIR)$(docdir)
++ $(INSTALL) -m644 README $(DESTDIR)$(docdir)
+@@ -75 +75 @@
+- if [ -z "$$HS_FN" ]; then HS_FN=/var/games/vitetris-hiscores; fi; \
++ if [ -z "$$HS_FN" ]; then HS_FN=/var/games/vitetris/hiscores; fi; \
diff --git a/vitetris.install b/vitetris.install
new file mode 100644
index 0000000..ddf9c60
--- /dev/null
+++ b/vitetris.install
@@ -0,0 +1,7 @@
+post_install() {
+ systemd-tmpfiles --create vitetris.conf
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/vitetris.tmpfiles.conf b/vitetris.tmpfiles.conf
new file mode 100644
index 0000000..5200be0
--- /dev/null
+++ b/vitetris.tmpfiles.conf
@@ -0,0 +1,2 @@
+d /var/games/vitetris 0775 root games -
+f /var/games/vitetris/hiscores 0664 root games -