summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4986614bfaeaa0f9922658eb6061978936e7e396 (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
35
36
37
# Maintainer: aquova <austinbricker at protonmail dot com>

pkgname=smw
pkgver=0.1
pkgrel=1
pkgdesc='A reverse engineered implementation of Super Mario World'
url='https://github.com/snesrev/smw'
arch=("x86_64")
license=("MIT")
depends=('python' 'sdl2')
source=(
    "${url}/archive/refs/tags/v${pkgver}.zip"
    "local://smw.sfc"
)
sha1sums=(
    'ffb75a8cd022a63a03d237190668ed487ac6e76d'
    '6b47bb75d16514b6a476aa0c73a683a2a4c18765'
)

build() {
    cp $srcdir/smw.sfc $srcdir/smw-${pkgver}
    cd $srcdir/smw-${pkgver}
    make -j$(nproc)
}

package() {
    mkdir -p $pkgdir/opt/$pkgname
    cd $srcdir/smw-${pkgver}
    install -Dm755 smw $pkgdir/opt/$pkgname
    install -Dm644 smw.ini $pkgdir/opt/$pkgname
    install -Dm644 smw_assets.dat $pkgdir/opt/$pkgname

    echo "#!/usr/bin/env bash
    cd /opt/${pkgname}
    ./smw" > $pkgname.sh
    install -Dm755 $pkgname.sh $pkgdir/usr/bin/smw
}