From nobody Tue Nov 26 13:55:40 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyPH10Fq9z5fVVM; Tue, 26 Nov 2024 13:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyPH06sFnz4SCH; Tue, 26 Nov 2024 13:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732629340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQ2OuvhDSo8Cv6ioCaTj2v/++7YUP525XjQ5BPrBH9c=; b=abfPh2XEmLz1YZhhlfWgOGqZ4UEhmBJF74U5jQAC1XS+YeG7h4CtXHKeIV67CgQRZaYnuI CZvFI3Re6MdwEWaIRdTMDrVer4SkKYy+bdDhyu5Q44gM4t5TiknJC4ko4s+FTgu0Dw8D1P 2Bwi44noYaS5Fygr8x+ytQSAiZtMr5p1YGLfSUi0Z9ShmE3Ow0DIKI8GwkSUDx6nf3NXT/ rQgHu2+xUlSwod11XCUVcVDOQvDHBGQXtA+InXayHEj3DrkMHqBTL1ELNGxPHyPP3WDvgV LnvJIAJY4AKUcNiM78Ehr7HzPp6bCtQBhYUsPvRpz2h6Jlw5BfC9ujvjAdyYug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732629340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQ2OuvhDSo8Cv6ioCaTj2v/++7YUP525XjQ5BPrBH9c=; b=Y/P2naOgX1qkVIJaFBjdgY6Ibbxu0qouS2D9EPUP4P8Niyqz09yJxITHqImEQJMg0ecE3O bXzm8ebkm/5XvaTg/zBJhVBUXzUL68l6RbQY6HJY3SQGd6ap2EThm1mLRNG2PcFJNxE+tj AN8k5NTejoxeLAUg7e5wFQW8IYyP/M5jkWA+l2vVwprgwuK35UwS9NdcGi2ks1g+W+ivcO qQ6Rx8c7nMDjluSTu6ZAq25tWr+b/kZM4lAe85zB3BN7SfnChzkXOvC7jyU9fVbnEThtx3 ESxF2JAYccAi+VaDq1IWKo/Xq+EY72Pi344dhIY5BPTF+PDtpMXxb/0o3rr4sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732629340; a=rsa-sha256; cv=none; b=mhwVjy+bSsfFY8W3cp/hrG9spAtFM/WkZOp3yjSdhw2aPBQ4YBrSer62sa4MjPLEKuHZ1v SthW+EggSTo/TV2HElQLoXpMPbMQciPZs6sdceXcRL6XAHDUUlV6q5VAHg6EslzZ3RqSGA 7kmfM5niJZRHlQ2/DRZciQzUP7cFMsUdvicVhm9qZOOFjWDH+8HL56xsfI4peUH78EZTLC wOqspMgAmS39z9hCk+k/sBanzPVOaFh0oFI2fJ3TzecDp5d0Hc3DE+ZBld7Wt5xM6ha+R8 4cj6CTLxLO+lINWj6jtFJpPtsBu7PzxNNopNhYDL54gaOv+wwSPXFqOxWGCNJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XyPH06KZWzSPH; Tue, 26 Nov 2024 13:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AQDtevq089707; Tue, 26 Nov 2024 13:55:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AQDtehF089703; Tue, 26 Nov 2024 13:55:40 GMT (envelope-from git) Date: Tue, 26 Nov 2024 13:55:40 GMT Message-Id: <202411261355.4AQDtehF089703@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Juraj Lutter Subject: git: 6ef0c1587146 - main - comms/zigbee2mqtt: Add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ef0c1587146d1cc03a1e6ea44f929c7621b76de Auto-Submitted: auto-generated The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/ports/commit/?id=6ef0c1587146d1cc03a1e6ea44f929c7621b76de commit 6ef0c1587146d1cc03a1e6ea44f929c7621b76de Author: Juraj Lutter AuthorDate: 2024-11-24 17:35:55 +0000 Commit: Juraj Lutter CommitDate: 2024-11-26 13:55:19 +0000 comms/zigbee2mqtt: Add new port zigbee2mqtt allows you to use your Zigbee devices without the vendor's bridge or gateway. It bridges events and allows you to control your Zigbee devices via MQTT. In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using. --- GIDs | 2 +- UIDs | 2 +- comms/Makefile | 1 + comms/zigbee2mqtt/Makefile | 80 + comms/zigbee2mqtt/distinfo | 5 + comms/zigbee2mqtt/files/configuration.yaml.in | 32 + comms/zigbee2mqtt/files/pkg-message.in | 9 + comms/zigbee2mqtt/files/z2m.in | 62 + comms/zigbee2mqtt/pkg-descr | 5 + comms/zigbee2mqtt/pkg-plist | 14988 ++++++++++++++++++++++++ 10 files changed, 15184 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index 31b9594c7217..c67f101c167d 100644 --- a/GIDs +++ b/GIDs @@ -806,7 +806,7 @@ plocate:*:860: # free: 862 # free: 863 # free: 864 -# free: 865 +z2m:*:865: vglusers:*:866: sqlpage:*:867: jellyfin:*:868: diff --git a/UIDs b/UIDs index b0da39669ba4..686c17aa217c 100644 --- a/UIDs +++ b/UIDs @@ -812,7 +812,7 @@ opensearch:*:855:855::0:0:opensearch user:/nonexistent:/usr/sbin/nologin # free: 862 # free: 863 # free: 864 -# free: 865 +z2m:*:865:865::0:0:zigbee2mqtt:/usr/local/z2m:/usr/sbin/nologin # free: 866 sqlpage:*:867:867::0:0:SQLPage:/nonexistent:/usr/sbin/nologin jellyfin:*:868:868::0:0:Jellyfin:/nonexistent:/usr/sbin/nologin diff --git a/comms/Makefile b/comms/Makefile index 8b1fa5742509..a87afc8b9337 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -233,5 +233,6 @@ SUBDIR += xnecview SUBDIR += yagiuda SUBDIR += yfklog + SUBDIR += zigbee2mqtt .include diff --git a/comms/zigbee2mqtt/Makefile b/comms/zigbee2mqtt/Makefile new file mode 100644 index 000000000000..f0b89f12b8e7 --- /dev/null +++ b/comms/zigbee2mqtt/Makefile @@ -0,0 +1,80 @@ +PORTNAME= zigbee2mqtt +DISTVERSION= 1.41.0 +CATEGORIES= comms +MASTER_SITES= LOCAL/otis/:nodemodules +DISTFILES= ${DISTCACHEFILES_nodemodules}:nodemodules + +MAINTAINER= otis@FreeBSD.org +COMMENT= Use your Zigbee devices without the vendor's bridge or gateway +WWW= https://github.com/Koenkk/zigbee2mqtt + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= node${NODEJS_VERSION}>0:www/node${NODEJS_VERSION} \ + npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX} +RUN_DEPENDS= node${NODEJS_VERSION}>0:www/node${NODEJS_VERSION} + +USES= nodejs:20 + +USE_GITHUB= yes +GH_ACCOUNT= Koenkk +GH_PROJECT= zigbee2mqtt +USE_RC_SUBR= z2m + +NO_BUILD= yes + +SUB_FILES= configuration.yaml pkg-message z2m +SUB_LIST= Z2M_DATADIR=${Z2M_DATADIR} \ + Z2M_GROUP=${Z2M_GROUP} \ + Z2M_HOME=${Z2M_HOME} \ + Z2M_LOGDIR=${Z2M_LOGDIR} \ + Z2M_USER=${Z2M_USER} + +USERS= ${Z2M_USER} +GROUPS= ${Z2M_GROUP} + +DISTCACHEFILES= ${DISTCACHEFILES_nodemodules} +DISTCACHEFILES_nodemodules= zigbee2mqtt-nodemodules-${DISTVERSION}.tar.gz + +# user, group and homedir +Z2M_GROUP?= z2m +Z2M_USER?= z2m +Z2M_HOME?= ${PREFIX}/z2m +Z2M_DATADIR?= /var/db/z2m +Z2M_LOGDIR?= /var/log/z2m + +PLIST_SUB+= Z2M_DATADIR=${Z2M_DATADIR} \ + Z2M_GROUP=${Z2M_GROUP} \ + Z2M_HOME=${Z2M_HOME} \ + Z2M_LOGDIR=${Z2M_LOGDIR} \ + Z2M_USER=${Z2M_USER} + +post-extract: + for f in ${DISTCACHEFILES}; do \ + ${TAR} xf ${DISTDIR}/${DIST_SUBDIR}/$${f} -C ${WRKSRC}; \ + done + for f in .github .gitignore .dockerignore .prettierignore \ + .prettierrc .release-please-manifest.json CHANGELOG.md \ + CODE_OF_CONDUCT.md CONTRIBUTING.md README.md docker \ + update.sh \ + data; do \ + ${RM} -rf ${WRKSRC}/$${f}; \ + done + +do-install: + ${MKDIR} ${STAGEDIR}${Z2M_HOME} + ${MKDIR} ${STAGEDIR}${Z2M_DATADIR} + ${MKDIR} ${STAGEDIR}${Z2M_LOGDIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${Z2M_HOME} + ${INSTALL_DATA} ${WRKDIR}/configuration.yaml ${STAGEDIR}${Z2M_DATADIR}/configuration.yaml.sample + ${INSTALL} -lrs ${STAGEDIR}${Z2M_DATADIR} ${STAGEDIR}${Z2M_HOME}/data + +# This should be run after DISTVERSION change +create-caches-tarball: + cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} npm install --ignore-scripts --no-progress --no-audit --no-fund && \ + ${TAR} czf ${WRKDIR}/zigbee2mqtt-nodemodules-${DISTVERSION}.tar.gz \ + node_modules package-lock.json + +.include diff --git a/comms/zigbee2mqtt/distinfo b/comms/zigbee2mqtt/distinfo new file mode 100644 index 000000000000..8f5f4c9d7645 --- /dev/null +++ b/comms/zigbee2mqtt/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1732445789 +SHA256 (zigbee2mqtt-nodemodules-1.41.0.tar.gz) = ad41a8975dd50ddb9ca7cc2fd19d42369fcb82b4f8726a09d3cceede793b750c +SIZE (zigbee2mqtt-nodemodules-1.41.0.tar.gz) = 28113815 +SHA256 (Koenkk-zigbee2mqtt-1.41.0_GH0.tar.gz) = 53c619c17d9c535fb63df850036ffafc678f94e56a4d742325eefb043e294f75 +SIZE (Koenkk-zigbee2mqtt-1.41.0_GH0.tar.gz) = 554558 diff --git a/comms/zigbee2mqtt/files/configuration.yaml.in b/comms/zigbee2mqtt/files/configuration.yaml.in new file mode 100644 index 000000000000..80efe9950540 --- /dev/null +++ b/comms/zigbee2mqtt/files/configuration.yaml.in @@ -0,0 +1,32 @@ +# Home Assistant integration (MQTT discovery) +homeassistant: true + +# Enable the frontend, runs on port 8080 by default +frontend: true + +# allow new devices to join +permit_join: true + +# MQTT settings +mqtt: + # MQTT base topic for zigbee2mqtt MQTT messages + base_topic: zigbee2mqtt + # MQTT server URL + server: 'mqtt://localhost' + # MQTT server authentication, uncomment if required: + # user: my_user + # password: my_password + +# Serial settings +serial: + # Location of ITead Sonoff Zigbee 3.0 USB Dongle Plus + port: /dev/ttyU0 + +# Advanced settings +advanced: + log_output: [ "file" ] + log_level: info + log_symlink_current: true + log_directory: "%%Z2M_LOGDIR%%/%TIMESTAMP%" + log_file: "z2m.log" + diff --git a/comms/zigbee2mqtt/files/pkg-message.in b/comms/zigbee2mqtt/files/pkg-message.in new file mode 100644 index 000000000000..3579549325df --- /dev/null +++ b/comms/zigbee2mqtt/files/pkg-message.in @@ -0,0 +1,9 @@ +[ +{ type: install + message: <