diff options
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | thorium-reader.sh | 16 |
3 files changed, 23 insertions, 16 deletions
@@ -1,20 +1,19 @@ | |||
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 = 1 | 4 | pkgrel = 2 |
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 = BSD |
8 | depends = bash | ||
9 | depends = electron25 | 8 | depends = electron25 |
10 | depends = hicolor-icon-theme | 9 | depends = hicolor-icon-theme |
11 | provides = thorium-reader=2.3.0 | 10 | provides = thorium-reader=2.3.0 |
12 | conflicts = thorium-reader | 11 | conflicts = thorium-reader |
13 | 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 | 12 | 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 |
14 | source = LICENSE::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.3.0/LICENSE | 13 | source = LICENSE-2.3.0::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.3.0/LICENSE |
15 | source = thorium-reader.sh | 14 | source = thorium-reader.sh |
16 | sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 | 15 | sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 |
17 | sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 | 16 | sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 |
18 | sha256sums = c6376c7762d524d36e463659d1b1a15870e8a57b1d8b257a8395072f04f97456 | 17 | sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 |
19 | 18 | ||
20 | pkgname = thorium-reader-bin | 19 | pkgname = thorium-reader-bin |
@@ -4,7 +4,8 @@ pkgname="${_pkgname}-reader-bin" | |||
4 | _appname=Thorium | 4 | _appname=Thorium |
5 | _fullname="${_appname}Reader" | 5 | _fullname="${_appname}Reader" |
6 | pkgver=2.3.0 | 6 | pkgver=2.3.0 |
7 | pkgrel=1 | 7 | _electronversion=25 |
8 | pkgrel=2 | ||
8 | 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" |
9 | arch=('x86_64') | 10 | arch=('x86_64') |
10 | url="https://www.edrlab.org/software/thorium-reader/" | 11 | url="https://www.edrlab.org/software/thorium-reader/" |
@@ -13,19 +14,22 @@ license=('BSD') | |||
13 | conflicts=("${pkgname%-bin}") | 14 | conflicts=("${pkgname%-bin}") |
14 | provides=("${pkgname%-bin}=${pkgver}") | 15 | provides=("${pkgname%-bin}=${pkgver}") |
15 | depends=( | 16 | depends=( |
16 | 'bash' | 17 | "electron${_electronversion}" |
17 | 'electron25' | ||
18 | 'hicolor-icon-theme' | 18 | 'hicolor-icon-theme' |
19 | ) | 19 | ) |
20 | source=( | 20 | source=( |
21 | "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/EDRLab.${_fullname}_${pkgver}_amd64.deb" | 21 | "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/EDRLab.${_fullname}_${pkgver}_amd64.deb" |
22 | "LICENSE::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE" | 22 | "LICENSE-${pkgver}::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE" |
23 | "${pkgname%-bin}.sh" | 23 | "${pkgname%-bin}.sh" |
24 | ) | 24 | ) |
25 | sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' | 25 | sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' |
26 | 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' | 26 | 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' |
27 | 'c6376c7762d524d36e463659d1b1a15870e8a57b1d8b257a8395072f04f97456') | 27 | '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') |
28 | build() { | 28 | build() { |
29 | sed -e "s|@electronversion@|${_electronversion}|" \ | ||
30 | -e "s|@appname@|${pkgname%-bin}|g" \ | ||
31 | -e "s|@appasar@|app.asar|g" \ | ||
32 | -i "${srcdir}/${pkgname%-bin}.sh" | ||
29 | bsdtar -xf "${srcdir}/data.tar.xz" | 33 | bsdtar -xf "${srcdir}/data.tar.xz" |
30 | sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ | 34 | sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ |
31 | -e "s|/opt/${_appname}/${_pkgname} %U|${pkgname%-bin}|g" \ | 35 | -e "s|/opt/${_appname}/${_pkgname} %U|${pkgname%-bin}|g" \ |
@@ -42,5 +46,5 @@ package() { | |||
42 | "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" | 46 | "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" |
43 | done | 47 | done |
44 | install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" | 48 | install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" |
45 | install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" | 49 | install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" |
46 | } \ No newline at end of file | 50 | } \ No newline at end of file |
diff --git a/thorium-reader.sh b/thorium-reader.sh index 61a96a6..2ec4412 100644 --- a/thorium-reader.sh +++ b/thorium-reader.sh | |||
@@ -1,10 +1,14 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | _ELECTRON=/usr/bin/electron25 | 2 | set -e |
3 | APPDIR="/usr/lib/thorium-reader" | 3 | _APPDIR="/usr/lib/@appname@" |
4 | export PATH="${APPDIR}:${PATH}" | 4 | export PATH="${_APPDIR}:${PATH}" |
5 | _ASAR="${APPDIR}/app.asar" | 5 | export ELECTRON_IS_DEV=0 |
6 | export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" | ||
7 | _ASAR="${_APPDIR}/@appasar@" | ||
6 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then | 8 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then |
7 | exec ${_ELECTRON} ${_ASAR} "$@" | 9 | cd "${_APPDIR}" |
10 | exec electron@electronversion@ "${_ASAR}" "$@" | ||
8 | else | 11 | else |
9 | exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" | 12 | cd "${_APPDIR}" |
13 | exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" | ||
10 | fi \ No newline at end of file | 14 | fi \ No newline at end of file |