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-01-21 02:51:25 +08:00
pkgver=0.15.1
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')
source=("http://bitcoin.org/bin/bitcoin-core-$pkgver/bitcoin-$pkgver.tar.gz"
"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-01-21 02:51:25 +08:00
sha256sums=('34de2dbe058c1f8b6464494468ebe2ff0422614203d292da1c6458d6f87342b4'
2017-03-12 02:16:45 +08:00
'b6826255de152159fff53ad8f456a8ce9c1b35ebaf79171001e4ceed42da57b7'
'7ddc5b4f0e6a217663c4cc8bbf6dc237c8e16aff3159f0fe3e0de18810676f90'
2017-09-18 06:46:40 +08:00
'a91104de6fc7cedce8c2d61a18105a3ea81316c2b5ce295ae18df610f00b2b39'
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
}