diff options
author | zxp19821005 | 2024-05-29 17:52:04 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-29 17:52:04 +0800 |
commit | 202757aa3d89eefde92e09259265fd8394d9b980 (patch) | |
tree | bf0692ec6975954747723b551bb876a36a98d3eb | |
parent | 3fbd28f57a0c76b797bf36b07b3d78f3c9e4e888 (diff) | |
download | aur-csbooks-bin.tar.gz |
update to 8.2.2
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | csbooks.sh | 24 |
3 files changed, 36 insertions, 21 deletions
@@ -1,18 +1,18 @@ pkgbase = csbooks-bin pkgdesc = A smart book management and reading software,also a PDF reader, EPUB reader, MOBI reader and DJVU file reader. - pkgver = 7.5.0 - pkgrel = 9 + pkgver = 8.2.2 + pkgrel = 1 url = https://caesiumstudio.com/csbooks/ arch = x86_64 license = LicenseRef-custom - depends = electron21-bin - provides = csbooks=7.5.0 + depends = electron13 + provides = csbooks=8.2.2 conflicts = csbooks - source = csbooks-bin-7.5.0.pacman::https://github.com/caesiumstudio/csBooks-updates/releases/download/latest/csBooks-7.5.0.pacman - source = LICENSE-7.5.0.html::https://caesiumstudio.com/eula/license + source = csbooks-bin-8.2.2.pacman::https://github.com/caesiumstudio/csBooks-updates/releases/download/latest/csBooks-8.2.2.pacman + source = LICENSE-8.2.2.html::https://caesiumstudio.com/eula/license source = csbooks.sh - sha256sums = b1dfc2d6b137580b7bba60da5d97886369170f6b38b3154ad919847b9eca7afc - sha256sums = e3b3003f395da5789a53b25e32f44d649524de7aad73cb79a1f48694f93ae8d5 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = a6f544e1b9a6546701a304b651b9ab6f34b20866ad832f88378085bcc666a95e + sha256sums = 258c68aa1cfa6963640aaf3776001ff55fe13df586726af039cc31c03c06f300 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = csbooks-bin @@ -1,9 +1,9 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=csbooks-bin _pkgname=csBooks -pkgver=7.5.0 -_electronversion=21 -pkgrel=9 +pkgver=8.2.2 +_electronversion=13 +pkgrel=1 pkgdesc="A smart book management and reading software,also a PDF reader, EPUB reader, MOBI reader and DJVU file reader." arch=('x86_64') url="https://caesiumstudio.com/csbooks/" @@ -12,20 +12,21 @@ license=('LicenseRef-custom') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - "electron${_electronversion}-bin" + "electron${_electronversion}" ) source=( "${pkgname}-${pkgver}.pacman::${_ghurl}/releases/download/latest/${_pkgname}-${pkgver}.pacman" "LICENSE-${pkgver}.html::https://caesiumstudio.com/eula/license" "${pkgname%-bin}.sh" ) -sha256sums=('b1dfc2d6b137580b7bba60da5d97886369170f6b38b3154ad919847b9eca7afc' - 'e3b3003f395da5789a53b25e32f44d649524de7aad73cb79a1f48694f93ae8d5' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +sha256sums=('a6f544e1b9a6546701a304b651b9ab6f34b20866ad832f88378085bcc666a95e' + '258c68aa1cfa6963640aaf3776001ff55fe13df586726af039cc31c03c06f300' + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') build() { sed -e "s|@electronversion@|${_electronversion}|g" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${_pkgname}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" diff --git a/csbooks.sh b/csbooks.sh index e6784b369c25..4cfe3ac09dd8 100644 --- a/csbooks.sh +++ b/csbooks.sh @@ -1,15 +1,29 @@ -#!/bin/sh -set -e +#!/bin/bash +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}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |