summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-05-30 18:40:59 +0800
committerzxp198210052024-05-30 18:40:59 +0800
commita54191a96f0e094f72042a1cb81f809660b7dfcb (patch)
treec9852544e69cd99f9d47fcfafed8ab2499a901f7
parent9e0d8b763ff38be32ae6c6255a9b8b9404f309ee (diff)
downloadaur-frosch-bin.tar.gz
fix errors
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--frosch.sh21
3 files changed, 28 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 39cb3c505512..fbea07e4453d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
pkgbase = frosch-bin
pkgdesc = Frosch, software para juego de rana electrónica o rana digital.
pkgver = 2.0.2
- pkgrel = 10
+ pkgrel = 11
url = https://github.com/ivanrey/Frosch
arch = i686
arch = x86_64
license = MIT
makedepends = gendesk
- depends = electron11-bin
+ depends = electron11
provides = frosch=2.0.2
conflicts = frosch
source = LICENSE-2.0.2::https://raw.githubusercontent.com/ivanrey/Frosch/v2.0.2/LICENSE
source = frosch.sh
sha256sums = 70d564391aa89ca77317a0716d27d450d939c41d0554a66da392b28784d6fa7d
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+ sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
source_i686 = frosch-2.0.2-i686.zip::https://github.com/ivanrey/Frosch/releases/download/v2.0.2/Frosch-linux-ia32.zip
sha256sums_i686 = 78ca0dbd64a0e6e1155632219d3990a76358abd8c385ef88a7094edc1a8aa8b6
source_x86_64 = frosch-2.0.2-x86_64.zip::https://github.com/ivanrey/Frosch/releases/download/v2.0.2/Frosch-linux-x64.zip
diff --git a/PKGBUILD b/PKGBUILD
index d5212c49fe5c..8c9884739823 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=frosch-bin
-_appname=Frosch
+_pkgname=Frosch
pkgver=2.0.2
_electronversion=11
-pkgrel=10
+pkgrel=11
pkgdesc="Frosch, software para juego de rana electrónica o rana digital."
arch=(
'i686'
@@ -14,28 +14,29 @@ license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
- "electron${_electronversion}-bin"
+ "electron${_electronversion}"
)
makedepends=(
'gendesk'
)
-source_i686=("${pkgname%-bin}-${pkgver}-i686.zip::${url}/releases/download/v${pkgver}/${_appname}-linux-ia32.zip")
-source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::${url}/releases/download/v${pkgver}/${_appname}-linux-x64.zip")
+source_i686=("${pkgname%-bin}-${pkgver}-i686.zip::${url}/releases/download/v${pkgver}/${_pkgname}-linux-ia32.zip")
+source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.zip::${url}/releases/download/v${pkgver}/${_pkgname}-linux-x64.zip")
source=(
"LICENSE-${pkgver}::https://raw.githubusercontent.com/ivanrey/Frosch/v${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('70d564391aa89ca77317a0716d27d450d939c41d0554a66da392b28784d6fa7d'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+ '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
sha256sums_i686=('78ca0dbd64a0e6e1155632219d3990a76358abd8c385ef88a7094edc1a8aa8b6')
sha256sums_x86_64=('16841565eecd5b9946711cfafdf9a0959c60fada1870c624f5d65f31cc31252f')
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"
- gendesk -q -f -n --categories="Game" --name="${_appname}" --exec="${pkgname%-bin} %U"
+ gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="Game" --name="${_pkgname}" --exec="${pkgname%-bin} %U"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
diff --git a/frosch.sh b/frosch.sh
index 7ddcaab8d734..4cfe3ac09dd8 100644
--- a/frosch.sh
+++ b/frosch.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