summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-12-26 10:19:43 -0800
committerAndy Weidenbaum2015-12-26 10:19:43 -0800
commit49865e6319fbd420548d5d7a6ba617eb74edb6a5 (patch)
tree8bb3a45c44ab9b74ee04f628d6fca74444895906
parentfce11f223dd9d865eb063eb493d3c1f089138c49 (diff)
downloadaur-49865e6319fbd420548d5d7a6ba617eb74edb6a5.tar.gz
increment pkgrel to 4; blockchain dir is /srv/blockchain
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD25
-rw-r--r--bs.install47
3 files changed, 46 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4579f726875..67a40c3d4c1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu Dec 24 06:40:19 UTC 2015
+# Sat Dec 26 18:19:24 UTC 2015
pkgbase = libbitcoin-server
pkgdesc = Bitcoin Full Node and Query Server
pkgver = 2.2.0
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/libbitcoin/libbitcoin-server
install = bs.install
arch = i686
@@ -13,6 +13,7 @@ pkgbase = libbitcoin-server
makedepends = autoconf
makedepends = automake
makedepends = gcc
+ makedepends = git
makedepends = libtool
makedepends = make
makedepends = pkg-config
@@ -28,6 +29,8 @@ pkgbase = libbitcoin-server
depends = secp256k1-git
depends = zeromq
optdepends = libbitcoin-explorer: CurveZMQ client/server authentication
+ backup = etc/bs/bs.cfg
+ backup = etc/logrotate.d/bs
source = libbitcoin-server-2.2.0.tar.gz::https://codeload.github.com/libbitcoin/libbitcoin-server/tar.gz/v2.2.0
source = git+https://github.com/libbitcoin/libbitcoin-server.wiki
source = bs.logrotate
diff --git a/PKGBUILD b/PKGBUILD
index c03cd8448ed..bd89c3f3763 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=libbitcoin-server
pkgver=2.2.0
-pkgrel=3
+pkgrel=4
pkgdesc="Bitcoin Full Node and Query Server"
arch=('i686' 'x86_64')
depends=('boost'
@@ -19,6 +19,7 @@ depends=('boost'
makedepends=('autoconf'
'automake'
'gcc'
+ 'git'
'libtool'
'make'
'pkg-config')
@@ -36,6 +37,8 @@ sha256sums=('7df19518ce2401100b8689c7adb77e9c7c68317219b9c48c0e464c181f5f47d8'
'09ea3d2bf7cb87a0760c2a73893d62d1868d232c9e925cabf6140b1b031efee3'
'564112d0860f1523049bd89779e1b1bfc189a3d143d2cc808441981ed793658a'
'2bcf3615cd8e5ba6d4c78429b018b9bf756d5fad6ab879963a13f19e47315c7d')
+backup=('etc/bs/bs.cfg'
+ 'etc/logrotate.d/bs')
install=bs.install
prepare() {
@@ -43,10 +46,12 @@ prepare() {
msg2 'Configuring...'
cp -dpr --no-preserve=ownership data/bs.cfg data/bs.cfg.in
- sed -i 's@^database_path.*@database_path = /srv/bs/blockchain@' data/bs.cfg.in
- sed -i 's@^debug_file.*@debug_file = /var/log/bs/debug.log@' data/bs.cfg.in
- sed -i 's@^error_file.*@error_file = /var/log/bs/error.log@' data/bs.cfg.in
- sed -i 's@^hosts_file.*@hosts_file = /etc/bs/hosts.cache@' data/bs.cfg.in
+ sed -i \
+ -e 's@^database_path.*@database_path = /srv/blockchain/db@' \
+ -e 's@^debug_file.*@debug_file = /var/log/bs/debug.log@' \
+ -e 's@^error_file.*@error_file = /var/log/bs/error.log@' \
+ -e 's@^hosts_file.*@hosts_file = /etc/bs/hosts.cache@' \
+ data/bs.cfg.in
}
build() {
@@ -74,7 +79,7 @@ package() {
msg2 'Installing...'
install -dm 700 "$pkgdir/etc/bs"
- install -dm 700 "$pkgdir/srv/bs"
+ install -dm 755 "$pkgdir/srv/blockchain"
make DESTDIR="$pkgdir" install
msg2 'Installing documentation...'
@@ -85,13 +90,11 @@ package() {
install -Dm 600 data/bs.cfg.in "$pkgdir/etc/bs/bs.cfg"
msg2 'Installing systemd service files...'
- install -Dm 644 "$srcdir/bs.service" \
- "$pkgdir/usr/lib/systemd/system/bs.service"
- install -Dm 644 "$srcdir/bsinit.service" \
- "$pkgdir/usr/lib/systemd/system/bsinit.service"
+ install -Dm 644 "$srcdir/bsinit.service" -t "$pkgdir/usr/lib/systemd/system"
+ install -Dm 644 "$srcdir/bs.service" -t "$pkgdir/usr/lib/systemd/system"
msg2 'Installing logrotate conf...'
- install -dm 700 "$pkgdir/var/log/bs"
+ install -dm 755 "$pkgdir/var/log/bs"
install -Dm 644 "$srcdir/bs.logrotate" "$pkgdir/etc/logrotate.d/bs"
msg2 'Cleaning up pkgdir...'
diff --git a/bs.install b/bs.install
index 97acf9cf09a..b0fab5facc1 100644
--- a/bs.install
+++ b/bs.install
@@ -4,22 +4,22 @@ _bs_group=bs
post_install() {
_mkuser
# disable Copy-On-Write (btrfs directories only)
- for _dir in /srv/bs /var/log/bs; do
+ for _dir in /srv/blockchain /var/log/bs; do
_is_btrfs "$_dir" && _disable_cow "$_dir"
done
- chown -R $_bs_user:$_bs_group /etc/bs /srv/bs /var/log/bs
- printf "%b\n" "$xx"
+ chown -R $_bs_user:$_bs_group /etc/bs /srv/blockchain /var/log/bs
+ printf "%b\n" "$obelisk"
}
post_upgrade() {
_mkuser
- chown -R $_bs_user:$_bs_group /etc/bs /srv/bs /var/log/bs
- printf "%b\n" "$xx"
+ chown -R $_bs_user:$_bs_group /etc/bs /srv/blockchain /var/log/bs
+ printf "%b\n" "$obelisk"
}
post_remove() {
_rmuser
- rm -rf /etc/bs /srv/bs /var/log/bs
+ rm -rf /etc/bs /srv/blockchain /var/log/bs
}
@@ -86,21 +86,28 @@ _chattrify() {
}
_disable_cow() {
- _chattrify "$1" "700" "$_bs_user" "$_bs_group"
+ _chattrify "$1" "755" "$_bs_user" "$_bs_group"
}
-read -d '' xx <<'EOF'
-libbitcoin-server
-=================
-
-To run normally:
-
- $ bs --initchain /path/to/bs/config/file
- $ bs /path/to/bs/config/file
-
-To run as a service:
-
- $ sudo systemctl start bsinit # wait several mins for blockchain dir to init
- $ sudo systemctl start bs
+read -d '' obelisk <<'EOF'
+########################################################################
+########################################################################
+## ##
+## Libbitcoin Server ##
+## _________________ ##
+## ##
+## To run: ##
+## ##
+## systemctl start bsinit # first run only ##
+## systemctl start bs ##
+## ##
+## ##
+## Config: /etc/bs/bs.cfg ##
+## Blockchain: /srv/blockchain ##
+## Documentation: /usr/share/doc/libbitcoin-server ##
+## Logs: /var/log/bs ##
+## ##
+########################################################################
+########################################################################
EOF