From 787dcd16dbf73e81d62cb1d73990ba7f778cfa9c Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Wed, 8 Nov 2023 11:34:14 +0800 Subject: update to 2.3.0 --- .SRCINFO | 20 ++++++++++++++++++++ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ thorium-reader.sh | 10 ++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 thorium-reader.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..8b04a76 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = thorium-reader-bin + pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit + pkgver = 2.3.0 + pkgrel = 1 + 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 = thorium-reader.sh + sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 + sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 + sha256sums = c6376c7762d524d36e463659d1b1a15870e8a57b1d8b257a8395072f04f97456 + +pkgname = thorium-reader-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..ffd9a55 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: zxp19821005 +_pkgname=thorium +pkgname="${_pkgname}-reader-bin" +_appname=Thorium +_fullname="${_appname}Reader" +pkgver=2.3.0 +pkgrel=1 +pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" +arch=('x86_64') +url="https://www.edrlab.org/software/thorium-reader/" +_ghurl="https://github.com/edrlab/thorium-reader" +license=('BSD') +conflicts=("${pkgname%-bin}") +provides=("${pkgname%-bin}=${pkgver}") +depends=( + 'bash' + 'electron25' + '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" + "${pkgname%-bin}.sh" +) +sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' + 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' + 'c6376c7762d524d36e463659d1b1a15870e8a57b1d8b257a8395072f04f97456') +build() { + bsdtar -xf "${srcdir}/data.tar.xz" + sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ + -e "s|/opt/${_appname}/${_pkgname} %U|${pkgname%-bin}|g" \ + -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \ + -i "${srcdir}/usr/share/applications/${_pkgname}.desktop" +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ + -t "${pkgdir}/usr/lib/${pkgname%-bin}app.asar.unpacked/external-assets" + for _icons in 256x256 512x512 1024x1024;do + install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \ + "${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}" +} \ No newline at end of file diff --git a/thorium-reader.sh b/thorium-reader.sh new file mode 100644 index 0000000..61a96a6 --- /dev/null +++ b/thorium-reader.sh @@ -0,0 +1,10 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron25 +APPDIR="/usr/lib/thorium-reader" +export PATH="${APPDIR}:${PATH}" +_ASAR="${APPDIR}/app.asar" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec ${_ELECTRON} ${_ASAR} "$@" +else + exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" +fi \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 5135578034f62c83cf39a321266271fd7e790dd1 Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Wed, 13 Dec 2023 18:43:27 +0800 Subject: fix errors --- .SRCINFO | 7 +++---- PKGBUILD | 16 ++++++++++------ thorium-reader.sh | 16 ++++++++++------ 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 8b04a76..407e5fc 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 ffd9a55..5569255 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 61a96a6..2ec4412 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 -- cgit v1.2.3-70-g09d2 From 6dd440a9beacc88dc55c737dfe09e69dc9e77a57 Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Fri, 19 Jan 2024 13:46:31 +0800 Subject: fix errors --- .SRCINFO | 6 +++--- PKGBUILD | 12 ++++++------ thorium-reader.sh | 13 +++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 407e5fc..ba21831 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,10 +1,10 @@ pkgbase = thorium-reader-bin pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit pkgver = 2.3.0 - pkgrel = 2 + pkgrel = 3 url = https://www.edrlab.org/software/thorium-reader/ arch = x86_64 - license = BSD + license = LicenseRef-BSD depends = electron25 depends = hicolor-icon-theme provides = thorium-reader=2.3.0 @@ -14,6 +14,6 @@ pkgbase = thorium-reader-bin source = thorium-reader.sh sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 - sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84 + sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231 pkgname = thorium-reader-bin diff --git a/PKGBUILD b/PKGBUILD index 5569255..416e9c6 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,12 +5,12 @@ _appname=Thorium _fullname="${_appname}Reader" pkgver=2.3.0 _electronversion=25 -pkgrel=2 +pkgrel=3 pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" arch=('x86_64') url="https://www.edrlab.org/software/thorium-reader/" _ghurl="https://github.com/edrlab/thorium-reader" -license=('BSD') +license=('LicenseRef-BSD') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( @@ -24,7 +24,7 @@ source=( ) sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' - '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84') + 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ @@ -32,14 +32,14 @@ build() { -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" \ + -e "s|/opt/${_appname}/${_pkgname}|${pkgname%-bin}|g" \ -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \ -i "${srcdir}/usr/share/applications/${_pkgname}.desktop" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" - install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" - install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ + install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ -t "${pkgdir}/usr/lib/${pkgname%-bin}app.asar.unpacked/external-assets" for _icons in 256x256 512x512 1024x1024;do 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 @@ -#!/bin/bash +#!/bin/sh set -e _APPDIR="/usr/lib/@appname@" +_ASAR="${_APPDIR}/@appasar@" export PATH="${_APPDIR}:${PATH}" -export ELECTRON_IS_DEV=0 export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" -_ASAR="${_APPDIR}/@appasar@" +export ELECTRON_IS_DEV=0 +export NODE_ENV=production +cd "${_APPDIR}" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - cd "${_APPDIR}" exec electron@electronversion@ "${_ASAR}" "$@" else - cd "${_APPDIR}" exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" -fi \ No newline at end of file +fi +exit \ No newline at end of file -- cgit v1.2.3-70-g09d2 From aed9d1e97e8312b299d8ff0ea653dc0b83869cd6 Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Wed, 28 Feb 2024 11:35:38 +0800 Subject: fix errors --- .SRCINFO | 6 +++--- PKGBUILD | 10 +++++----- thorium-reader.sh | 9 ++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index ba21831..69c7d64 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,10 +1,10 @@ pkgbase = thorium-reader-bin pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit pkgver = 2.3.0 - pkgrel = 3 + pkgrel = 4 url = https://www.edrlab.org/software/thorium-reader/ arch = x86_64 - license = LicenseRef-BSD + license = BSD-3-Clause depends = electron25 depends = hicolor-icon-theme provides = thorium-reader=2.3.0 @@ -14,6 +14,6 @@ pkgbase = thorium-reader-bin source = thorium-reader.sh sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 - sha256sums = d4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231 + sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014 pkgname = thorium-reader-bin diff --git a/PKGBUILD b/PKGBUILD index 416e9c6..a73c9ab 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,12 +5,12 @@ _appname=Thorium _fullname="${_appname}Reader" pkgver=2.3.0 _electronversion=25 -pkgrel=3 +pkgrel=4 pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" arch=('x86_64') url="https://www.edrlab.org/software/thorium-reader/" _ghurl="https://github.com/edrlab/thorium-reader" -license=('LicenseRef-BSD') +license=('BSD-3-Clause') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( @@ -24,13 +24,13 @@ source=( ) sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' - 'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231') + '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ - -e "s|@appasar@|app.asar|g" \ + -e "s|@runname@|app.asar|g" \ -i "${srcdir}/${pkgname%-bin}.sh" - bsdtar -xf "${srcdir}/data.tar.xz" + bsdtar -xf "${srcdir}/data."* sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ -e "s|/opt/${_appname}/${_pkgname}|${pkgname%-bin}|g" \ -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \ diff --git a/thorium-reader.sh b/thorium-reader.sh index aacd8f8..f9ced14 100644 --- a/thorium-reader.sh +++ b/thorium-reader.sh @@ -1,15 +1,14 @@ #!/bin/sh set -e _APPDIR="/usr/lib/@appname@" -_ASAR="${_APPDIR}/@appasar@" +_RUNNAME="${_APPDIR}/@runname@" export PATH="${_APPDIR}:${PATH}" export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" export ELECTRON_IS_DEV=0 export NODE_ENV=production cd "${_APPDIR}" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_ASAR}" "$@" + exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $? else - exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" -fi -exit \ No newline at end of file + exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? +fi \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 221d53e8b03bf55bf35f2c6c5c4c9a762f7df31b Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Thu, 14 Mar 2024 17:53:50 +0800 Subject: fix errors --- .SRCINFO | 6 +++--- PKGBUILD | 7 ++++--- thorium-reader.sh | 8 +++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 69c7d64..9937068 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,11 +1,11 @@ pkgbase = thorium-reader-bin pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit pkgver = 2.3.0 - pkgrel = 4 + pkgrel = 5 url = https://www.edrlab.org/software/thorium-reader/ arch = x86_64 license = BSD-3-Clause - depends = electron25 + depends = electron25-bin depends = hicolor-icon-theme provides = thorium-reader=2.3.0 conflicts = thorium-reader @@ -14,6 +14,6 @@ pkgbase = thorium-reader-bin source = thorium-reader.sh sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 - sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014 + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = thorium-reader-bin diff --git a/PKGBUILD b/PKGBUILD index a73c9ab..c01e9c2 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ _appname=Thorium _fullname="${_appname}Reader" pkgver=2.3.0 _electronversion=25 -pkgrel=4 +pkgrel=5 pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" arch=('x86_64') url="https://www.edrlab.org/software/thorium-reader/" @@ -14,7 +14,7 @@ license=('BSD-3-Clause') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - "electron${_electronversion}" + "electron${_electronversion}-bin" 'hicolor-icon-theme' ) source=( @@ -24,11 +24,12 @@ source=( ) sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' - '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014') + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data."* sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ diff --git a/thorium-reader.sh b/thorium-reader.sh index f9ced14..7ddcaab 100644 --- a/thorium-reader.sh +++ b/thorium-reader.sh @@ -1,14 +1,16 @@ -#!/bin/sh +#!/bin/bash set -e _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_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 NODE_ENV=production cd "${_APPDIR}" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? else - exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? fi \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 544a097dbfd1f26242444f1a8c693c3652f405c0 Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Thu, 21 Mar 2024 09:28:49 +0800 Subject: update to 2.4.0 --- .SRCINFO | 15 +++++++-------- PKGBUILD | 11 +++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 9937068..8806074 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,18 +1,17 @@ pkgbase = thorium-reader-bin pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit - pkgver = 2.3.0 - pkgrel = 5 + pkgver = 2.4.0 + pkgrel = 1 url = https://www.edrlab.org/software/thorium-reader/ arch = x86_64 license = BSD-3-Clause - depends = electron25-bin - depends = hicolor-icon-theme - provides = thorium-reader=2.3.0 + depends = electron29 + provides = thorium-reader=2.4.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-2.3.0::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.3.0/LICENSE + source = thorium-reader-2.4.0.deb::https://github.com/edrlab/thorium-reader/releases/download/v2.4.0/EDRLab.ThoriumReader_2.4.0_amd64.deb + source = LICENSE-2.4.0::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.4.0/LICENSE source = thorium-reader.sh - sha256sums = 1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23 + sha256sums = d24c1a0ea11df05ce7743f2687ef0b9a002239f11e38a6607a3ed3260f9e9319 sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 diff --git a/PKGBUILD b/PKGBUILD index c01e9c2..e32b638 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,9 +3,9 @@ _pkgname=thorium pkgname="${_pkgname}-reader-bin" _appname=Thorium _fullname="${_appname}Reader" -pkgver=2.3.0 -_electronversion=25 -pkgrel=5 +pkgver=2.4.0 +_electronversion=29 +pkgrel=1 pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" arch=('x86_64') url="https://www.edrlab.org/software/thorium-reader/" @@ -14,15 +14,14 @@ license=('BSD-3-Clause') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - "electron${_electronversion}-bin" - 'hicolor-icon-theme' + "electron${_electronversion}" ) source=( "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/EDRLab.${_fullname}_${pkgver}_amd64.deb" "LICENSE-${pkgver}::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) -sha256sums=('1007cd9083715d32427e4d39f8a4cac69cf428cfc4521950571dc2290a308f23' +sha256sums=('d24c1a0ea11df05ce7743f2687ef0b9a002239f11e38a6607a3ed3260f9e9319' 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') build() { -- cgit v1.2.3-70-g09d2 From d77ff30c9fa9c99b08c2e800e89fc952c8a8b84a Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Mon, 25 Mar 2024 09:08:39 +0800 Subject: update to 2.4.1 --- .SRCINFO | 10 +++++----- PKGBUILD | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 8806074..74f344a 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,17 +1,17 @@ pkgbase = thorium-reader-bin pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit - pkgver = 2.4.0 + pkgver = 2.4.1 pkgrel = 1 url = https://www.edrlab.org/software/thorium-reader/ arch = x86_64 license = BSD-3-Clause depends = electron29 - provides = thorium-reader=2.4.0 + provides = thorium-reader=2.4.1 conflicts = thorium-reader - source = thorium-reader-2.4.0.deb::https://github.com/edrlab/thorium-reader/releases/download/v2.4.0/EDRLab.ThoriumReader_2.4.0_amd64.deb - source = LICENSE-2.4.0::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.4.0/LICENSE + source = thorium-reader-2.4.1.deb::https://github.com/edrlab/thorium-reader/releases/download/v2.4.1/EDRLab.ThoriumReader_2.4.1_amd64.deb + source = LICENSE-2.4.1::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.4.1/LICENSE source = thorium-reader.sh - sha256sums = d24c1a0ea11df05ce7743f2687ef0b9a002239f11e38a6607a3ed3260f9e9319 + sha256sums = 0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508 sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 diff --git a/PKGBUILD b/PKGBUILD index e32b638..83553d4 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ _pkgname=thorium pkgname="${_pkgname}-reader-bin" _appname=Thorium _fullname="${_appname}Reader" -pkgver=2.4.0 +pkgver=2.4.1 _electronversion=29 pkgrel=1 pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" @@ -21,7 +21,7 @@ source=( "LICENSE-${pkgver}::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) -sha256sums=('d24c1a0ea11df05ce7743f2687ef0b9a002239f11e38a6607a3ed3260f9e9319' +sha256sums=('0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508' 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') build() { -- cgit v1.2.3-70-g09d2 From 29f9338090a1d28a6e9595f52cade66c0a3cefbe Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 17 Apr 2024 22:38:58 +0300 Subject: upgpkg: thorium-reader-bin 2.4.1 --- .SRCINFO | 24 ++++++++++--------- .gitignore | 4 ++++ PKGBUILD | 71 +++++++++++++++++++++---------------------------------- thorium-reader.sh | 16 ------------- 4 files changed, 44 insertions(+), 71 deletions(-) create mode 100644 .gitignore delete mode 100644 thorium-reader.sh diff --git a/.SRCINFO b/.SRCINFO index 74f344a..790d80a 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,18 +1,20 @@ pkgbase = thorium-reader-bin - pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit + pkgdesc = A cross platform desktop reading app, based on the Readium Desktop toolkit pkgver = 2.4.1 pkgrel = 1 - url = https://www.edrlab.org/software/thorium-reader/ + url = https://github.com/edrlab/thorium-reader arch = x86_64 license = BSD-3-Clause - depends = electron29 - provides = thorium-reader=2.4.1 - conflicts = thorium-reader - source = thorium-reader-2.4.1.deb::https://github.com/edrlab/thorium-reader/releases/download/v2.4.1/EDRLab.ThoriumReader_2.4.1_amd64.deb - source = LICENSE-2.4.1::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.4.1/LICENSE - source = thorium-reader.sh - sha256sums = 0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508 - sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + depends = libnotify + depends = nss + depends = libxss + depends = xdg-utils + depends = libappindicator-gtk3 + depends = libsecret + options = !strip + source = thorium-reader-bin-2.4.1.deb::https://github.com/edrlab/thorium-reader/releases/download/v2.4.1/EDRLab.ThoriumReader_2.4.1_amd64.deb + source = https://github.com/edrlab/thorium-reader/raw/v2.4.1/LICENSE + sha512sums = ca94b94344ea56ba4d0255db05489df113b907c0f3c4d25bf846b37369766359aee32b636f81a3c797cd482bdb005b9d535391893a4a32d3813be5e9c9dce341 + sha512sums = acb9c8cdd1225dd5e7874b5380cc597adf9cf32dfcebccfd18d13f36f525b56d9319734da28de5ec44a983197f91f2e80231211197b7201e4efe115972aae96a pkgname = thorium-reader-bin diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..05c6d4d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD diff --git a/PKGBUILD b/PKGBUILD index 83553d4..c769847 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,50 +1,33 @@ -# Maintainer: zxp19821005 -_pkgname=thorium -pkgname="${_pkgname}-reader-bin" -_appname=Thorium -_fullname="${_appname}Reader" +# Maintainer: Yigit Sever +# Contributor: Naglis Jonaitis + +pkgname=thorium-reader-bin pkgver=2.4.1 -_electronversion=29 pkgrel=1 -pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" +pkgdesc="A cross platform desktop reading app, based on the Readium Desktop toolkit" arch=('x86_64') -url="https://www.edrlab.org/software/thorium-reader/" -_ghurl="https://github.com/edrlab/thorium-reader" -license=('BSD-3-Clause') -conflicts=("${pkgname%-bin}") -provides=("${pkgname%-bin}=${pkgver}") -depends=( - "electron${_electronversion}" -) +license=(' BSD-3-Clause') +url="https://github.com/edrlab/thorium-reader" +depends=('libnotify' 'nss' 'libxss' 'xdg-utils' 'libappindicator-gtk3' 'libsecret') +_filename=EDRLab.ThoriumReader_${pkgver}_amd64.deb +options=('!strip') source=( - "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/EDRLab.${_fullname}_${pkgver}_amd64.deb" - "LICENSE-${pkgver}::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE" - "${pkgname%-bin}.sh" + "${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${_filename}" + ${url}/raw/v${pkgver}/LICENSE ) -sha256sums=('0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508' - 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') -build() { - sed -e "s|@electronversion@|${_electronversion}|" \ - -e "s|@appname@|${pkgname%-bin}|g" \ - -e "s|@runname@|app.asar|g" \ - -e "s|@options@||g" \ - -i "${srcdir}/${pkgname%-bin}.sh" - bsdtar -xf "${srcdir}/data."* - sed -e "s|Name=${_appname}|Name=${_fullname}|g" \ - -e "s|/opt/${_appname}/${_pkgname}|${pkgname%-bin}|g" \ - -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \ - -i "${srcdir}/usr/share/applications/${_pkgname}.desktop" -} +sha512sums=('ca94b94344ea56ba4d0255db05489df113b907c0f3c4d25bf846b37369766359aee32b636f81a3c797cd482bdb005b9d535391893a4a32d3813be5e9c9dce341' + 'acb9c8cdd1225dd5e7874b5380cc597adf9cf32dfcebccfd18d13f36f525b56d9319734da28de5ec44a983197f91f2e80231211197b7201e4efe115972aae96a') + package() { - install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" - install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" - install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ - -t "${pkgdir}/usr/lib/${pkgname%-bin}app.asar.unpacked/external-assets" - for _icons in 256x256 512x512 1024x1024;do - install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \ - "${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-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" -} \ No newline at end of file + cd "${srcdir}" + tar xJf data.tar.xz -C "${pkgdir}" + + # Symlink + install -d "${pkgdir}/usr/bin" + ln -s "/opt/Thorium/thorium" "${pkgdir}/usr/bin/thorium" + + # Install license + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + install -Dm 644 "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/thorium.png" "${pkgdir}/usr/share/pixmaps/thorium.png" +} diff --git a/thorium-reader.sh b/thorium-reader.sh deleted file mode 100644 index 7ddcaab..0000000 --- a/thorium-reader.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e -_APPDIR="/usr/lib/@appname@" -_RUNNAME="${_APPDIR}/@runname@" -_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 NODE_ENV=production -cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? -else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? -fi \ No newline at end of file -- cgit v1.2.3-70-g09d2