summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-13 18:43:27 +0800
committerzxp198210052023-12-13 18:43:27 +0800
commit5135578034f62c83cf39a321266271fd7e790dd1 (patch)
treee016b08294174fb65108dfc0576bccf3821be5ec
parent787dcd16dbf73e81d62cb1d73990ba7f778cfa9c (diff)
downloadaur-5135578034f62c83cf39a321266271fd7e790dd1.tar.gz
fix errors
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD16
-rw-r--r--thorium-reader.sh16
3 files changed, 23 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8b04a76f8765..407e5fcb75dc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,19 @@
pkgbase = thorium-reader-bin
pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit
pkgver = 2.3.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.edrlab.org/software/thorium-reader/
arch = x86_64
license = BSD
- depends = bash
depends = electron25
depends = hicolor-icon-theme
provides = thorium-reader=2.3.0
conflicts = thorium-reader
source = thorium-reader-2.3.0.deb::https://github.com/edrlab/thorium-reader/releases/download/v2.3.0/EDRLab.ThoriumReader_2.3.0_amd64.deb
- source = LICENSE::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.3.0/LICENSE
+ source = LICENSE-2.3.0::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.3.0/LICENSE
source = thorium-reader.sh
sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23
sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5
- sha256sums = c6376c7762d524d36e463659d1b1a15870e8a57b1d8b257a8395072f04f97456
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
pkgname = thorium-reader-bin
diff --git a/PKGBUILD b/PKGBUILD
index ffd9a55ec02e..556925552727 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,8 @@ pkgname="${_pkgname}-reader-bin"
_appname=Thorium
_fullname="${_appname}Reader"
pkgver=2.3.0
-pkgrel=1
+_electronversion=25
+pkgrel=2
pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit"
arch=('x86_64')
url="https://www.edrlab.org/software/thorium-reader/"
@@ -13,19 +14,22 @@ license=('BSD')
conflicts=("${pkgname%-bin}")
provides=("${pkgname%-bin}=${pkgver}")
depends=(
- 'bash'
- 'electron25'
+ "electron${_electronversion}"
'hicolor-icon-theme'
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/EDRLab.${_fullname}_${pkgver}_amd64.deb"
- "LICENSE::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE"
+ "LICENSE-${pkgver}::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23'
'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5'
- 'c6376c7762d524d36e463659d1b1a15870e8a57b1d8b257a8395072f04f97456')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data.tar.xz"
sed -e "s|Name=${_appname}|Name=${_fullname}|g" \
-e "s|/opt/${_appname}/${_pkgname} %U|${pkgname%-bin}|g" \
@@ -42,5 +46,5 @@ package() {
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
done
install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
- 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/thorium-reader.sh b/thorium-reader.sh
index 61a96a68b0ef..2ec4412e5c4f 100644
--- a/thorium-reader.sh
+++ b/thorium-reader.sh
@@ -1,10 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron25
-APPDIR="/usr/lib/thorium-reader"
-export PATH="${APPDIR}:${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