diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | fukayo.sh | 21 |
3 files changed, 37 insertions, 13 deletions
@@ -1,20 +1,24 @@ pkgbase = fukayo-bin pkgdesc = A desktop application to read your favorite manga/manhwa/manhua from your favorite websites. pkgver = 0.13.0 - pkgrel = 8 + pkgrel = 9 url = https://github.com/JiPaix/Fukayo arch = x86_64 license = MIT makedepends = fuse2 - depends = electron24-bin - depends = java-runtime + depends = electron22 + depends = gtk2 + depends = nodejs provides = fukayo=0.13.0 conflicts = fukayo + options = !strip + options = !emptydirs + options = !staticlibs source = fukayo-0.13.0.AppImage::https://github.com/JiPaix/Fukayo/releases/download/v0.13.0/Fukayo-0.13.0.AppImage source = LICENSE-0.13.0::https://raw.githubusercontent.com/JiPaix/fukayo/v0.13.0/LICENSE source = fukayo.sh sha256sums = f982a5dc87485a30ac82f8c77dd400733ee192aa8d34f28fb59f06b7205a7861 sha256sums = c3fb2affb5fa8ed0b1866d379461e7e0c845ac7011f67aa7410cfe080f8d753a - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051 pkgname = fukayo-bin @@ -2,8 +2,8 @@ pkgname=fukayo-bin _appname=Fukayo pkgver=0.13.0 -_electronversion=24 -pkgrel=8 +_electronversion=22 +pkgrel=9 pkgdesc="A desktop application to read your favorite manga/manhwa/manhua from your favorite websites." arch=('x86_64') url="https://github.com/JiPaix/Fukayo" @@ -11,12 +11,18 @@ license=("MIT") conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - "electron${_electronversion}-bin" - 'java-runtime' + "electron${_electronversion}" + 'gtk2' + 'nodejs' ) makedepends=( 'fuse2' ) +options=( + '!strip' + '!emptydirs' + '!staticlibs' +) source=( "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_appname}-${pkgver}.AppImage" "LICENSE-${pkgver}::https://raw.githubusercontent.com/JiPaix/fukayo/v${pkgver}/LICENSE" @@ -24,11 +30,12 @@ source=( ) sha256sums=('f982a5dc87485a30ac82f8c77dd400733ee192aa8d34f28fb59f06b7205a7861' 'c3fb2affb5fa8ed0b1866d379461e7e0c845ac7011f67aa7410cfe080f8d753a' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051') 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" diff --git a/fukayo.sh b/fukayo.sh index 7ddcaab8d734..4cfe3ac09dd8 100644 --- a/fukayo.sh +++ b/fukayo.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 |