summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmls2015-07-28 22:36:34 +0200
committersmls2015-07-28 22:36:34 +0200
commit766cb71ce487a3cc9acce0aaca9091bfb419206e (patch)
treeafd3d3497f0b887670d1e8c3cecc717ab1f07998
parent4b4b914cb7e70947b2aeaaf46692adf1902bd528 (diff)
downloadaur-766cb71ce487a3cc9acce0aaca9091bfb419206e.tar.gz
extract game archive manually instead of running installer
-rw-r--r--PKGBUILD34
1 files changed, 18 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e03cd54c5676..9cb8a847887c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,29 +27,31 @@ case $CARCH in
esac
prepare() {
- msg2 "Prepare launch script..."
- echo "#!/usr/bin/env bash\n" \
- "export force_s3tc_enable=true\n" \
- "cd /opt/Bastion\n" \
- "/Bastion.bin.$_arch"
- > launcher.sh
+ msg2 "Extracting game data..."
+ rm -rf data; mkdir -p data/game
+ while read line; do echo -n '.'; done < <( # show progress as dots
+ sh $_gamepkg --tar xvf -C data
+ bsdtar -xvf data/instarchive_all -C data/game 2>&1
+ bsdtar -xvf data/instarchive_linux_$_arch -C data/game 2>&1
+ ); echo
+
+ msg2 "Preparing launch script..."
+ echo -e "#!/usr/bin/env bash\n" \
+ "export force_s3tc_enable=true\n" \
+ "cd /opt/bastion\n" \
+ "./Bastion.bin.$_arch" \
+ > launcher.sh
}
package() {
- # Run installer
- [[ -d "$_installname-$_hibver" ]] && rm -r "$_installname-$_hibver"
- sh $_gamepkg -u --packager pacman --nox11 --unattended \
- --target "$srcdir"/"$_installname-$_hibver" \
- --bindir "$pkgdir"/usr/bin \
- --datadir "$pkgdir"/opt
-
- # Fix permissions
- find "$pkgdir" -type f -exec chmod 644 "{}" +
+ # Install game data
+ install -d "$pkgdir"/opt/bastion
+ cp -alrT data/game "$pkgdir"/opt/bastion
# Install desktop file & icon
install -Dm644 $_installname.desktop \
"$pkgdir"/usr/share/applications/$_installname.desktop
- install -Dm644 "$pkgdir"/opt/Bastion/Bastion.png \
+ install -Dm644 data/game/Bastion.png \
"$pkgdir"/usr/share/icons/$_installname.png
# Install launch script