Skip to content

Commit

Permalink
feat: update sscma-node & sscma-supervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnL4 committed Dec 24, 2024
1 parent 509777e commit aead6c2
Show file tree
Hide file tree
Showing 4 changed files with 2,015 additions and 9 deletions.
4 changes: 4 additions & 0 deletions external/br2-external/sscma-node/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ config BR2_PACKAGE_SSCMA_NODE
bool "sscma-node"
default y
select BR2_PACKAGE_MOSQUITTO
select BR2_PACKAGE_LIBHV
select BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_UTILS
select BR2_PACKAGE_ALSA_UTILS_ALSAMIXER
help
This is the help text for the ssmca-node package.
It will be displayed in the Buildroot configuration menu.
19 changes: 12 additions & 7 deletions external/br2-external/sscma-node/sscma-node.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#
################################################################################

SSCMA_NODE_VERSION = 322bf626cb88bd8726e15d218e345fc57749d223
SSCMA_NODE_VERSION = d1329046138e9118e9bf1bd9a9d53c11ccc37715
SSCMA_NODE_SITE = https://github.com/Seeed-Studio/sscma-example-sg200x
SSCMA_NODE_SITE_METHOD = git
SSCMA_NODE_GIT_SUBMODULES = YES
SSCMA_NODE_LICENSE = Apache-2.0
SSCMA_NODE_DEPENDENCIES = host-nodejs mosquitto
SSCMA_NODE_DEPENDENCIES = host-nodejs mosquitto libhv alsa-lib

# Configure step: prepare the build environment and run CMake to configure the build
define SSCMA_NODE_CONFIGURE_CMDS
Expand All @@ -25,17 +25,22 @@ endef

# Install step: copy the built files to the target directory
define SSCMA_NODE_INSTALL_TARGET_CMDS

# Create the necessary directories for node-red
mkdir -p $(TARGET_DIR)/home/recamera/.node-red/node_modules

# Install npm packages
$(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-sscma
$(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-os
$(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red @flowfuse/node-red-dashboard

# Install the executable file
$(INSTALL) -D -m 0755 $(@D)/solutions/sscma-node/build/sscma-node $(TARGET_DIR)/usr/local/bin/sscma-node

# Copy other files from the source directory to the target directory
cp -r $(@D)/solutions/sscma-node/files/* $(TARGET_DIR)/
cp -r $(@D)/solutions/sscma-node/rootfs/* $(TARGET_DIR)/

# Create the necessary directories for node-red
mkdir -p $(TARGET_DIR)/home/recamera/.node-red/node_modules

# Use npm to install the node-red-contrib-sscma package
$(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red [email protected]
endef

$(eval $(generic-package))
5 changes: 3 additions & 2 deletions external/br2-external/sscma-supervisor/sscma-supervisor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

SSCMA_SUPERVISOR_VERSION = 322bf626cb88bd8726e15d218e345fc57749d223
SSCMA_SUPERVISOR_VERSION = d1329046138e9118e9bf1bd9a9d53c11ccc37715
SSCMA_SUPERVISOR_SITE = https://github.com/Seeed-Studio/sscma-example-sg200x
SSCMA_SUPERVISOR_SITE_METHOD = git
SSCMA_SUPERVISOR_GIT_SUBMODULES = YES
Expand All @@ -29,7 +29,8 @@ define SSCMA_SUPERVISOR_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/solutions/supervisor/build/supervisor $(TARGET_DIR)/usr/local/bin/supervisor

# Copy other files from the source directory to the target directory
cp -r $(@D)/solutions/supervisor/files/* $(TARGET_DIR)/
cp -r $(@D)/solutions/supervisor/rootfs/* $(TARGET_DIR)/

endef

$(eval $(generic-package))
Loading

0 comments on commit aead6c2

Please sign in to comment.