diff --git a/bbfdm/Makefile b/bbfdm/Makefile index 2664c0cf4..376fe93f6 100644 --- a/bbfdm/Makefile +++ b/bbfdm/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bbfdm -PKG_VERSION:=1.15.7 +PKG_VERSION:=1.15.8 USE_LOCAL:=0 ifneq ($(USE_LOCAL),1) @@ -70,6 +70,15 @@ define Package/bbfdmd/config source "$(SOURCE)/Config_bbfdmd.in" endef +# Below config is a hack to force-recompile dependent micro-services +define Package/libbbfdm-api/config + if PACKAGE_bbfdmd + config BBF_LIBBBFDM_VERSION + string "Internal config variable to force recompile" + default "v${PKG_VERSION}" + endif +endef + define Package/libbbfdm-api/description Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm endef diff --git a/bbfdm/bbfdm.mk b/bbfdm/bbfdm.mk index bfc2ec893..40a8305f9 100644 --- a/bbfdm/bbfdm.mk +++ b/bbfdm/bbfdm.mk @@ -6,6 +6,7 @@ BBFDM_BASE_DM_PATH=/usr/share/bbfdm BBFDM_INPUT_PATH=/etc/bbfdm/micro_services BBFDM_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +PKG_CONFIG_DEPENDS += CONFIG_BBF_LIBBBFDM_VERSION #BBFDM_VERSION:=$(shell grep -oP '(?<=^PKG_VERSION:=).*' ${BBFDM_DIR}/Makefile) #BBFDM_TOOLS:=$(BUILD_DIR)/bbfdm-$(BBFDM_VERSION)/tools diff --git a/bbfdm/tools/bbfdm.sh b/bbfdm/tools/bbfdm.sh index a981c9ec0..9f5b47cc3 100755 --- a/bbfdm/tools/bbfdm.sh +++ b/bbfdm/tools/bbfdm.sh @@ -148,8 +148,9 @@ if [ "${INPUT_FILE}" -eq "1" ]; then exit 1 fi - if [ -z "${DATA}" ]; then - echo "# Package name not provided ...." + service_name="$(cat ${SRC}|jq -r '.daemon.service_name')" + if [ -z "${service_name}" ]; then + echo "# service_name not defined in service json ...." exit 1 fi @@ -160,7 +161,7 @@ if [ "${INPUT_FILE}" -eq "1" ]; then fi install_dir ${DEST}/etc/bbfdm/services - install_data ${tempfile} ${DEST}/etc/bbfdm/services/${DATA}.json + install_data ${tempfile} ${DEST}/etc/bbfdm/services/${service_name}.json if [ -f "${tempfile}" ]; then rm ${tempfile}