summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b22f0437b6f9386f181f6ea123ee47cbccf633a1 (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: Mikael Blomstrand <gmail: chawlindel>
# Contributor: Christian Pinedo <christian (at) chrpinedo (dot) me>
# Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
pkgname=solarwallet
_pkgname="Solar Wallet"
pkgver=0.28.0
pkgrel=1
pkgdesc="Wallet for the Stellar payment network by SatoshiPay."
arch=('x86_64')
url="https://solarwallet.io"
license=('MIT')
depends=('libxss' 'lib32-gcc-libs' 'libsodium' 'nss' 'gtk3')
makedepends=('npm')
conflicts=('satoshipay-stellar-wallet')
replaces=('satoshipay-stellar-wallet')
source=("$pkgname-$pkgver.tar.gz::https://github.com/satoshipay/solar/archive/v$pkgver.tar.gz"
        "$pkgname.desktop")
sha256sums=('03af7a5ef24a4fff92d99df096f63e0658cc5cd776b3ee64641c1dd5b8db3334'
            'b6c574362d009c52ab9f9b0bdb4b2af9f1a8f79f0c8f68b897e9a19df46abc75')

build() {
	cd "solar-$pkgver"
	npm install --cache "$srcdir/npm-cache"
	npm run build:linux
}

package() {
	cd "solar-$pkgver"

	# Install directories
	install -dm755 "$pkgdir/"{opt/"$_pkgname",usr/bin}

	# Remove files for other platforms
	rm -rf electron/dist/linux-unpacked/resources/app.asar.unpacked/node_modules/sodium-native/prebuilds/darwin*,linux-arm,win32*}

	# Copy main files
	cp -a electron/dist/linux-unpacked/* "$pkgdir/opt/$_pkgname"

	# Link to the binary
	ln -sf "/opt/$_pkgname/io.solarwallet.app" "$pkgdir/usr/bin/$pkgname"

	# Install icon
	install -Dm644 electron/build/icons/512.png "$pkgdir/usr/share/pixmaps/$pkgname.png"

	# Install desktop file
	install -Dm644 "$srcdir/$pkgname.desktop" -t "$pkgdir/usr/share/applications"

	# Install license
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}