diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | thorium-reader.sh | 13 |
3 files changed, 16 insertions, 15 deletions
@@ -1,10 +1,10 @@ | |||
1 | pkgbase = thorium-reader-bin | 1 | pkgbase = thorium-reader-bin |
2 | pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit | 2 | pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit |
3 | pkgver = 2.3.0 | 3 | pkgver = 2.3.0 |
4 | pkgrel = 2 | 4 | pkgrel = 3 |
5 | url = https://www.edrlab.org/software/thorium-reader/ | 5 | url = https://www.edrlab.org/software/thorium-reader/ |
6 | arch = x86_64 | 6 | arch = x86_64 |
7 | license = BSD | 7 | license = LicenseRef-BSD |
8 | depends = electron25 | 8 | depends = electron25 |
9 | depends = hicolor-icon-theme | 9 | depends = hicolor-icon-theme |
10 | provides = thorium-reader=2.3.0 | 10 | provides = thorium-reader=2.3.0 |
@@ -14,6 +14,6 @@ pkgbase = thorium-reader-bin | |||
14 | source = thorium-reader.sh | 14 | source = thorium-reader.sh |
15 | sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 | 15 | sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 |
16 | sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 | 16 | sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 |
17 | sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 | 17 | sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231 |
18 | 18 | ||
19 | pkgname = thorium-reader-bin | 19 | pkgname = thorium-reader-bin |
@@ -5,12 +5,12 @@ _appname=Thorium | |||
5 | _fullname="${_appname}Reader" | 5 | _fullname="${_appname}Reader" |
6 | pkgver=2.3.0 | 6 | pkgver=2.3.0 |
7 | _electronversion=25 | 7 | _electronversion=25 |
8 | pkgrel=2 | 8 | pkgrel=3 |
9 | pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" | 9 | pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" |
10 | arch=('x86_64') | 10 | arch=('x86_64') |
11 | url="https://www.edrlab.org/software/thorium-reader/" | 11 | url="https://www.edrlab.org/software/thorium-reader/" |
12 | _ghurl="https://github.com/edrlab/thorium-reader" | 12 | _ghurl="https://github.com/edrlab/thorium-reader" |
13 | license=('BSD') | 13 | license=('LicenseRef-BSD') |
14 | conflicts=("${pkgname%-bin}") | 14 | conflicts=("${pkgname%-bin}") |
15 | provides=("${pkgname%-bin}=${pkgver}") | 15 | provides=("${pkgname%-bin}=${pkgver}") |
16 | depends=( | 16 | depends=( |
@@ -24,7 +24,7 @@ source=( | |||
24 | ) | 24 | ) |
25 | sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' | 25 | sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' |
26 | 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' | 26 | 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' |
27 | '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') | 27 | 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231') |
28 | build() { | 28 | build() { |
29 | sed -e "s|@electronversion@|${_electronversion}|" \ | 29 | sed -e "s|@electronversion@|${_electronversion}|" \ |
30 | -e "s|@appname@|${pkgname%-bin}|g" \ | 30 | -e "s|@appname@|${pkgname%-bin}|g" \ |
@@ -32,14 +32,14 @@ build() { | |||
32 | -i "${srcdir}/${pkgname%-bin}.sh" | 32 | -i "${srcdir}/${pkgname%-bin}.sh" |
33 | bsdtar -xf "${srcdir}/data.tar.xz" | 33 | bsdtar -xf "${srcdir}/data.tar.xz" |
34 | sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ | 34 | sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ |
35 | -e "s|/opt/${_appname}/${_pkgname} %U|${pkgname%-bin}|g" \ | 35 | -e "s|/opt/${_appname}/${_pkgname}|${pkgname%-bin}|g" \ |
36 | -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \ | 36 | -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \ |
37 | -i "${srcdir}/usr/share/applications/${_pkgname}.desktop" | 37 | -i "${srcdir}/usr/share/applications/${_pkgname}.desktop" |
38 | } | 38 | } |
39 | package() { | 39 | package() { |
40 | install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" | 40 | install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" |
41 | install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" | 41 | install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" |
42 | install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ | 42 | install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ |
43 | -t "${pkgdir}/usr/lib/${pkgname%-bin}app.asar.unpacked/external-assets" | 43 | -t "${pkgdir}/usr/lib/${pkgname%-bin}app.asar.unpacked/external-assets" |
44 | for _icons in 256x256 512x512 1024x1024;do | 44 | for _icons in 256x256 512x512 1024x1024;do |
45 | install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \ | 45 | install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \ |
diff --git a/thorium-reader.sh b/thorium-reader.sh index 2ec4412..aacd8f8 100644 --- a/thorium-reader.sh +++ b/thorium-reader.sh | |||
@@ -1,14 +1,15 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | set -e | 2 | set -e |
3 | _APPDIR="/usr/lib/@appname@" | 3 | _APPDIR="/usr/lib/@appname@" |
4 | _ASAR="${_APPDIR}/@appasar@" | ||
4 | export PATH="${_APPDIR}:${PATH}" | 5 | export PATH="${_APPDIR}:${PATH}" |
5 | export ELECTRON_IS_DEV=0 | ||
6 | export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" | 6 | export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" |
7 | _ASAR="${_APPDIR}/@appasar@" | 7 | export ELECTRON_IS_DEV=0 |
8 | export NODE_ENV=production | ||
9 | cd "${_APPDIR}" | ||
8 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then | 10 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then |
9 | cd "${_APPDIR}" | ||
10 | exec electron@electronversion@ "${_ASAR}" "$@" | 11 | exec electron@electronversion@ "${_ASAR}" "$@" |
11 | else | 12 | else |
12 | cd "${_APPDIR}" | ||
13 | exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" | 13 | exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" |
14 | fi \ No newline at end of file | 14 | fi |
15 | exit \ No newline at end of file | ||