desktop/bitcoin-core/PKGBUILD
2018-07-27 13:50:18 +02:00

80 lines
2.8 KiB
Bash

pkgname=bitcoin-core
pkgver=0.16.2
pkgrel=1
pkgdesc="Bitcoin is a peer-to-peer network based digital currency"
arch=('x86_64')
url="https://www.bitcoin.org/"
depends=('boost' 'zeromq' 'miniupnpc' 'libevent' 'qt5-base' 'qrencode' 'protobuf')
makedepends=('qt5-tools')
license=('MIT')
conflicts=('bitcoin-daemon' 'bitcoin-cli' 'bitcoin-qt' 'bitcoin')
replaces=('bitcoin-daemon' 'bitcoin-cli' 'bitcoin-qt' 'bitcoin')
provides=('bitcoin-daemon' 'bitcoin-cli' 'bitcoin-qt' 'bitcoin')
source=("https://github.com/bitcoin/bitcoin/archive/v$pkgver.tar.gz"
"bitcoin.sysusers"
"bitcoin.tmpfiles")
sha256sums=('0d99c4be777943954c4fea1aff0c405dbd5e30d87bcb9a939f26fa19ccb76f93'
'6f70b0d3d5e4a3f78b15d8f49515cd33cbf0c9d2ac22f94f0d3fabb3f620e458'
'b769c977b193680f2f549997fd8e07f6aa507071dfd519d59255ab4c687ebfcd')
prepare() {
cd ${pkgname%-core}-$pkgver
autoreconf -fi
}
build() {
cd ${pkgname%-core}-$pkgver
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib/bitcoin \
--sysconfdir=/etc \
--sharedstatedir=/usr/share/bitcoin \
--localstatedir=/var/lib/bitcoin \
--with-incompatible-bdb \
--enable-hardening \
--with-gui=qt5
make
}
package() {
cd ${pkgname%-core}-$pkgver
install -Dm755 src/qt/bitcoin-qt "$pkgdir"/usr/bin/bitcoin-qt
install -Dm644 doc/man/bitcoin-qt.1 \
"$pkgdir"/usr/share/man/man1/bitcoin-qt.1
install -Dm644 contrib/debian/bitcoin-qt.desktop \
"$pkgdir"/usr/share/applications/bitcoin.desktop
install -Dm644 share/pixmaps/bitcoin128.png \
"$pkgdir"/usr/share/pixmaps/bitcoin128.png
install -Dm755 src/bitcoind "$pkgdir"/usr/bin/bitcoind
install -Dm644 contrib/bitcoind.bash-completion \
"$pkgdir"/usr/share/bash-completion/completions/bitcoind
install -Dm644 doc/man/bitcoind.1 \
"$pkgdir"/usr/share/man/man1/bitcoind.1
install -Dm644 contrib/debian/examples/bitcoin.conf \
"$pkgdir/usr/share/doc/$pkgname/examples/bitcoin.conf"
install -Dm644 contrib/init/bitcoind.service \
"$pkgdir/usr/lib/systemd/system/bitcoind.service"
install -Dm644 "$srcdir/bitcoin.sysusers" \
"$pkgdir/usr/lib/sysusers.d/bitcoin.conf"
install -Dm644 "$srcdir/bitcoin.tmpfiles" \
"$pkgdir/usr/lib/tmpfiles.d/bitcoin.conf"
install -Dm755 src/bitcoin-cli "$pkgdir"/usr/bin/bitcoin-cli
install -Dm644 contrib/bitcoin-cli.bash-completion \
"$pkgdir"/usr/share/bash-completion/completions/bitcoin-cli
install -Dm644 doc/man/bitcoin-cli.1 \
"$pkgdir"/usr/share/man/man1/bitcoin-cli.1
install -Dm755 src/bitcoin-tx "$pkgdir"/usr/bin/bitcoin-tx
install -Dm644 contrib/bitcoin-tx.bash-completion \
"$pkgdir"/usr/share/bash-completion/completions/bitcoin-tx
install -Dm644 doc/man/bitcoin-tx.1 \
"$pkgdir"/usr/share/man/man1/bitcoin-tx.1
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}