diff options
author | zxp19821005 | 2024-05-13 15:37:43 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-13 15:37:43 +0800 |
commit | 735f26b551aa2770da1b282c7474c2eea5eaec2d (patch) | |
tree | 21c5e8d86f710266bce56553d4e1df375c56171d | |
parent | 0e4fac1bdb024aaecc80ed1afdc540edf2303ae7 (diff) | |
download | aur-altitude-metrix-wallet-bin.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | altitude-metrix-wallet.sh | 21 |
3 files changed, 25 insertions, 13 deletions
@@ -1,13 +1,12 @@ pkgbase = altitude-metrix-wallet-bin pkgdesc = The Metrix wallet https://metrixcoin.com. pkgver = 3.3.2 - pkgrel = 3 + pkgrel = 4 url = https://github.com/TheLindaProjectInc/Altitude arch = x86_64 license = GPL-3.0-only makedepends = fuse2 - depends = hicolor-icon-theme - depends = electron25-bin + depends = electron25 depends = java-runtime depends = nodejs provides = altitude-metrix-wallet=3.3.2 @@ -15,6 +14,6 @@ pkgbase = altitude-metrix-wallet-bin source = altitude-metrix-wallet-3.3.2.AppImage::https://github.com/TheLindaProjectInc/Altitude/releases/download/3.3.2/Altitude-Metrix-Wallet-linux-x64.AppImage source = altitude-metrix-wallet.sh sha256sums = 1dd43d34b0c4e8870d099dbcaacfe09b8121f16453e336f446aeae1e79871301 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d pkgname = altitude-metrix-wallet-bin @@ -3,7 +3,7 @@ pkgname=altitude-metrix-wallet-bin _appname=Altitude-Metrix-Wallet pkgver=3.3.2 _electronversion=25 -pkgrel=3 +pkgrel=4 pkgdesc="The Metrix wallet https://metrixcoin.com." arch=('x86_64') url="https://github.com/TheLindaProjectInc/Altitude" @@ -11,8 +11,7 @@ license=('GPL-3.0-only') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'hicolor-icon-theme' - "electron${_electronversion}-bin" + "electron${_electronversion}" 'java-runtime' 'nodejs' ) @@ -24,11 +23,12 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('1dd43d34b0c4e8870d099dbcaacfe09b8121f16453e336f446aeae1e79871301' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d') build() { sed -e "s|@electronversion@|${_electronversion}|g" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${pkgname%-bin}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" @@ -37,7 +37,7 @@ build() { find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \; } package() { - install -Dm755 "${srcdir}/${pkgname%-bin}.sh" -t "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" cp -r "${srcdir}/squashfs-root/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}" install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" diff --git a/altitude-metrix-wallet.sh b/altitude-metrix-wallet.sh index 7ddcaab8d734..398398461fee 100644 --- a/altitude-metrix-wallet.sh +++ b/altitude-metrix-wallet.sh @@ -1,16 +1,29 @@ #!/bin/bash -set -e +set -o pipefail _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" _OPTIONS="@options@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 export ELECTRON_FORCE_IS_PACKAGED=true +export ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |