mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
voicemngr: Divide libvoice to common code and platform specific one
Also add a new packages libvoice-broadcom.
This commit is contained in:
parent
d18a1b6788
commit
cc5348a282
2 changed files with 82 additions and 20 deletions
62
libvoice-broadcom/Makefile
Normal file
62
libvoice-broadcom/Makefile
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#
|
||||
# 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:=libvoice-broadcom
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
|
||||
PKG_SOURCE_VERSION:=2d3f39d517e89df0f3e80f85b7efedd3efc6705c
|
||||
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
|
||||
|
||||
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
|
||||
|
||||
export CONFIG_BRCM_SDK_VER_504040
|
||||
export CONFIG_BCM_CHIP_ID
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS libvoice for Broadcom
|
||||
URL:=
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
|
||||
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/$(PKG_NAME)/install
|
||||
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
|
||||
# WARNING: skipping libvoice-broadcom -- package has no install section
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
|
|
@ -4,19 +4,21 @@
|
|||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
export LIBVOICE_MAKE_OPTS:=$(TOPDIR)/tmp/.libvoice-opts.mk
|
||||
include $(TOPDIR)/rules.mk
|
||||
-include $(LIBVOICE_MAKE_OPTS)
|
||||
|
||||
PKG_NAME:=voicemngr
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/voicemngr
|
||||
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/voicemngr.git
|
||||
PKG_SOURCE_VERSION:=13a14593daa610a87c363a1a0acd19f31f405a71
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
|
||||
PKG_SOURCE_VERSION:=be0efc70203d0f8b83269711388c7990d53db851
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
|
@ -25,29 +27,21 @@ endif
|
|||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
TARGET_PLATFORM:=
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),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
|
||||
export LIBVOICE_CFLAGS
|
||||
export LIBVOICE_LIBS
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS Voice Manager
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +TARGET_brcmbca:bcmkernel +TARGET_iopsys_qualcomm:vtsp
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +TARGET_brcmbca:bcmkernel +TARGET_brcmbca:libvoice-broadcom +TARGET_iopsys_qualcomm:vtsp
|
||||
endef
|
||||
|
||||
define Package/voicemngr/description
|
||||
define Package/$(PKG_NAME)/description
|
||||
Voice manager is a daemon that bridges Asterisk and platform specific DSP/SLIC APIs
|
||||
endef
|
||||
|
||||
|
|
@ -55,16 +49,22 @@ 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)/
|
||||
$(LN) $(LIBVOICE_PKG_BUILD_DIR)/*.[ch] $(PKG_BUILD_DIR)/libvoice/
|
||||
endef
|
||||
else
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(LN) $(LIBVOICE_PKG_BUILD_DIR)/*.[ch] $(PKG_BUILD_DIR)/libvoice/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/voicemngr/install
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/voicemngr $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
|
||||
$(CP) $(PKG_BUILD_DIR)/libvoice/libvoice.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,voicemngr))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue