diff options
author | zxp19821005 | 2023-12-14 10:51:15 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-14 10:51:15 +0800 |
commit | 31f43394a9789f1c20f20b7e125e5c1c58895097 (patch) | |
tree | 87e0625751c3dde572e719011280b054153c8cf2 | |
parent | 4bb9091b69475fced02efc418a865eb48c3102cd (diff) | |
download | aur-31f43394a9789f1c20f20b7e125e5c1c58895097.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | thinreports-section-editor.sh | 17 |
3 files changed, 25 insertions, 19 deletions
@@ -1,12 +1,11 @@ pkgbase = thinreports-section-editor-bin pkgdesc = A template editor for Thinreports to edit Section Format templates pkgver = 1.0.0_dev - pkgrel = 3 + pkgrel = 4 url = https://github.com/thinreports/thinreports arch = x86_64 license = MIT makedepends = squashfuse - depends = bash depends = electron21 depends = hicolor-icon-theme depends = libx11 @@ -18,10 +17,10 @@ pkgbase = thinreports-section-editor-bin provides = thinreports-section-editor=1.0.0_dev conflicts = thinreports-section-editor source = thinreports-section-editor-1.0.0_dev.AppImage::https://github.com/thinreports/thinreports-section-editor/releases/download/v1.0.0-dev/thinreports-section-editor-1.0.0-dev-linux-20221031-0b5119.AppImage - source = LICENSE::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/v1.0.0-dev/LICENSE + source = LICENSE-1.0.0_dev::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/v1.0.0-dev/LICENSE source = thinreports-section-editor.sh sha256sums = 818e3b1fdf4fb1ed1fdbe47cc58a034074a652577a887b168edfb033f47b6aeb sha256sums = 2d416fa05a32860094f618f477a982dd77676b236dc710f2a4df289b7e43ae0c - sha256sums = e3490f0c03b99a2b52c2e63fe7a04fc050bb127648c4e3dd5bd506c44fa10c13 + sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 pkgname = thinreports-section-editor-bin @@ -1,17 +1,17 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=thinreports-section-editor-bin pkgver=1.0.0_dev -pkgrel=3 +_electronversion=21 +pkgrel=4 pkgdesc="A template editor for Thinreports to edit Section Format templates" arch=('x86_64') url="https://github.com/thinreports/thinreports" -_githuburl="https://github.com/thinreports/thinreports-section-editor" +_ghurl="https://github.com/thinreports/thinreports-section-editor" license=('MIT') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'bash' - 'electron21' + "electron${_electronversion}" 'hicolor-icon-theme' 'libx11' 'gdk-pixbuf2' @@ -24,14 +24,18 @@ makedepends=( 'squashfuse' ) source=( - "${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver//_/-}/${pkgname%-bin}-${pkgver//_/-}-linux-20221031-0b5119.AppImage" - "LICENSE::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/v${pkgver//_/-}/LICENSE" + "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver//_/-}/${pkgname%-bin}-${pkgver//_/-}-linux-20221031-0b5119.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/v${pkgver//_/-}/LICENSE" "${pkgname%-bin}.sh" ) sha256sums=('818e3b1fdf4fb1ed1fdbe47cc58a034074a652577a887b168edfb033f47b6aeb' '2d416fa05a32860094f618f477a982dd77676b236dc710f2a4df289b7e43ae0c' - 'e3490f0c03b99a2b52c2e63fe7a04fc050bb127648c4e3dd5bd506c44fa10c13') + '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') build() { + sed -e "s|@electronversion@|${_electronversion}|" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" @@ -45,5 +49,5 @@ package() { -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" done install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" - install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file diff --git a/thinreports-section-editor.sh b/thinreports-section-editor.sh index 533cdfab0129..2ec4412e5c4f 100644 --- a/thinreports-section-editor.sh +++ b/thinreports-section-editor.sh @@ -1,11 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron21 -APPDIR=/usr/lib/thinreports-section-editor -export PATH="${APPDIR}:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}" -_ASAR="${APPDIR}/app.asar" +set -e +_APPDIR="/usr/lib/@appname@" +export PATH="${_APPDIR}:${PATH}" +export ELECTRON_IS_DEV=0 +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +_ASAR="${_APPDIR}/@appasar@" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" fi
\ No newline at end of file |