blob: f0a886559f300a437382fe7ab961c37e007169f4 (
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
pkgname=bitcoin-core
pkgver=0.16.0
pkgrel=4
pkgdesc="Bitcoin Core headless P2P node"
arch=('aarch64' 'armv6h' 'armv7h' 'i686' 'x86_64')
url="https://bitcoin.org"
depends=('boost'
'boost-libs'
'zeromq')
checkdepends=('python')
makedepends=('autoconf'
'automake'
'binutils'
'libtool'
'm4'
'make'
'pkg-config'
'systemd')
license=('MIT')
source=(https://bitcoin.org/bin/bitcoin-core-$pkgver/bitcoin-$pkgver.tar.gz
bitcoin.conf
bitcoin.logrotate
bitcoin.service
bitcoin-reindex.service
bitcoin-sysusers.conf
bitcoin-core-01-systemd-sysusers.hook
bitcoin-core-01-userdel.hook
bitcoin-core-02-chown.hook
bitcoin-core-02-rm-rf.hook)
sha256sums=('8cbec0397d932cab7297a8c23c918392f6eebd410646b4b954787de9f4a3ee40'
'b1908344281498d39bfa40c3b9725f9c95bf22602cd46e6120a1f17bad9dae35'
'8f05207b586916d489b7d25a68eaacf6e678d7cbb5bfbac551903506b32f904f'
'e56dc913b82097acdc20374a2ae1b08323af74ccbbf63c829d4d13c9cb63ad8d'
'4d5053ba94fa647abc6abe8b90f46d4c61d706de8fb0151f6aefed772adf317e'
'f126b4824e43d9760ab2021460a37d859986f07e1ac9245ee4938e832739f73a'
'0b4f7ec41cf88aa1278d089a03f116c33bac62dec038903f4ced58da67afb980'
'f1c3727220df06993a61cc9f4ef25c83cdaf3624179b5ead8383bc9ef7109e70'
'ae31040f0cc57df976c6ed41e8f69ed4b947db32ba713c7a0b7410108dbf5581'
'b8e574f4b56c81a05a05f5bf59b28120b782d00354b08bd43c641038704e07a5')
backup=('etc/bitcoin/bitcoin.conf'
'etc/logrotate.d/bitcoin')
provides=('bitcoin-cli' 'bitcoin-daemon' 'bitcoin-tx')
conflicts=('bitcoin-cli' 'bitcoin-daemon' 'bitcoin-qt' 'bitcoin-tx')
install=bitcoin.install
# half of available processing units or one if only one is available
_nproc=$(($(nproc)/2))
[[ ${_nproc} < 1 ]] && _nproc=1
build() {
cd "$srcdir/${pkgname%-core}-$pkgver"
msg2 'Building...'
./autogen.sh
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib/bitcoin \
--sysconfdir=/etc \
--sharedstatedir=/usr/share/bitcoin \
--localstatedir=/var/lib/bitcoin \
--enable-hardening \
--with-gui=no \
--disable-wallet \
--without-miniupnpc \
--with-gnu-ld
make -j$_nproc
}
check() {
cd "$srcdir/${pkgname%-core}-$pkgver"
msg2 'Testing...'
make -j$_nproc check
}
package() {
cd "$srcdir/${pkgname%-core}-$pkgver"
msg2 'Installing license...'
install -Dm 644 COPYING -t "$pkgdir/usr/share/licenses/${pkgname%-core}"
msg2 'Installing man pages...'
install -Dm 644 doc/man/*.1 -t "$pkgdir/usr/share/man/man1"
msg2 'Installing documentation...'
install -dm 755 "$pkgdir/usr/share/doc/bitcoin"
for _doc in \
$(find doc -maxdepth 1 -type f -name "*.md" -printf '%f\n') \
release-notes; do
cp -dpr --no-preserve=ownership "doc/$_doc" \
"$pkgdir/usr/share/doc/bitcoin/$_doc"
done
msg2 'Installing essential directories'
install -dm 700 "$pkgdir/etc/bitcoin"
install -dm 755 "$pkgdir/srv/bitcoin"
msg2 'Installing bitcoin...'
make DESTDIR="$pkgdir" install
msg2 'Installing bitcoin.conf...'
install -Dm 600 "$srcdir/bitcoin.conf" -t "$pkgdir/etc/bitcoin"
msg2 'Installing bitcoin.service...'
install -Dm 644 "$srcdir/bitcoin.service" -t "$pkgdir/usr/lib/systemd/system"
install -Dm 644 "$srcdir/bitcoin-reindex.service" \
-t "$pkgdir/usr/lib/systemd/system"
msg2 'Installing bitcoin-sysusers.conf...'
install -Dm 644 "$srcdir/bitcoin-sysusers.conf" \
"$pkgdir/usr/lib/sysusers.d/bitcoin.conf"
msg2 'Installing bitcoin.logrotate...'
install -Dm 644 "$srcdir/bitcoin.logrotate" "$pkgdir/etc/logrotate.d/bitcoin"
msg2 'Installing bash completion...'
for _compl in bitcoin-cli bitcoin-tx bitcoind; do
install -Dm 644 "contrib/${_compl}.bash-completion" \
"$pkgdir/usr/share/bash-completion/completions/$_compl"
done
# XXX: pacman hook on Remove event not firing
msg2 'Installing pacman hooks...'
install -Dm 644 "$srcdir"/*.hook -t "$pkgdir/usr/share/libalpm/hooks"
}
|