summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4183bc135dec89d1f9e919d86d238ddf866b879 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: Pierre-Alexis Ciavaldini <pierre-alexis@ciavaldini.fr>
# This is my first package, I'll gladly improve the PKGBUILD if needs be

# maintenance
pkgver="v0.8.10"
sha256sums_i686=("8afc6b230f290408e74a2716815966f9508b22e4acb7097886c00feeb91efcee")
sha256sums_x86_64=("ddb769a361a65915aef43a0782610db382634a0205aff92c065a05904957f77f")

# info
pkgname="ethereumwallet-bin"
_binname="ethereumwallet"
_strver=`echo ${pkgver} | sed "s/v//" | sed "s/\./-/g"`
pkgrel=1
pkgdesc="Ethereum Wallet from git releases"
arch=('i686' 'x86_64')
license=('GPL')
url="https://github.com/ethereum/mist/releases"

# dependencies
provides=(
	${_binname}
	'libnode'
	'libffmpeg'
)
conflicts=(
	'ethereumwallet-git'
	'libnode'
	'libnode-git'
)
depends=(
	'nss'
	'libxtst'
	'alsa-lib'
	'libxss'
	'gtk2'
	'gconf'
)
optdepends=(
	'geth: The go-ethereum commandline client (geth cli).'
	'parity: The fast, light, robust Ethereum client.'
)

# 32 and 64 file sources, checksums at top of file
source_i686=("${url}/download/${pkgver}/Ethereum-Wallet-linux32-${_strver}.zip")
source_x86_64=("${url}/download/${pkgver}/Ethereum-Wallet-linux64-$_strver.zip")

# desktop file and icon
source=(
	"EthereumWallet.desktop"
	"icon.png"
)
# their checksums
sha256sums=(
	"00bf61c3800b3ca5b68165802d1666f422b6356df114132a115726b03b212139"
	"d4f701bb363e5e1d5cd5cb7ea2e8f2c16f1ccb464a1af8bb81b83bbc3ede1e86"
)

package() {

	# create directories
	install -d "${pkgdir}/usr/share/applications"
	install -d "${pkgdir}/usr/bin/"
	install -d "${pkgdir}/usr/lib"

	# install
	cp -a   "${srcdir}/linux-unpacked"                     "${pkgdir}/usr/share/${_binname}"
	install "${pkgdir}/usr/share/${_binname}/libnode.so"   "${pkgdir}/usr/lib/libnode.so"
	install "${pkgdir}/usr/share/${_binname}/libffmpeg.so" "${pkgdir}/usr/lib/libffmpeg.so"
	ln -s            "/usr/share/${_binname}/${_binname}"  "${pkgdir}/usr/bin/${_binname}"
	rm      "${pkgdir}/usr/share/${_binname}/libnode.so"
	rm      "${pkgdir}/usr/share/${_binname}/libffmpeg.so"

	# installing desktop file and icon
	cp "${srcdir}/icon.png"               "${pkgdir}/usr/share/${_binname}"
	cp "${srcdir}/EthereumWallet.desktop" "${pkgdir}/usr/share/applications"

	# modes
	find "${pkgdir}" -type d -exec chmod 755 {} +
	find "${pkgdir}" -type f -exec chmod 644 {} +
	chmod 755 "${pkgdir}/usr/share/${_binname}/${_binname}"
	chmod 755 "${pkgdir}/usr/lib/libnode.so"
	chmod 755 "${pkgdir}/usr/lib/libffmpeg.so"

	# licence
	install -Dm644 "${pkgdir}/usr/share/${_binname}/LICENSE" \
                   "${pkgdir}/usr/share/licenses/${_binname}/LICENSE"
	rm "${pkgdir}/usr/share/${_binname}/LICENSE"
}