diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 71 | ||||
-rw-r--r-- | thorium-reader.sh | 16 |
4 files changed, 44 insertions, 71 deletions
@@ -1,18 +1,20 @@ | |||
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 = 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 | ||
18 | pkgname = thorium-reader-bin | 20 | 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 @@ | |||
1 | * | ||
2 | !.gitignore | ||
3 | !.SRCINFO | ||
4 | !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> |
3 | pkgname="${_pkgname}-reader-bin" | 3 | |
4 | _appname=Thorium | 4 | pkgname=thorium-reader-bin |
5 | _fullname="${_appname}Reader" | ||
6 | pkgver=2.4.1 | 5 | pkgver=2.4.1 |
7 | _electronversion=29 | ||
8 | pkgrel=1 | 6 | pkgrel=1 |
9 | pkgdesc="Cross-platform desktop reading app based on the Readium Desktop toolkit" | 7 | pkgdesc="A cross platform desktop reading app, based on the Readium Desktop toolkit" |
10 | arch=('x86_64') | 8 | arch=('x86_64') |
11 | url="https://www.edrlab.org/software/thorium-reader/" | 9 | license=(' BSD-3-Clause') |
12 | _ghurl="https://github.com/edrlab/thorium-reader" | 10 | url="https://github.com/edrlab/thorium-reader" |
13 | license=('BSD-3-Clause') | 11 | depends=('libnotify' 'nss' 'libxss' 'xdg-utils' 'libappindicator-gtk3' 'libsecret') |
14 | conflicts=("${pkgname%-bin}") | 12 | _filename=EDRLab.ThoriumReader_${pkgver}_amd64.deb |
15 | provides=("${pkgname%-bin}=${pkgver}") | 13 | options=('!strip') |
16 | depends=( | ||
17 | "electron${_electronversion}" | ||
18 | ) | ||
19 | source=( | 14 | source=( |
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 | ) |
24 | sha256sums=('0abe6d51f68f35c3a6f664025aef4aee286b7cdebd2b769ed3169a882ec77508' | 18 | sha512sums=('ca94b94344ea56ba4d0255db05489df113b907c0f3c4d25bf846b37369766359aee32b636f81a3c797cd482bdb005b9d535391893a4a32d3813be5e9c9dce341' |
25 | 'e95e504f42685015445b4a0a80dfdaa86e5b2b2c0e317bca2bcbb51330ec61e5' | 19 | 'acb9c8cdd1225dd5e7874b5380cc597adf9cf32dfcebccfd18d13f36f525b56d9319734da28de5ec44a983197f91f2e80231211197b7201e4efe115972aae96a') |
26 | 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') | 20 | |
27 | build() { | ||
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 | } | ||
39 | package() { | 21 | package() { |
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 | ||
2 | set -e | ||
3 | _APPDIR="/usr/lib/@appname@" | ||
4 | _RUNNAME="${_APPDIR}/@runname@" | ||
5 | _OPTIONS="@options@" | ||
6 | export PATH="${_APPDIR}:${PATH}" | ||
7 | export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" | ||
8 | export ELECTRON_IS_DEV=0 | ||
9 | export ELECTRON_FORCE_IS_PACKAGED=true | ||
10 | export NODE_ENV=production | ||
11 | cd "${_APPDIR}" | ||
12 | if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then | ||
13 | exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? | ||
14 | else | ||
15 | exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? | ||
16 | fi \ No newline at end of file | ||