summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Harting2021-10-26 01:54:22 +0200
committerGiovanni Harting2021-10-26 01:54:22 +0200
commit2b164c51b5d0ecea563dd088ff93a1f4bcbdf781 (patch)
tree2a8c445827a13523f21a2f98e3b0417733c69a2a
downloadaur-2b164c51b5d0ecea563dd088ff93a1f4bcbdf781.tar.gz
Initial upload: zwavejs2mqtt-git v5.10.0.r0.3538a6e1-1
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD51
-rw-r--r--zwavejs2mqtt.service16
-rw-r--r--zwavejs2mqtt.sysusers1
-rw-r--r--zwavejs2mqtt.tmpfiles1
5 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..46573ee6320
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = zwavejs2mqtt-git
+ pkgdesc = Zwave to Mqtt gateway and Control Panel Web UI.
+ pkgver = v5.10.0.r0.3538a6e1
+ pkgrel = 1
+ url = https://github.com/zwave-js/zwavejs2mqtt
+ arch = any
+ license = MIT
+ makedepends = yarn
+ makedepends = node-gyp
+ makedepends = git
+ depends = nodejs
+ provides = zwavejs2mqtt
+ conflicts = zwavejs2mqtt
+ backup = etc/zwavejs2mqtt/app.ts
+ source = git+https://github.com/zwave-js/zwavejs2mqtt.git
+ source = zwavejs2mqtt.sysusers
+ source = zwavejs2mqtt.tmpfiles
+ source = zwavejs2mqtt.service
+ b2sums = SKIP
+ b2sums = d4a834bd7c8e4c832128f9f9c0ffb9d4409424402ba9c28a430a2d41d19cf780ba606c27b5f3b71f7640caa9883724647f2779cfa3cf2714564eb5e58b6144e2
+ b2sums = 2324c50252e1005b1ec06bf73e9d05937472397f5fc533e7ab468d416bcb6b5d01b87055a41d3b3a5b44b24e02ca45fafb5f79085833988ec458ee72c1d8c31b
+ b2sums = 0e7238f3858a9ce4b21e2c3493079648adbe1885ed32d1ae666b8a79f5b4c6c0d59c572a81159fc75c8db6a2a8f716b221a7ea857866462bb2d2a4b537c93ae7
+
+pkgname = zwavejs2mqtt-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1c5a00ef3b0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Giovanni Harting
+
+pkgname=zwavejs2mqtt-git
+pkgver=v5.10.0.r0.3538a6e1
+pkgrel=1
+pkgdesc="Zwave to Mqtt gateway and Control Panel Web UI."
+arch=('any')
+url="https://github.com/zwave-js/zwavejs2mqtt"
+license=('MIT')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+depends=(nodejs)
+makedepends=(yarn node-gyp git)
+backup=("etc/zwavejs2mqtt/app.ts")
+source=("git+https://github.com/zwave-js/zwavejs2mqtt.git"
+ "${pkgname%-git}.sysusers"
+ "${pkgname%-git}.tmpfiles"
+ "${pkgname%-git}.service")
+b2sums=('SKIP'
+ 'd4a834bd7c8e4c832128f9f9c0ffb9d4409424402ba9c28a430a2d41d19cf780ba606c27b5f3b71f7640caa9883724647f2779cfa3cf2714564eb5e58b6144e2'
+ '2324c50252e1005b1ec06bf73e9d05937472397f5fc533e7ab468d416bcb6b5d01b87055a41d3b3a5b44b24e02ca45fafb5f79085833988ec458ee72c1d8c31b'
+ '0e7238f3858a9ce4b21e2c3493079648adbe1885ed32d1ae666b8a79f5b4c6c0d59c572a81159fc75c8db6a2a8f716b221a7ea857866462bb2d2a4b537c93ae7')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ #cd "$pkgname-$pkgver"
+ yarn install
+ yarn run build
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ #cd "$pkgname-$pkgver"
+
+ install -d "$pkgdir"/usr/share/webapps/${pkgname%-git}/dist/static "$pkgdir"/etc/${pkgname%-git}/
+ cp -r {node_modules,bin,lib,server,app.ts,views} "$pkgdir"/usr/share/webapps/${pkgname%-git}
+ cp -r dist/static/* "$pkgdir"/usr/share/webapps/${pkgname%-git}/dist/static
+ cp -r config/* "$pkgdir"/etc/${pkgname%-git}/
+ ln -s /etc/${pkgname%-git}/ "$pkgdir"/usr/share/webapps/${pkgname%-git}/config
+ ln -s /var/lib/${pkgname%-git} "$pkgdir"/usr/share/webapps/${pkgname%-git}/store
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 "${srcdir}"/${pkgname%-git}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname%-git}.conf
+ install -Dm644 "${srcdir}"/${pkgname%-git}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname%-git}.conf
+ install -Dm644 "${srcdir}"/${pkgname%-git}.service -t "${pkgdir}"/usr/lib/systemd/system/
+}
diff --git a/zwavejs2mqtt.service b/zwavejs2mqtt.service
new file mode 100644
index 00000000000..fe9f49d1dfd
--- /dev/null
+++ b/zwavejs2mqtt.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=zwavejs2mqtt nodejs daemon
+After=network.target
+
+[Service]
+Type=simple
+User=zwavejs2mqtt
+Group=zwavejs2mqtt
+ExecStart=/usr/bin/node /usr/share/webapps/zwavejs2mqtt/server/bin/www.js
+Environment=ZWAVEJS_EXTERNAL_CONFIG=/var/lib/zwavejs2mqtt/.config-db
+PrivateTmp=true
+ProtectSystem=full
+ProtectHome=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/zwavejs2mqtt.sysusers b/zwavejs2mqtt.sysusers
new file mode 100644
index 00000000000..95c533a10a5
--- /dev/null
+++ b/zwavejs2mqtt.sysusers
@@ -0,0 +1 @@
+u zwavejs2mqtt - "zwavejs2mqtt user" /var/lib/zwavejs2mqtt
diff --git a/zwavejs2mqtt.tmpfiles b/zwavejs2mqtt.tmpfiles
new file mode 100644
index 00000000000..c25d41b00cf
--- /dev/null
+++ b/zwavejs2mqtt.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/zwavejs2mqtt - zwavejs2mqtt zwavejs2mqtt -