blob: c726f2a8e610291d2ffb4f68c92a898cdd288963 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: Serge K <arch@phnx47.net>
_appname=chain-desktop-wallet
pkgname=cro-chain-desktop
pkgdesc='Crypto.com DeFi Desktop Wallet'
_electron='electron19'
_sha='afb44b15e3bc136b731061a2d8cb26c7895f957d'
_short_sha="${_sha::7}"
pkgver=1.5.1
pkgrel=1
arch=('x86_64')
_gh_owner='crypto-com'
_gh_repo='chain-desktop-wallet'
url="https://github.com/${_gh_owner}/${_gh_repo}"
license=('Apache')
depends=("${_electron}")
makedepends=('yarn' 'nvm')
source=("${_appname}-${pkgver}-${_short_sha}.tar.gz::https://api.github.com/repos/${_gh_owner}/${_gh_repo}/tarball/${_sha}"
"${_appname}.desktop"
"${_appname}.sh")
sha512sums=('db2b23af5b091a1a8d79259d9347271b6dcaa0e879f3bfc63778c070c4a93d8f1f2f7f36b716af376261d1b1d45c62a4d9ad834cdc22b5284bdf4ab5ab212628'
'f7e4d91d7078a1d627995ffec39b4b67239827dbab0651909238a718ac4538bd6316c8f87430b244b13f617214171d6283ae3b1c268827b3d49f8dead5d2d71a'
'ed69cea003c265da10b205a96423a00efc508d29b0ae82a628aa1aca36f76ddc95adcb89150b2f2205d076f5f3189cfbe5a729c034186026105648720ff39960')
_nvm_install() {
export NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install "$(cat .node-version)"
}
prepare() {
sed -i "s~@ELECTRON@~${_electron}~" "${_appname}.sh"
}
build() {
cd "${_gh_owner}-${_gh_repo}-${_short_sha}"
_nvm_install
yarn install --frozen-lockfile
yarn electron:build
}
package() {
install -Dm 644 "${_appname}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm 755 "${_appname}.sh" "${pkgdir}/usr/bin/${_appname}"
cd "${_gh_owner}-${_gh_repo}-${_short_sha}"
install -Dm 755 "dist/linux-unpacked/resources/app.asar" -t "${pkgdir}/usr/lib/${_appname}"
install -Dm 644 "build/icon.png" "${pkgdir}/usr/share/pixmaps/${_appname}.png"
}
|