summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexander F Rødseth2015-06-10 14:49:10 +0200
committerAlexander F Rødseth2015-06-10 14:49:10 +0200
commit9d6edfed595794abd2906a3723c2410d3cdffc19 (patch)
tree00c463405047513d6a48e78a45a9b1943205d359 /PKGBUILD
downloadaur-dcpu-16.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8241e370b393
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 61589 2012-01-03 23:37:49Z arodseth $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+
+pkgname=dcpu-16
+pkgver=r3
+pkgrel=2
+pkgdesc="DCPU-16 assembler and emulator written in C++"
+arch=('x86_64' 'i686')
+url="http://n.ethz.ch/~vartokb/dcpu.html"
+license=('unknown')
+depends=('sdl')
+source=("http://n.ethz.ch/~vartokb/download/$pkgname-$pkgver.tar.bz2")
+sha256sums=('7c4c6d606b504552eb8871899be151fc7fd6401f1274a3d0928d9dc823095c08')
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ make clean
+ sed -i "s:data/font.bmp:/usr/share/$pkgname/font.bmp:" graphics.hpp
+ make
+ # Use .dcpx for compiled files
+ sed -i 's:".bin":".dcpx":' dcasm/main.cpp
+ sed -i 's:"bin":"dcpx":' dcasm/main.cpp
+ make -C dcasm
+ cd samples
+ # Use .dasm16 for source files
+ for f in *.asm; do mv "$f" "`basename "$f" .asm`.dasm16"; done;
+ for f in *.bin; do mv "$f" "`basename "$f" .bin`.dcpx"; done;
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm755 "dcasm/dcasm" "$pkgdir/usr/bin/dcasm"
+ install -Dm644 "data/font.bmp" "$pkgdir/usr/share/$pkgname/font.bmp"
+ cp -r samples "$pkgdir/usr/share/$pkgname"
+
+ # No license file yet
+ #install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et: