diff options
Diffstat (limited to 'pkgbuilds/albion-online-launcher-bin')
5 files changed, 176 insertions, 0 deletions
diff --git a/pkgbuilds/albion-online-launcher-bin/Albion-Online.patch b/pkgbuilds/albion-online-launcher-bin/Albion-Online.patch new file mode 100644 index 0000000..3a7d3ae --- /dev/null +++ b/pkgbuilds/albion-online-launcher-bin/Albion-Online.patch @@ -0,0 +1,38 @@ +--- old 2022-08-09 09:07:35.000000000 -0600 ++++ new 2022-09-13 13:54:49.424249375 -0600 +@@ -1,16 +1,25 @@ + #!/bin/sh + SCRIPT=$(readlink -f "$0") + SCRIPTPATH=$(dirname "$SCRIPT") +-export QT_QPA_PLATFORM_PLUGIN_PATH="$SCRIPTPATH/launcher/plugins/platforms" +-export QT_PLUGIN_PATH="$SCRIPTPATH/launcher/plugins/" +-OSNAME=$(grep '^NAME=' /etc/os-release) +- +-if [ $OSNAME != "NAME=\"SteamOS\"" ]; then + export LIBGL_ALWAYS_SOFTWARE=1 + export QSG_INFO=1 +-"$SCRIPTPATH/launcher/Albion-Online" "--no-sandbox" "-loglevel 0" "$@" & +-else +-export QT_QPA_PLATFORM="xcb;eglfs" +-export __GL_GlslUseCollapsedArrays=0 +-"$SCRIPTPATH/launcher/Albion-Online" "--no-sandbox" "$@" & ++ ++LD_PRELOAD=\ ++/opt/albion-online-launcher-bin/launcher/libsteam_api.so \ ++"$SCRIPTPATH/launcher/Albion-Online" "--no-sandbox" "-loglevel 0" "$@" ++ ++declare exit_code=$? ++declare core_dump_msg="Core Dump can be produced by corrupt cache ++Clear user cache/configuration and try again! ++\trm -rf \"$HOME/.config/Sandbox Interactive GmbH\" ++\trm -rf \"$HOME/.config/unity3d/Sandbox Interactive GmbH\" ++\trm -rf \"$HOME/.local/share/Sandbox Interactive GmbH/Albion Online Launcher\" ++" ++ ++## Clear cache on core dump ++if (( $exit_code )); then ++ echo "Bad exit code: $exit_code" ++ if (( $exit_code >= 128 )); then ## Core Dump ++ printf "$core_dump_msg" ++ fi + fi diff --git a/pkgbuilds/albion-online-launcher-bin/PKGBUILD b/pkgbuilds/albion-online-launcher-bin/PKGBUILD new file mode 100644 index 0000000..e68b16e --- /dev/null +++ b/pkgbuilds/albion-online-launcher-bin/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Jeancarlo Hidalgo <jeancahu at gmail dot com> +# Contributor: hydrasho <first name [at] last name [dot] net> +# Contributor: GoliathLabs <first name [at] last name [dot] net> +# Contributor: Grey Christoforo <first name [at] last name [dot] net> + +pkgname=albion-online-launcher-bin +pkgver=1.0.34.447 +pkgrel=1 +epoch=1 +pkgdesc="The first true cross-platform Sandbox MMO -- launcher client" +url="https://albiononline.com/" +arch=('x86_64') +license=('custom') +groups=('albion') +depends=( + 'libgl' + 'alsa-lib' + 'libxcb' + 'libxkbcommon' + 'sdl2' + 'qt5-webengine' + 'xdelta3' + 'zenity' +) +makedepends=(chrpath) +#checkdepends=() +#optdepends=() +source=($pkgname-$pkgver::"https://live.albiononline.com/clients/20230719101556/albion-online-setup" + "albion-online-launcher.desktop" "albion-online" "Albion-Online.patch") +install=albion-online-launcher-bin.install +options=(!strip docs libtool emptydirs !zipman staticlibs) +sha256sums=('189c8cd53d2fcd91e91f76cbc9e56a6c9516322f9bc30e1527a2e62969243b08' + '8522ec18f3eba72aefc88c945263bad1b66b8c59d0e0c70c52bc737cff129853' + 'dc8abe731ac9a189a1265fccc13f40f80efd467559dcc03c0dcff8e4ae2bac60' + '997b87a699a831c37a335f06384cc189787deefd1ee5245381c7c99fbadfc510') + +prepare() { + chrpath -d "${srcdir}/data/launcher/Albion-Online" + + pushd "${srcdir}/data/launcher" + rm libQt5* qt.conf xdelta3 QtWebEngineProcess libicu* \ + libSDL2-2.0.so.0 libSDL2-2.0.so \ + libcrypto.so libssl.so libxkbcommon* libxcb* + + rm -r resources plugins translations + chmod 775 ./* + chmod 664 version.txt + popd + + pushd "${srcdir}/data" + patch Albion-Online < "${srcdir}/Albion-Online.patch" + popd +} + +package() { + mkdir -p "${pkgdir}/opt" + cp -a "${srcdir}/data" "${pkgdir}/opt/${pkgname}" + chmod 755 "$pkgdir/opt/${pkgname}" + + mkdir -p "${pkgdir}/opt/${pkgname}/game_x64" + chmod 2775 "${pkgdir}/opt/${pkgname}/game_x64" + + ## Give albion group permission to update the launcher + chmod 2775 "${pkgdir}/opt/${pkgname}/launcher" + + # Link launcher to usr/system binaries directory + mkdir -p "${pkgdir}/usr/bin" + install -m755 -D "${srcdir}/albion-online" "${pkgdir}/usr/bin" + + # Install .desktop file + install -m755 -D "${srcdir}/albion-online-launcher.desktop" -t "${pkgdir}/usr/share/applications" + + # Move EULA to /usr/share licenses path + install -Dm644 "${srcdir}/data/eula.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: diff --git a/pkgbuilds/albion-online-launcher-bin/albion-online b/pkgbuilds/albion-online-launcher-bin/albion-online new file mode 100755 index 0000000..ab727ce --- /dev/null +++ b/pkgbuilds/albion-online-launcher-bin/albion-online @@ -0,0 +1,31 @@ +#!/bin/bash + +declare no_group="Please run the next command in your terminal to give user "\ +"${USER} permissions to update Albion game data:\n"\ +"\nsudo usermod -a -G albion ${USER}" +declare no_sudo="Don't run this game as root(sudo)!! it could be a security risk!" + +if [[ "$USER" == "root" ]]; then + echo -e "${no_sudo}" + exit 1 +fi + +if which newgrp; then : +else + echo "A core package \"util-linux\" is required" + exit 2 +fi + +if (( $( id -nG "$USER" | grep -c '\balbion\b' ) )) # Does the user have the permissions to run as group albion? +then + newgrp albion <<< /opt/albion-online-launcher-bin/Albion-Online +else + if zenity \ + --info \ + --text="$no_group"; then : + else + ## Zenity is not installed + echo -e "${no_group}" + fi + exit 4 +fi diff --git a/pkgbuilds/albion-online-launcher-bin/albion-online-launcher-bin.install b/pkgbuilds/albion-online-launcher-bin/albion-online-launcher-bin.install new file mode 100644 index 0000000..12b5ea7 --- /dev/null +++ b/pkgbuilds/albion-online-launcher-bin/albion-online-launcher-bin.install @@ -0,0 +1,22 @@ +post_install() { + post_upgrade +} + +post_upgrade() { + groupadd -r albion &> /dev/null + + cat << "EOM" +==> New group installed: albion +==> Your user must be in the albion group for the launcher to work properly, eg. +==> sudo usermod -a -G albion ${USER} +EOM + chgrp -R albion "/opt/albion-online-launcher-bin/launcher" + chgrp -R albion "/opt/albion-online-launcher-bin/game_x64" +} + +post_remove() { +cat << "EOM" +==> Group removed: albion +EOM + groupdel albion &> /dev/null +} diff --git a/pkgbuilds/albion-online-launcher-bin/albion-online-launcher.desktop b/pkgbuilds/albion-online-launcher-bin/albion-online-launcher.desktop new file mode 100644 index 0000000..94e13f5 --- /dev/null +++ b/pkgbuilds/albion-online-launcher-bin/albion-online-launcher.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Albion Launcher +Comment=The first true cross-platform Sandbox MMO -- game launcher +Exec=albion-online +Icon=/opt/albion-online-launcher-bin/AlbionOnline.xpm +Categories=Game; +Terminal=false |