diff options
author | zxp19821005 | 2024-05-31 15:28:44 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-31 15:28:44 +0800 |
commit | 76b8e38bdc2498a6c21235aba3a5e7e96fa0c6d1 (patch) | |
tree | bafbdf1f6ffa51049d65fd274b4b0cf02e4d3662 | |
parent | 0815230697e0e6b1c59b55bd5d5c1b5e1265109a (diff) | |
download | aur-76b8e38bdc2498a6c21235aba3a5e7e96fa0c6d1.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | snapmail.sh | 21 |
3 files changed, 31 insertions, 13 deletions
@@ -1,22 +1,23 @@ pkgbase = snapmail-bin pkgdesc = An open-source P2P messaging app based on Holochain.It is the latest iteration of Snapmail from Glass Bead Software. pkgver = 0.3.1_rc.6 - pkgrel = 3 + pkgrel = 4 url = https://github.com/glassbeadsoftware/snapmail arch = x86_64 license = CAL-1.0 makedepends = fuse2 - depends = electron19-bin - depends = java-runtime + depends = electron19 depends = nodejs + depends = gtk2 provides = snapmail=0.3.1_rc.6 conflicts = snapmail options = !strip + options = !emptydirs source = snapmail-0.3.1_rc.6.AppImage::https://github.com/glassbeadsoftware/snapmail/releases/download/v0.3.1-rc.6/Snapmail-0.3.1.AppImage source = LICENSE-0.3.1_rc.6.md::https://raw.githubusercontent.com/glassbeadsoftware/snapmail/v0.3.1-rc.6/LICENSE.md source = snapmail.sh sha256sums = e40525d3a19e352aaa261539ae9304a9eaf434ebcf4c427583062ecb12022fab sha256sums = 12ce98b0343aa56cfff71264980dbbcb0f4696bff5500c3ea5f59aed05b9ef62 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = snapmail-bin @@ -3,7 +3,7 @@ pkgname=snapmail-bin _pkgname=Snapmail pkgver=0.3.1_rc.6 _electronversion=19 -pkgrel=3 +pkgrel=4 pkgdesc="An open-source P2P messaging app based on Holochain.It is the latest iteration of Snapmail from Glass Bead Software." arch=('x86_64') url="https://github.com/glassbeadsoftware/snapmail" @@ -11,14 +11,17 @@ license=('CAL-1.0') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - "electron${_electronversion}-bin" - 'java-runtime' + "electron${_electronversion}" 'nodejs' + 'gtk2' ) makedepends=( 'fuse2' ) -options=('!strip') +options=( + '!strip' + '!emptydirs' +) _install_path="/opt/appimages" source=( "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver//_/-}/${_pkgname}-${pkgver%_rc.6}.AppImage" @@ -27,11 +30,12 @@ source=( ) sha256sums=('e40525d3a19e352aaa261539ae9304a9eaf434ebcf4c427583062ecb12022fab' '12ce98b0343aa56cfff71264980dbbcb0f4696bff5500c3ea5f59aed05b9ef62' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|g" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app|g" \ + -e "s|@cfgdirname@|${_pkgname}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" diff --git a/snapmail.sh b/snapmail.sh index 7ddcaab8d734..4cfe3ac09dd8 100644 --- a/snapmail.sh +++ b/snapmail.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 |