mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Add a new package voicemngr
Voicemngr is an upgrading of endptmngr and supports multiple platforms.
This commit is contained in:
parent
d70db5ef94
commit
1d1c621821
2 changed files with 95 additions and 0 deletions
68
voicemngr/Makefile
Normal file
68
voicemngr/Makefile
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#
|
||||
# Copyright (C) 2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=voicemngr
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/voicemngr
|
||||
LOCAL_DEV=1
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/voicemngr.git
|
||||
PKG_SOURCE_VERSION:=0901382048bb7ce01fc1767fef75e54692f56743
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
TARGET_PLATFORM:=
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM:=BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_qualcomm),y)
|
||||
TARGET_PLATFORM:=QUALCOMM
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
export CONFIG_BRCM_SDK_VER_504040
|
||||
export CONFIG_BCM_CHIP_ID
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
define Package/voicemngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS Voice Manager
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +TARGET_iopsys_brcm63xx_arm:bcmkernel +TARGET_iopsys_qualcomm:vtsp
|
||||
endef
|
||||
|
||||
define Package/voicemngr/description
|
||||
Voice manager is a daemon that bridges Asterisk and platform specific DSP/SLIC APIs
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
@echo "Building from the local source. TARGET_PLATFORM=$(TARGET_PLATFORM)"
|
||||
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/voicemngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/voicemngr $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,voicemngr))
|
||||
|
||||
27
voicemngr/files/etc/init.d/voicemngr
Executable file
27
voicemngr/files/etc/init.d/voicemngr
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=68
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=voicemngr
|
||||
|
||||
start_service() {
|
||||
[ "$(db -q get hw.board.hasVoice)" = "1" ] || return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param env hw_board_hasDect=$(db get hw.board.hasDect)
|
||||
procd_set_param command $NAME
|
||||
procd_set_param respawn "5" "0" "3"
|
||||
procd_set_param nice -12
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger asterisk
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue