summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1fd951871508040b83233fbb5e90a365834bc9dc (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
# Maintainer: Chris Magyar <c.magyar.ec@gmail.com>

pkgname=dero
pkgver=2.1.6
pkgrel=1
_gitrepo=derosuite
_gituser=deroproject
_gitver=v2.1.6-1
pkgdesc='Dero: cryptonote currency daemon and wallet'
arch=('x86_64')
url="https://github.com/$_gituser/$_gitrepo"
license=('custom:Research')
makedepends=('go')
depends=('glibc')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
md5sums=('4250f4673704d3417c8deef73373f410')

prepare() {
    mv derosuite-2.1.6-1 "$pkgname-$pkgver"
}

build() {
    export GOPATH="$HOME/go"
    export GOBIN="$GOPATH/bin"
    export DEROSUITE="$GOPATH/src/github.com/deroproject/derosuite"
    mkdir -p "$GOBIN"
    mkdir -p "$GOPATH/src/github.com/deroproject/"
    mv "$pkgname-$pkgver" "$DEROSUITE"
    cd "$DEROSUITE/cmd/derod"
    printf "\e[1;34m  ->\e[1;37m go build derod...\e[0;37m\n"
	go build -v
    cd ../dero-wallet-cli
    printf "\e[1;34m  ->\e[1;37m go build dero-wallet-cli...\e[0;37m\n"
    go build -v
    cd ../explorer
    printf "\e[1;34m  ->\e[1;37m go build dero-explorer...\e[0;37m\n"
    go build -v
}

package() {
	cd "$DEROSUITE"
    install -Dm755 ./cmd/derod/derod "$pkgdir/usr/bin/derod"
    install -Dm755 ./cmd/dero-wallet-cli/dero-wallet-cli \
		"$pkgdir/usr/bin/dero-wallet-cli"
    install -Dm755 ./cmd/explorer/explorer \
        "$pkgdir/usr/bin/dero-explorer"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}