aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornolash2019-09-01 22:12:41 +0200
committernolash2019-09-01 22:12:41 +0200
commita75cef79252d7b748495498aee4b78c132ab002d (patch)
treec07b8529d365b6739b31138aa5fbcfb4125bc76d
parent45585782f65dfe6cf2a2efc553c5a37eaa9a40b7 (diff)
downloadaur-a75cef79252d7b748495498aee4b78c132ab002d.tar.gz
Move user group add to install script
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD4
-rw-r--r--go-swarm.install5
3 files changed, 7 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index af6baaf8ea98..dbe5933d35c7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,6 +6,7 @@ pkgbase = go-swarm
install = go-swarm.install
changelog = CHANGELOG
arch = x86_64
+ groups = eth-swarm
license = LGPL3
makedepends = go>=1.10.0
makedepends = git
diff --git a/PKGBUILD b/PKGBUILD
index 62abb905a0c6..b6caa7471b11 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgdesc="Censorship resistant storage and communication infrastructure for a tru
arch=('x86_64')
url="https://swarm.ethereum.org"
license=('LGPL3')
-groups=()
+groups=(eth-swarm)
depends=()
makedepends=('go>=1.10.0' 'git')
checkdepends=()
@@ -62,8 +62,6 @@ build() {
msg2 "using gopath $GOPATH"
go build -o build/swarm -v ${SWARMPATH}/swarm/cmd/swarm
- getent group bzz > /dev/null || groupadd -r bzz
- getent passwd bzz > /dev/null || useradd -g bzz -d /var/lib/bzz -m -r
}
check() {
diff --git a/go-swarm.install b/go-swarm.install
index 52d78bf90e2b..8fbd302f0080 100644
--- a/go-swarm.install
+++ b/go-swarm.install
@@ -1,3 +1,8 @@
+pre_install () {
+ getent group bzz > /dev/null || groupadd -r bzz
+ getent passwd bzz > /dev/null || useradd -g bzz -d /var/lib/bzz -m -r bzz
+}
+
post_install () {
if [ -f /var/lib/bzz/.swarm-pass ]; then
echo "you already have a Swarm data dir. I'll leave it alone ;)"