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