diff options
author | Pic0 | 2019-08-03 19:13:03 +0200 |
---|---|---|
committer | Pic0 | 2019-08-03 19:13:03 +0200 |
commit | 290d4f10db644f6bb2170539fc87752a1691fc3a (patch) | |
tree | cb8fac59e44d0368f5157cd394b24155aac03fff | |
download | aur-290d4f10db644f6bb2170539fc87752a1691fc3a.tar.gz |
Initial zigbee2mqtt-git package, v1.5.1
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | zigbee2mqtt.service | 14 | ||||
-rw-r--r-- | zigbee2mqtt.sysusers | 1 | ||||
-rw-r--r-- | zigbee2mqtt.tmpfiles | 1 |
5 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a07ac378f47a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = zigbee2mqtt-git + pkgdesc = A Zigbee to MQTT bridge for domotic devices. + pkgver = 1.5.1.r0.gac3b924 + pkgrel = 1 + url = https://www.zigbee2mqtt.io + arch = any + license = GPLv3 + makedepends = npm + makedepends = git + depends = nodejs>=10.0 + optdepends = cc-tool: To flash Texas Instruments CC2531 debugger + optdepends = mosquitto: MQTT broker + conflicts = zigbee2mqtt + backup = opt/zigbee2mqtt/data/configuration.yaml + source = zigbee2mqtt::git+https://github.com/Koenkk/zigbee2mqtt.git + source = zigbee2mqtt.service + source = zigbee2mqtt.sysusers + source = zigbee2mqtt.tmpfiles + sha256sums = SKIP + sha256sums = 831ce970669d29ba2db208bec8245c97e80540981dd23276bba10a9b7b699e1b + sha256sums = bf3e49cfb86df460b4db16b280839dc7f0c73fbfd29ea6d86040f711606abf65 + sha256sums = 5861e6e25350b32fc81cf1a43802470e8ff033a019cba4d28b3bd48c6cb5ddf6 + +pkgname = zigbee2mqtt-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..02f7d128a0f8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +_pkgname=zigbee2mqtt +pkgname=zigbee2mqtt-git +pkgver=1.5.1.r0.gac3b924 +pkgrel=1 +pkgdesc="A Zigbee to MQTT bridge for domotic devices." +arch=('any') +url="https://www.zigbee2mqtt.io" +license=('GPLv3') +depends=('nodejs>=10.0') +conflicts=('zigbee2mqtt') +makedepends=('npm' 'git') +optdepends=( + 'cc-tool: To flash Texas Instruments CC2531 debugger' + 'mosquitto: MQTT broker') +source=( + 'zigbee2mqtt::git+https://github.com/Koenkk/zigbee2mqtt.git' + 'zigbee2mqtt.service' + 'zigbee2mqtt.sysusers' + 'zigbee2mqtt.tmpfiles') +sha256sums=( + 'SKIP' + '831ce970669d29ba2db208bec8245c97e80540981dd23276bba10a9b7b699e1b' + 'bf3e49cfb86df460b4db16b280839dc7f0c73fbfd29ea6d86040f711606abf65' + '5861e6e25350b32fc81cf1a43802470e8ff033a019cba4d28b3bd48c6cb5ddf6') +backup=('opt/zigbee2mqtt/data/configuration.yaml') + +pkgver() { + + cd zigbee2mqtt + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//' + +} + +package() { + + cd "$_pkgname" + npm install --cache "${srcdir}/npm-cache" --user root + install -d -m 650 "${pkgdir}/opt/${_pkgname}" + cp -dpr --no-preserve=ownership "${srcdir}/${_pkgname}/" "${pkgdir}/opt/" + install -Dm644 "$srcdir/${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service" + install -Dm644 "$srcdir/${_pkgname}.sysusers" "$pkgdir/usr/lib/sysusers.d/${_pkgname}.conf" + install -Dm644 "$srcdir/${_pkgname}.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/${_pkgname}.conf" +} diff --git a/zigbee2mqtt.service b/zigbee2mqtt.service new file mode 100644 index 000000000000..0dd6e825f952 --- /dev/null +++ b/zigbee2mqtt.service @@ -0,0 +1,14 @@ +[Unit] +Description=zigbee2mqtt +After=network.target + +[Service] +ExecStart=/usr/bin/npm start +WorkingDirectory=/opt/zigbee2mqtt +StandardOutput=inherit +StandardError=inherit +Restart=always +User=zigbee2mqtt + +[Install] +WantedBy=multi-user.target diff --git a/zigbee2mqtt.sysusers b/zigbee2mqtt.sysusers new file mode 100644 index 000000000000..ba2e76d8965b --- /dev/null +++ b/zigbee2mqtt.sysusers @@ -0,0 +1 @@ +u zigbee2mqtt - "zigbee2mqtt service user" /opt/zigbee2mqtt diff --git a/zigbee2mqtt.tmpfiles b/zigbee2mqtt.tmpfiles new file mode 100644 index 000000000000..8db6f606ef4b --- /dev/null +++ b/zigbee2mqtt.tmpfiles @@ -0,0 +1 @@ +d /opt/zigbee2mqtt/data 0755 zigbee2mqtt zigbee2mqtt - |