diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 71 |
1 files changed, 27 insertions, 44 deletions
@@ -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 | } | ||