summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2018-04-04 17:56:46 -0400
committerAndy Weidenbaum2018-04-04 17:56:46 -0400
commit5776c3a4cf379f92ea865a4ef84a60992a7abcec (patch)
tree3a0e47bb48589fef9410161f800af606d5285d5f
parent09ca189130ce151ddb49b732a4d6a7edbd81f023 (diff)
downloadaur-5776c3a4cf379f92ea865a4ef84a60992a7abcec.tar.gz
increment pkgrel; add pacman hooks, rm chown
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--bs.install8
-rw-r--r--libbitcoin-server-git-01-rm-rf.hook10
4 files changed, 22 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 220f2eadd3d..103f35dc0f8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libbitcoin-server-git
pkgdesc = Bitcoin Full Node and Query Server
pkgver = 20180315
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/libbitcoin/libbitcoin-server
install = bs.install
arch = i686
@@ -40,11 +40,13 @@ pkgbase = libbitcoin-server-git
source = bs.logrotate
source = bs-init.service
source = bs.service
+ source = libbitcoin-server-git-01-rm-rf.hook
sha256sums = SKIP
sha256sums = SKIP
sha256sums = a2e4a1d6aaabcec9c57207a7e92b004c2dfa4a2d15c0ecfc05eefbf307783a49
sha256sums = cbcc39723f04b51ed15475fbfb19cf94273db04b3e460f961e5078b40e664cb7
sha256sums = 17ff3d0ee3580ccbfdd77b227db27f678aa879c7e6fd30d8748bdb2ca84fd371
+ sha256sums = bb3747db6e4124d4d80cdc7167db0c40ff99413413db1a66276a339e8e263451
pkgname = libbitcoin-server-git
diff --git a/PKGBUILD b/PKGBUILD
index dbe6e15bbc6..cabcd618c1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=libbitcoin-server-git
pkgver=20180315
-pkgrel=2
+pkgrel=3
pkgdesc="Bitcoin Full Node and Query Server"
arch=('i686' 'x86_64')
depends=('boost'
@@ -34,12 +34,14 @@ source=(git+https://github.com/libbitcoin/libbitcoin-server
git+https://github.com/libbitcoin/libbitcoin-server.wiki
bs.logrotate
bs-init.service
- bs.service)
+ bs.service
+ libbitcoin-server-git-01-rm-rf.hook)
sha256sums=('SKIP'
'SKIP'
'a2e4a1d6aaabcec9c57207a7e92b004c2dfa4a2d15c0ecfc05eefbf307783a49'
'cbcc39723f04b51ed15475fbfb19cf94273db04b3e460f961e5078b40e664cb7'
- '17ff3d0ee3580ccbfdd77b227db27f678aa879c7e6fd30d8748bdb2ca84fd371')
+ '17ff3d0ee3580ccbfdd77b227db27f678aa879c7e6fd30d8748bdb2ca84fd371'
+ 'bb3747db6e4124d4d80cdc7167db0c40ff99413413db1a66276a339e8e263451')
backup=('etc/obelisk/bs/bs.cfg'
'etc/logrotate.d/bs')
provides=('libbitcoin-server')
@@ -121,6 +123,10 @@ package() {
msg2 'Installing logrotate conf...'
install -Dm 644 "$srcdir/bs.logrotate" "$pkgdir/etc/logrotate.d/bs"
+ # XXX: pacman hook on Remove event not firing
+ msg2 'Installing pacman hooks...'
+ install -Dm 644 "$srcdir"/*.hook -t "$pkgdir/usr/share/libalpm/hooks"
+
msg2 'Cleaning up pkgdir...'
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
diff --git a/bs.install b/bs.install
index e13210f6dfe..2acf832c199 100644
--- a/bs.install
+++ b/bs.install
@@ -1,8 +1,4 @@
-_bs_user=obelisk
-_bs_group=obelisk
-
post_install() {
- chown -R $_bs_user:$_bs_group /etc/obelisk/bs /var/log/obelisk/bs
printf "%b\n" "$obelisk"
}
@@ -10,10 +6,6 @@ post_upgrade() {
post_install
}
-post_remove() {
- rm -rf /etc/obelisk/bs /var/log/obelisk/bs
-}
-
read -d '' obelisk <<'EOF'
########################################################################
########################################################################
diff --git a/libbitcoin-server-git-01-rm-rf.hook b/libbitcoin-server-git-01-rm-rf.hook
new file mode 100644
index 00000000000..700845dbec9
--- /dev/null
+++ b/libbitcoin-server-git-01-rm-rf.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Remove
+Type = Package
+Target = libbitcoin-server-git
+
+[Action]
+Description = Cleaning up libbitcoin server directories...
+Depends = coreutils
+When = PostTransaction
+Exec = /usr/bin/rm -rf /etc/obelisk/bs /var/log/obelisk/bs