summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 12b9fe0032d71d22378f097ee6e06b010300261c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Ecmel B. CANLIER <aur+ocemu(at)admicos.cf>
pkgname="ocemu"
pkgver=0.0
pkgrel=2
pkgdesc="OpenComputers Emulator in Lua"
arch=("any")
url="https://github.com/gamax92/OCEmu"
license=("unknown")
depends=("lua52" "lua52-filesystem" "lua52-sec" "lua52-socket")
makedepends=("git" "svn" "luarocks5.2")
source=("ocemu::git+https://github.com/gamax92/OCEmu")
md5sums=("SKIP")
install=ocemu.install

build() {
    cd "ocemu"
    make
}

package() {
    _emudir="$pkgdir/usr/share/"
    _bindir="$pkgdir/usr/bin"

    mkdir -p "$_emudir"
    mkdir -p "$_bindir"

    cp "ocemu" "$_emudir" -r

    echo "#!/bin/bash" >> "$_bindir/$pkgname"
    echo "cd /usr/share/$pkgname/src" >> "$_bindir/$pkgname"
    echo "lua5.2 boot.lua ~/.local/share/ocemu/\$1" >> "$_bindir/$pkgname"

    chmod +x "$_bindir/$pkgname"
}