diff options
author | Dennis Schubert | 2018-08-05 19:14:35 +0200 |
---|---|---|
committer | Dennis Schubert | 2018-08-05 19:14:35 +0200 |
commit | 6bed92108f71e3b5a1683c9330788cf50dcabc80 (patch) | |
tree | 1f5a8e60c9d9162ee33a1475570c9d6b37b0d023 | |
download | aur-6bed92108f71e3b5a1683c9330788cf50dcabc80.tar.gz |
Release Hooktor 0.1.0
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | hooktor.install | 10 | ||||
-rw-r--r-- | hooktor.json | 13 | ||||
-rw-r--r-- | hooktor.service | 12 |
5 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a004e7f38d02 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = hooktor + pkgdesc = A small webhook reactor. + pkgver = 0.1.0 + pkgrel = 1 + url = https://github.com/denschub/hooktor + install = hooktor.install + arch = x86_64 + license = MIT + makedepends = nodejs + makedepends = npm + options = !strip + backup = etc/hooktor.json + source = https://github.com/denschub/hooktor/archive/v0.1.0.tar.gz + source = hooktor.json + source = hooktor.service + sha512sums = f9e8fad1a313928fa5936e0d67c9088f3140a12ab65125a92a28e84be8a7d5ffa2bbf3bcdb77dd078270e2d307fe1f94a2f51433df820a6e8cc5c21b0b93645d + sha512sums = a07c88803de4505bfa32c66b0f69b2cf7ed1b6f96525f0444a87c27189444a15b0fd02888d6b8c14acf33d90d2ea86b4bba9a1fff1e519775bf00f98497b2fdb + sha512sums = bf5789ad379848620f678b17585ccc0825d9f25356516e53315f77287ed984b5a9a2f02ff8d450d100adf2f3efadf51a11ad52b729e0020348a10be7c77ae772 + +pkgname = hooktor + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d79e68efbce3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Dennis Schubert <mail@dennis-schubert.de> + +pkgname="hooktor" +pkgver=0.1.0 +pkgrel=1 +pkgdesc="A small webhook reactor." +arch=("x86_64") +url="https://github.com/denschub/hooktor" +license=("MIT") +makedepends=("nodejs" "npm") +options=("!strip") +backup=("etc/hooktor.json") +install="hooktor.install" +source=("https://github.com/denschub/hooktor/archive/v${pkgver}.tar.gz" + "hooktor.json" + "hooktor.service") +sha512sums=('f9e8fad1a313928fa5936e0d67c9088f3140a12ab65125a92a28e84be8a7d5ffa2bbf3bcdb77dd078270e2d307fe1f94a2f51433df820a6e8cc5c21b0b93645d' + 'a07c88803de4505bfa32c66b0f69b2cf7ed1b6f96525f0444a87c27189444a15b0fd02888d6b8c14acf33d90d2ea86b4bba9a1fff1e519775bf00f98497b2fdb' + 'bf5789ad379848620f678b17585ccc0825d9f25356516e53315f77287ed984b5a9a2f02ff8d450d100adf2f3efadf51a11ad52b729e0020348a10be7c77ae772') + +build() { + cd "$srcdir/hooktor-${pkgver}" + + npm install + ./node_modules/.bin/pkg --targets latest-linux-x64 . +} + +package() { + cd "$srcdir/hooktor-${pkgver}" + + install -dm755 ${pkgdir}/var/lib/hooktor + install -dm755 ${pkgdir}/var/lib/hooktor/projects + install -Dm755 hooktor ${pkgdir}/usr/bin/hooktor + install -Dm644 ${srcdir}/hooktor.json ${pkgdir}/etc/hooktor.json + install -Dm644 ${srcdir}/hooktor.service ${pkgdir}/usr/lib/systemd/system/hooktor.service + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} + diff --git a/hooktor.install b/hooktor.install new file mode 100644 index 000000000000..442ce398396a --- /dev/null +++ b/hooktor.install @@ -0,0 +1,10 @@ +post_install() { + getent group hooktor > /dev/null || groupadd -r hooktor 1>/dev/null + getent passwd hooktor > /dev/null || useradd -r -d /var/lib/hooktor -g hooktor -s /bin/false hooktor 1>/dev/null + chown -R hooktor:hooktor /var/lib/hooktor +} + +post_remove() { + getent passwd hooktor > /dev/null && userdel hooktor 1>/dev/null + getent group hooktor > /dev/null && groupdel hooktor 1>/dev/null +} diff --git a/hooktor.json b/hooktor.json new file mode 100644 index 000000000000..2b871373c82c --- /dev/null +++ b/hooktor.json @@ -0,0 +1,13 @@ +{ + "enabledServices": [ + "github", + "travis" + ], + "projectConfigRoot": "/var/lib/hooktor/projects", + "server": { + "listen": { + "address": "::1", + "port": 4042 + } + } +} diff --git a/hooktor.service b/hooktor.service new file mode 100644 index 000000000000..d5b7d148c150 --- /dev/null +++ b/hooktor.service @@ -0,0 +1,12 @@ +[Unit] +Description=A small webhook reactor +After=network.target + +[Service] +User=hooktor +Group=hooktor +ExecStart=/usr/bin/hooktor /etc/hooktor.json +Restart=always + +[Install] +WantedBy=multi-user.target |