diff options
author | setBoolean | 2021-03-31 20:49:53 +0200 |
---|---|---|
committer | setBoolean | 2021-03-31 20:49:53 +0200 |
commit | acf398b9334f75ca20dae541ab483e0d11b01cc9 (patch) | |
tree | e5edee6480652d776d43f272e6d1f59eecd357a3 | |
download | aur-acf398b9334f75ca20dae541ab483e0d11b01cc9.tar.gz |
initial release
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rwxr-xr-x | goshimmer.install | 21 | ||||
-rw-r--r-- | goshimmer.service | 21 |
4 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..174e50a0af7f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = goshimmer-bin + pkgdesc = GoShimmer implementation of Coordicide (official precompiled binary) + pkgver = 0.5.4 + pkgrel = 1 + url = https://github.com/iotaledger/goshimmer + install = goshimmer.install + arch = x86_64 + license = Apache + backup = var/lib/goshimmer/config.json + source = https://github.com/iotaledger/goshimmer/releases/download/v0.5.4/goshimmer-0.5.4_Linux_x86_64.tar.gz + source = goshimmer.service + sha256sums = 4106bb37f268f49009c6231a0423d60d8c130bb2ea9e95ca532279fdecb9a32b + sha256sums = fa8f7409fe68d58e29640e915eae3aeb3b6585fdbee4bc550d3e0c105f18dc34 + +pkgname = goshimmer-bin + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..347786a1c9c3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: setBoolean <setboolean@icloud.com> +pkgname="goshimmer-bin" +_pkgname="goshimmer" +pkgver="0.5.4" +pkgrel="1" +pkgdesc="GoShimmer implementation of Coordicide (official precompiled binary)" +arch=('x86_64') +url="https://github.com/iotaledger/goshimmer" +license=("Apache") +source=("https://github.com/iotaledger/goshimmer/releases/download/v${pkgver}/${_pkgname}-${pkgver}_Linux_x86_64.tar.gz" + "goshimmer.service") +sha256sums=('4106bb37f268f49009c6231a0423d60d8c130bb2ea9e95ca532279fdecb9a32b' + 'fa8f7409fe68d58e29640e915eae3aeb3b6585fdbee4bc550d3e0c105f18dc34') +backup=('var/lib/goshimmer/config.json') +install=goshimmer.install + +package() { + cd "${srcdir}" + + # Package files + mkdir -p "${pkgdir}/usr/bin/" + cp goshimmer "${pkgdir}/usr/bin/" + + mkdir -p "${pkgdir}/var/lib/goshimmer/" + cp snapshot.bin "${pkgdir}/var/lib/goshimmer/" + cp config.json "${pkgdir}/var/lib/goshimmer/" + cp README.md "${pkgdir}/var/lib/goshimmer/" + cp LICENSE "${pkgdir}/var/lib/goshimmer/" + + # Systemd service + mkdir -p "${pkgdir}/usr/lib/systemd/system/" + cp goshimmer.service "${pkgdir}/usr/lib/systemd/system/" +} diff --git a/goshimmer.install b/goshimmer.install new file mode 100755 index 000000000000..48f232dcf3dc --- /dev/null +++ b/goshimmer.install @@ -0,0 +1,21 @@ +#!/bin/sh + +pre_install() { + if ! id -u goshimmer > /dev/null 2>&1; then + useradd --no-create-home --system goshimmer > /dev/null + fi + mkdir -p /var/lib/goshimmer +} + +post_install() { + chown -R goshimmer:goshimmer /var/lib/goshimmer +} + +pre_remove() { + systemctl stop goshimmer.service +} + +post_remove() { + userdel goshimmer > /dev/null +} + diff --git a/goshimmer.service b/goshimmer.service new file mode 100644 index 000000000000..49b1f0af099a --- /dev/null +++ b/goshimmer.service @@ -0,0 +1,21 @@ +[Unit] +Description=goshimmer +Wants=network-online.target +After=network-online.target + +[Service] +LimitNOFILE=4096 +SyslogIdentifier=goshimmer +PrivateDevices=yes +PrivateTmp=yes +ProtectSystem=full +ProtectHome=yes + +User=goshimmer +WorkingDirectory=/var/lib/goshimmer +TimeoutSec=1200 +Restart=always +ExecStart=/usr/bin/goshimmer -c "/var/lib/goshimmer/config.json" + +[Install] +WantedBy=multi-user.target |