diff options
author | Rafael Cruz | 2020-08-09 02:26:54 -0300 |
---|---|---|
committer | Rafael Cruz | 2020-08-09 02:26:54 -0300 |
commit | 0532a000323ac93d50ea4c08349512efb675b70e (patch) | |
tree | 6123519c97abc43f8d333af6c8dbc74c0fbea25a /PKGBUILD | |
parent | 5cdad73228c88a389025dd0d6a1c1aba5090aa8e (diff) | |
download | aur-0532a000323ac93d50ea4c08349512efb675b70e.tar.gz |
Fix script to new fightcade version
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 61 |
1 files changed, 37 insertions, 24 deletions
@@ -1,41 +1,54 @@ # Maintainer: Rafael Cruz <rafaelcruz at outlook dot com> pkgname=fightcade2 -pkgver=2.0.12 -pkgrel=4 +pkgver=2.0.72 +pkgrel=5 pkgdesc='The best way to play your favorite retro games with or against any other player in the world.' -url='https://play.fightcade.com/' +url='https://www.fightcade.com/' arch=('any') license=('custom') -depends=(wine lib32-mpg123) -makedepends=(gendesk sed rsync) -source=(https://play.fightcade.com/download/fightcade2-linux64-v2.0.12.tar.gz) -md5sums=('8efa181b26a01b5d2b633d9e3146cd69') +depends=(rsync wine lib32-mpg123) +makedepends=(gendesk) +source=(https://web.fightcade.com/download/Fightcade-linux-latest.tar.gz) +md5sums=('SKIP') +_romsPkgname="$pkgname-roms" -_changelogpath="/log =\|fbaini =\|fbainidef =\|sn9xconf =\|sn9xconfdef =/ s|os.path.abspath(os.path.dirname(sys.argv\[0\]))|\"${HOME}/.fightcade2/\"|g" -_addupdateoption="s|if platform.system()==|if 'updateonly' not in sys.argv and platform.system()==|g" +createShellFiles() { + cat << 'EOF' > $srcdir/Fightcade/start.sh +#!/bin/bash +fightcadeUserFolderName="fightcade2" +fightcadeInstallFolder="/opt/$fightcadeUserFolderName" +fightcadeUserFolderPath="$HOME/.$fightcadeUserFolderName" +fightcadeRomsPath="$fightcadeUserFolderPath/ROMs" + +if [ "$1" = "roms" ]; then + xdg-open "$fightcadeRomsPath" + exit 1 +fi + +if [ ! -f "$fightcadeUserFolderPath/Fightcade2.sh" ] +then + mkdir -p "$fightcadeUserFolderPath" + rsync -r --copy-links $fightcadeInstallFolder/* $fightcadeUserFolderPath +fi + +sh "$fightcadeUserFolderPath/Fightcade2.sh" +EOF +} prepare() { - gendesk -n -f --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name "Fightcade 2" --exec "/opt/$pkgname/Fightcade2" - # sed -i '/if \[ -f update.log/d' $srcdir/Fightcade2/Fightcade2 - sed -i "$_addupdateoption" $srcdir/Fightcade2/Fightcade2.py - cd $srcdir/Fightcade2 - msg "Updating emulator and savestates..." - python2 Fightcade2.py updateonly - msg "Changing log and config paths..." - sed -i "$_changelogpath" $srcdir/Fightcade2/Fightcade2.py - sed -i "$_changelogpath" $srcdir/Fightcade2/emulator/fcade.py - sed -i "$_addupdateoption" $srcdir/Fightcade2/Fightcade2.py + gendesk -n -f --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name "Fightcade 2" --exec "/opt/$pkgname/start.sh" + gendesk -n -f --pkgname "$_romsPkgname" --name "Fightcade 2 ROMs Folder" --exec "/opt/$pkgname/start.sh roms" + createShellFiles } package() { install -dm755 $HOME/.$pkgname/ install -dm755 $pkgdir/opt/ - install -Dm644 "$srcdir/Fightcade2/fc2-electron/resources/app/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" + install -Dm644 "$srcdir/Fightcade/fc2-electron/resources/app/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm644 "$srcdir/$_romsPkgname.desktop" "$pkgdir/usr/share/applications/$_romsPkgname.desktop" msg "Copying files..." - rsync -r --chmod=755 $srcdir/Fightcade2/* $pkgdir/opt/$pkgname/ - msg "Changing emulators configs permissions..." - chmod 777 "$pkgdir/opt/$pkgname/emulator/snes9x/fcadesnes9x.conf" - chown -R $USER $pkgdir/opt/$pkgname/emulator/fba/config/ + rsync -r --copy-links $srcdir/Fightcade/* $pkgdir/opt/$pkgname/ + chmod +x $pkgdir/opt/$pkgname/start.sh } |