desktop/bitcoin-core/PKGBUILD

90 lines
3.1 KiB
Bash
Raw Normal View History

2017-03-12 02:16:45 +08:00
pkgname=bitcoin-core
2018-02-25 18:29:02 +08:00
pkgver=0.16.0
2018-01-21 02:51:25 +08:00
pkgrel=1
2017-03-12 02:16:45 +08:00
pkgdesc="Bitcoin is a peer-to-peer network based digital currency"
arch=('x86_64')
2017-06-28 11:52:12 +08:00
url="https://www.bitcoin.org/"
2017-03-12 02:16:45 +08:00
depends=('boost' 'boost-libs' 'zeromq' 'miniupnpc' 'libevent' 'qt5-base' 'qrencode' 'protobuf')
makedepends=('boost' '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')
2018-02-25 18:29:02 +08:00
source=("https://github.com/bitcoin/bitcoin/archive/v$pkgver.tar.gz"
2017-03-12 02:16:45 +08:00
"https://raw.github.com/bitcoin/bitcoin/v$pkgver/contrib/debian/bitcoin-qt.desktop"
"bitcoin128.svg"
"https://raw.github.com/bitcoin/bitcoin/v$pkgver/contrib/debian/examples/bitcoin.conf"
"bitcoin.service"
"bitcoin-reindex.service")
2018-02-25 18:29:02 +08:00
sha256sums=('8ade43e420b6aad00645d79239c21947e47f37d1f974b4948b0da0b6999c28d5'
'3d4eb0cfd0750adeadc7820e43159e5c6d622dbd8bb0177669c43c61d20958be'
2017-03-12 02:16:45 +08:00
'7ddc5b4f0e6a217663c4cc8bbf6dc237c8e16aff3159f0fe3e0de18810676f90'
2018-02-25 18:29:02 +08:00
'f5b34a5ff5f8bf4240a365dcca1f76eb1868054badf90117f2153f6254b96e10'
2017-03-12 02:16:45 +08:00
'5e45f2ceaeb7bfa60aeb66ca4167068191eb4358af03f95ac70fd96d9b006349'
'10ad0b8c356559886634eaf658992004045853ec26cddee143d16125cb75e8f1')
build() {
2018-01-21 02:51:25 +08:00
cd ${pkgname%-core}-$pkgver
2017-03-12 02:16:45 +08:00
msg2 'Building...'
./autogen.sh
./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() {
2018-01-21 02:51:25 +08:00
cd ${pkgname%-core}-$pkgver
2017-03-12 02:16:45 +08:00
msg2 'Installing bitcoin...'
2018-01-21 02:51:25 +08:00
make DESTDIR=$pkgdir install
2017-03-12 02:16:45 +08:00
msg "installing .desktop and icon"
install -Dm644 "$srcdir"/bitcoin-qt.desktop \
"$pkgdir"/usr/share/applications/bitcoin.desktop
install -Dm644 "$srcdir"/bitcoin128.svg \
"$pkgdir"/usr/share/pixmaps/bitcoin128.svg
msg "installing license"
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
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 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"
2017-04-23 20:59:51 +08:00
#msg2 'Installing bitcoin.logrotate...'
#install -Dm 644 "$srcdir/bitcoin.logrotate" "$pkgdir/etc/logrotate.d/bitcoin"
2017-03-12 02:16:45 +08:00
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
}