[packages/zigbee2mqtt] invoke build steps manually

atler atler at pld-linux.org
Thu Aug 6 18:28:08 CEST 2026


commit c6e93a1e79cd46fb40dea8a76b6021f2f528cb86
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Aug 6 18:23:05 2026 +0200

    invoke build steps manually
    
    npm overrides PATH and uses vendored typescript compiler instead of
    system one

 zigbee2mqtt.spec | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/zigbee2mqtt.spec b/zigbee2mqtt.spec
index 7b09c0d..53f4c43 100644
--- a/zigbee2mqtt.spec
+++ b/zigbee2mqtt.spec
@@ -16,6 +16,7 @@ Source1:	%{name}-node_modules-%{node_modules_ver}.tar.xz
 # Source1-md5:	28ba91cca7367a571a0c625ded0e2648
 Source2:	%{name}.service
 URL:		https://www.zigbee2mqtt.io
+BuildRequires:	jq
 BuildRequires:	libstdc++-devel
 BuildRequires:	nodejs-gyp
 BuildRequires:	nodejs-typescript
@@ -46,6 +47,8 @@ devices with whatever smart home infrastructure you are using.
 
 grep -r '#!.*env node' -l . | xargs %{__sed} -i -e '1 s,#!.*env node,#!/usr/bin/node,'
 
+test "$(jq -r .scripts.build package.json)" = "tsc && node index.js writehash"
+
 %build
 export CC="%{__cc}"
 export CXX="%{__cxx}"
@@ -59,7 +62,8 @@ for mod_dir in `find node_modules -name binding.gyp -printf '%h\n'`; do
 	node-gyp -C "$mod_dir" --nodedir=/usr configure
 	node-gyp -C "$mod_dir" --release --verbose -j %{__jobs} build
 done
-npm run build
+tsc
+node index.js writehash
 
 %install
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zigbee2mqtt.git/commitdiff/5134f64aa3a083218050c8e7ec3ff68ea351abca



More information about the pld-cvs-commit mailing list