summaryrefslogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD71
1 files changed, 27 insertions, 44 deletions
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}