summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD71
-rw-r--r--thorium-reader.sh16
4 files changed, 44 insertions, 71 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 74f344a..790d80a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
1pkgbase = thorium-reader-bin 1pkgbase = thorium-reader-bin
2 pkgdesc = Cross-platform desktop reading app based on the Readium Desktop toolkit 2 pkgdesc = A cross platform desktop reading app, based on the Readium Desktop toolkit
3 pkgver = 2.4.1 3 pkgver = 2.4.1
4 pkgrel = 1 4 pkgrel = 1
5 url = https://www.edrlab.org/software/thorium-reader/ 5 url = https://github.com/edrlab/thorium-reader
6 arch = x86_64 6 arch = x86_64
7 license = BSD-3-Clause 7 license = BSD-3-Clause
8 depends = electron29 8 depends = libnotify
9 provides = thorium-reader=2.4.1 9 depends = nss
10 conflicts = thorium-reader 10 depends = libxss
11 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 11 depends = xdg-utils
12 source = LICENSE-2.4.1::https://raw.githubusercontent.com/edrlab/thorium-reader/v2.4.1/LICENSE 12 depends = libappindicator-gtk3
13 source = thorium-reader.sh 13 depends = libsecret
14 sha256sums = 0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508 14 options = !strip
15 sha256sums = e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5 15 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
16 sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 16 source = https://github.com/edrlab/thorium-reader/raw/v2.4.1/LICENSE
17 sha512sums = ca94b94344ea56ba4d0255db05489df113b907c0f3c4d25bf846b37369766359aee32b636f81a3c797cd482bdb005b9d535391893a4a32d3813be5e9c9dce341
18 sha512sums = acb9c8cdd1225dd5e7874b5380cc597adf9cf32dfcebccfd18d13f36f525b56d9319734da28de5ec44a983197f91f2e80231211197b7201e4efe115972aae96a
17 19
18pkgname = thorium-reader-bin 20pkgname = thorium-reader-bin
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..05c6d4d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
1*
2!.gitignore
3!.SRCINFO
4!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
index 83553d4..c769847 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,50 +1,33 @@
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> 1# Maintainer: Yigit Sever <yigit at yigitsever dot com>
2_pkgname=thorium 2# Contributor: Naglis Jonaitis <naglis@mailbox.org>
3pkgname="${_pkgname}-reader-bin" 3
4_appname=Thorium 4pkgname=thorium-reader-bin
5_fullname="${_appname}Reader"
6pkgver=2.4.1 5pkgver=2.4.1
7_electronversion=29
8pkgrel=1 6pkgrel=1
9pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" 7pkgdesc="A cross platform desktop reading app, based on the Readium Desktop toolkit"
10arch=('x86_64') 8arch=('x86_64')
11url="https://www.edrlab.org/software/thorium-reader/" 9license=(' BSD-3-Clause')
12_ghurl="https://github.com/edrlab/thorium-reader" 10url="https://github.com/edrlab/thorium-reader"
13license=('BSD-3-Clause') 11depends=('libnotify' 'nss' 'libxss' 'xdg-utils' 'libappindicator-gtk3' 'libsecret')
14conflicts=("${pkgname%-bin}") 12_filename=EDRLab.ThoriumReader_${pkgver}_amd64.deb
15provides=("${pkgname%-bin}=${pkgver}") 13options=('!strip')
16depends=(
17 "electron${_electronversion}"
18)
19source=( 14source=(
20 "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/EDRLab.${_fullname}_${pkgver}_amd64.deb" 15 "${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${_filename}"
21 "LICENSE-${pkgver}::https://raw.githubusercontent.com/edrlab/thorium-reader/v${pkgver}/LICENSE" 16 ${url}/raw/v${pkgver}/LICENSE
22 "${pkgname%-bin}.sh"
23) 17)
24sha256sums=('0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508' 18sha512sums=('ca94b94344ea56ba4d0255db05489df113b907c0f3c4d25bf846b37369766359aee32b636f81a3c797cd482bdb005b9d535391893a4a32d3813be5e9c9dce341'
25 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' 19 'acb9c8cdd1225dd5e7874b5380cc597adf9cf32dfcebccfd18d13f36f525b56d9319734da28de5ec44a983197f91f2e80231211197b7201e4efe115972aae96a')
26 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') 20
27build() {
28 sed -e "s|@electronversion@|${_electronversion}|" \
29 -e "s|@appname@|${pkgname%-bin}|g" \
30 -e "s|@runname@|app.asar|g" \
31 -e "s|@options@||g" \
32 -i "${srcdir}/${pkgname%-bin}.sh"
33 bsdtar -xf "${srcdir}/data."*
34 sed -e "s|Name=${_appname}|Name=${_fullname}|g" \
35 -e "s|/opt/${_appname}/${_pkgname}|${pkgname%-bin}|g" \
36 -e "s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \
37 -i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
38}
39package() { 21package() {
40 install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" 22 cd "${srcdir}"
41 install -Dm644 "${srcdir}/opt/${_appname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" 23 tar xJf data.tar.xz -C "${pkgdir}"
42 install -Dm755 "${srcdir}/opt/${_appname}/resources/app.asar.unpacked/external-assets/lcp.node" \ 24
43 -t "${pkgdir}/usr/lib/${pkgname%-bin}app.asar.unpacked/external-assets" 25 # Symlink
44 for _icons in 256x256 512x512 1024x1024;do 26 install -d "${pkgdir}/usr/bin"
45 install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \ 27 ln -s "/opt/Thorium/thorium" "${pkgdir}/usr/bin/thorium"
46 "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" 28
47 done 29 # Install license
48 install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" 30 install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
49 install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 31
50} \ No newline at end of file 32 install -Dm 644 "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/thorium.png" "${pkgdir}/usr/share/pixmaps/thorium.png"
33}
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 @@
1#!/bin/bash
2set -e
3_APPDIR="/usr/lib/@appname@"
4_RUNNAME="${_APPDIR}/@runname@"
5_OPTIONS="@options@"
6export PATH="${_APPDIR}:${PATH}"
7export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
8export ELECTRON_IS_DEV=0
9export ELECTRON_FORCE_IS_PACKAGED=true
10export NODE_ENV=production
11cd "${_APPDIR}"
12if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
13 exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
14else
15 exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
16fi \ No newline at end of file