mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
tr104: Added tr104d as datamodel microservice daemon
This commit is contained in:
parent
f06a0e93b7
commit
7160fadf56
2 changed files with 79 additions and 0 deletions
55
tr104/Makefile
Normal file
55
tr104/Makefile
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#
|
||||
# Copyright (C) 2023 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tr104
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifeq ($(LOCAL_DEV),0)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/voice/tr104.git
|
||||
PKG_SOURCE_VERSION:=7c39a806a111811adf78a2ed0380aedae7c9450c
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=TR104 Datamodel Daemon
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +asterisk
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
TR104 datamodel daemon
|
||||
endef
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
|
||||
-DDM_ENABLE_UBUS=ON
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) ~/git/$(PKG_NAME)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/tr104d
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/ubus/tr104d $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/tr104d $(1)/etc/init.d/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
24
tr104/files/etc/init.d/tr104d
Normal file
24
tr104/files/etc/init.d/tr104d
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=96
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/tr104d
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t bbfdmd.init -p info
|
||||
}
|
||||
|
||||
|
||||
start_service()
|
||||
{
|
||||
procd_open_instance "tr104d"
|
||||
procd_set_param command ${PROG}
|
||||
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue