blob: c84ec5e4435e903035e0a97a14b3c89e7d867f0a (
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# Maintainer: Luis Aranguren <pizzaman@hotmail.com>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
pkgbase=btcd
pkgname=('btcd' 'btcwallet')
pkgver=0.24.2
_pkgver_btcd=v0.24.2
_pkgver_btcwallet=v0.16.9
pkgrel=1
pkgdesc="btcd an alternative full node Bitcoin implementation written in Go and btcwallet a secure Bitcoin wallet daemon written in Go "
arch=('i686' 'x86_64')
makedepends=('git' 'go')
groups=('btcsuite')
url="https://github.com/btcsuite"
license=('ISC')
options=('!emptydirs')
provides=('btcd' 'btcwallet')
conflicts=('btcd')
source=(git+https://github.com/btcsuite/btcd#tag=$_pkgver_btcd
git+https://github.com/btcsuite/btcwallet#tag=$_pkgver_btcwallet)
sha256sums=('SKIP'
'SKIP')
prepare() {
export GOPATH="$srcdir"
git clone "$srcdir/btcd" "$GOPATH/src/github.com/btcsuite/btcd"
git clone "$srcdir/btcwallet" "$GOPATH/src/github.com/btcsuite/btcwallet"
}
build() {
export GOPATH="$srcdir"
echo 'Building btcd and dependencies...'
cd "$GOPATH/src/github.com/btcsuite/btcd"
go install -buildmode=pie -ldflags -extldflags=-Wl,-z,now,-z,relro . ./cmd/...
go clean -modcache
echo 'Building btcwallet and dependencies...'
cd "$GOPATH/src/github.com/btcsuite/btcwallet"
go install -buildmode=pie -ldflags -extldflags=-Wl,-z,now,-z,relro . ./cmd/...
go clean -modcache
echo 'Prepending btc to unqualified binaries...'
for _bin in $(find "$srcdir/bin" \
-mindepth 1 \
-maxdepth 1 \
-type f ! -name "btc*" -printf '%f\n'); do
mv "$srcdir/bin/$_bin" "$srcdir/bin/btc$_bin"
done
}
package_btcd() {
pkgdesc="An alternative full node Bitcoin implementation written in Go"
provides=('btcd')
conflicts=('btcd')
echo 'Installing btcd license...'
install -Dm 644 "$srcdir/src/github.com/btcsuite/btcd/LICENSE" \
-t "$pkgdir/usr/share/licenses/btcd"
echo 'Installing btcd docs...'
for _doc in CHANGES README.md sample-btcd.conf; do
install -Dm 644 "$srcdir/src/github.com/btcsuite/btcd/$_doc" \
-t "$pkgdir/usr/share/doc/btcd"
done
cp -dpr --no-preserve=ownership "$srcdir/src/github.com/btcsuite/btcd/docs" \
"$pkgdir/usr/share/doc/btcd"
echo 'Installing btcd...'
for _bin in btcaddblock \
btcctl \
btcd \
btcfindcheckpoint \
btcgencerts; do
install -Dm 755 "$srcdir/bin/$_bin" -t "$pkgdir/usr/bin"
done
echo 'Cleaning up pkgdir...'
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}
package_btcwallet() {
pkgdesc="Secure Bitcoin wallet daemon written in Go"
provides=('btcwallet')
conflicts=('btcwallet')
echo 'Installing btcwallet license...'
install -Dm 644 "$srcdir/src/github.com/btcsuite/btcwallet/LICENSE" \
-t "$pkgdir/usr/share/licenses/btcwallet"
echo 'Installing btcwallet docs...'
for _doc in CHANGES README.md sample-btcwallet.conf; do
install -Dm 644 "$srcdir/src/github.com/btcsuite/btcwallet/$_doc" \
-t "$pkgdir/usr/share/doc/btcwallet"
done
cp -dpr --no-preserve=ownership \
"$srcdir/src/github.com/btcsuite/btcwallet/docs" \
"$pkgdir/usr/share/doc/btcwallet"
echo 'Installing btcwallet...'
for _bin in btcdropwtxmgr \
btcsweepaccount \
btcwallet; do
install -Dm 755 "$srcdir/bin/$_bin" -t "$pkgdir/usr/bin"
done
echo 'Cleaning up pkgdir...'
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}
|