summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-05-13 12:16:31 +0800
committerzxp198210052024-05-13 12:16:31 +0800
commit405f630b9cc1f755e4bcd806409efd775dd9e5a7 (patch)
tree56048b885f301027fc542189732a0c4789271f6c
parentd316bb3a0c98f551f2b8bd360dc8978de643636b (diff)
downloadaur-405f630b9cc1f755e4bcd806409efd775dd9e5a7.tar.gz
update to 0.2.10.r0.gff294f7
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD11
-rw-r--r--bookord.sh22
3 files changed, 24 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5493161d13de..da39c165e253 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = bookord-git
pkgdesc = An e-book reader
- pkgver = 0.2.6.r0.g276f14e
+ pkgver = 0.2.10.r0.gff294f7
pkgrel = 1
url = https://github.com/LiprikON2/Bookord
arch = any
@@ -10,11 +10,13 @@ pkgbase = bookord-git
makedepends = nvm
makedepends = gendesk
depends = electron29
- provides = bookord=0.2.6
+ optdepends = espeak-ng
+ optdepends = speech-dispatcher
+ provides = bookord=0.2.10
conflicts = bookord
source = bookord.git::git+https://github.com/LiprikON2/Bookord.git
source = bookord.sh
sha256sums = SKIP
- sha256sums = 05762c556c85a4423b28600ccbbe7b7dcdd3d1be526ef4a588a510671fa6c62a
+ sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d
pkgname = bookord-git
diff --git a/PKGBUILD b/PKGBUILD
index 0003347a8327..9b414c631bd9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=bookord-git
_pkgname=Bookord
-pkgver=0.2.6.r0.g276f14e
+pkgver=0.2.10.r0.gff294f7
_electronversion=29
_nodeversion=20
pkgrel=1
@@ -20,14 +20,18 @@ makedepends=(
'nvm'
'gendesk'
)
+optdepends=(
+ 'espeak-ng'
+ 'speech-dispatcher'
+)
source=(
"${pkgname//-/.}::git+${url}.git"
"${pkgname%-git}.sh")
sha256sums=('SKIP'
- '05762c556c85a4423b28600ccbbe7b7dcdd3d1be526ef4a588a510671fa6c62a')
+ '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d')
pkgver() {
cd "${srcdir}/${pkgname//-/.}"
- git describe --long --tags | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+ git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g'
}
_ensure_local_nvm() {
export NVM_DIR="${srcdir}/.nvm"
@@ -39,6 +43,7 @@ build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-git}|g" \
-e "s|@runname@|app.asar|g" \
+ -e "s|@cfgdirname@|${_pkgname}|g" \
-e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
-i "${srcdir}/${pkgname%-git}.sh"
_ensure_local_nvm
diff --git a/bookord.sh b/bookord.sh
index 5594e5380ba2..398398461fee 100644
--- a/bookord.sh
+++ b/bookord.sh
@@ -1,7 +1,8 @@
#!/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}"
@@ -11,19 +12,18 @@ 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}"
-_FLAGS_FILE="${XDG_CONFIG_HOME}/@appname@-flags.conf"
-declare -a flags
+export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf"
+declare -a _USER_FLAGS
if [[ -f "${_FLAGS_FILE}" ]]; then
- mapfile -t < "${_FLAGS_FILE}"
+ while read -r line; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
+ _USER_FLAGS+=("${line}")
+ fi
+ done < "${_FLAGS_FILE}"
fi
-for line in "${MAPFILE[@]}"; do
- if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
- flags+=("${line}")
- fi
-done
cd "${_APPDIR}"
if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
- exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS}" "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS[@]}" "$@"
else
- exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS}" "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS[@]}" "$@"
fi \ No newline at end of file