2013-04-04 16:08:57 +00:00
|
|
|
#
|
2016-04-05 07:05:46 +00:00
|
|
|
# Copyright (C) 2010-2016 OpenWrt.org
|
2013-04-04 16:08:57 +00:00
|
|
|
# Copyright (C) 2010 Alfred E. Heggestad
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=baresip
|
2016-05-20 17:22:00 +00:00
|
|
|
PKG_VERSION:=0.4.19
|
|
|
|
PKG_RELEASE:=1
|
2013-04-04 16:08:57 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.creytiv.com/pub/
|
2016-05-20 17:22:00 +00:00
|
|
|
PKG_MD5SUM:=18260d41b608dcc9c637a18749c8759c
|
2013-04-04 16:08:57 +00:00
|
|
|
|
2014-11-04 16:00:24 +00:00
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
|
|
|
PKG_LICENSE_FILES:=docs/COPYING
|
2016-05-31 18:12:51 +00:00
|
|
|
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
2014-11-04 16:00:24 +00:00
|
|
|
|
2013-04-04 16:08:57 +00:00
|
|
|
baresip-mods:= \
|
|
|
|
alsa \
|
|
|
|
avcodec \
|
|
|
|
avformat \
|
|
|
|
cons \
|
|
|
|
evdev \
|
|
|
|
g711 \
|
|
|
|
g722 \
|
2015-07-22 13:16:46 +00:00
|
|
|
g726 \
|
2013-04-04 16:08:57 +00:00
|
|
|
oss \
|
|
|
|
speex \
|
2015-07-22 13:16:46 +00:00
|
|
|
speex-aec \
|
|
|
|
speex-pp \
|
2013-04-04 16:08:57 +00:00
|
|
|
stdio \
|
|
|
|
v4l \
|
2016-04-05 07:05:46 +00:00
|
|
|
v4l2
|
2013-04-04 16:08:57 +00:00
|
|
|
|
|
|
|
PKG_CONFIG_DEPENDS:= \
|
|
|
|
$(patsubst %,CONFIG_PACKAGE_baresip-mod-%,$(baresip-mods)) \
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/baresip/Default
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
SUBMENU:=Telephony
|
|
|
|
URL:=http://www.creytiv.com/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/baresip
|
|
|
|
$(call Package/baresip/Default)
|
|
|
|
TITLE:=Portable and modular SIP User-Agent with A/V support
|
|
|
|
DEPENDS:=+libre +librem +libpthread
|
2014-10-28 20:43:11 +00:00
|
|
|
MENU:=1
|
2013-04-04 16:08:57 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
baresip-mod-alsa := USE_ALSA
|
2015-01-04 13:11:30 +00:00
|
|
|
baresip-mod-avcodec := USE_AVCODEC
|
|
|
|
baresip-mod-avformat := USE_AVFORMAT
|
2013-04-04 16:08:57 +00:00
|
|
|
baresip-mod-cons := USE_CONS
|
|
|
|
baresip-mod-evdev := USE_EVDEV
|
|
|
|
baresip-mod-g711 := USE_G711
|
|
|
|
baresip-mod-g722 := USE_G722
|
2015-07-22 13:16:46 +00:00
|
|
|
baresip-mod-g726 := USE_G726
|
2013-04-04 16:08:57 +00:00
|
|
|
baresip-mod-oss := USE_OSS
|
|
|
|
baresip-mod-speex := USE_SPEEX
|
2015-07-22 13:16:46 +00:00
|
|
|
baresip-mod-speex-aec := USE_SPEEX_AEC
|
|
|
|
baresip-mod-speex-pp := USE_SPEEX_PP
|
2013-04-04 16:08:57 +00:00
|
|
|
baresip-mod-stdio := USE_STDIO
|
|
|
|
baresip-mod-v4l := USE_V4L
|
|
|
|
baresip-mod-v4l2 := USE_V4L2
|
|
|
|
|
|
|
|
BARESIP_MOD_OPTIONS:= \
|
|
|
|
MOD_AUTODETECT= \
|
2015-08-12 11:56:44 +00:00
|
|
|
EXTRA_MODULES="dtmfio" \
|
2013-04-04 16:08:57 +00:00
|
|
|
$(foreach m,$(baresip-mods),$(baresip-mod-$(m))=$(if $(CONFIG_PACKAGE_baresip-mod-$(m)),1))
|
|
|
|
|
2015-06-28 18:46:11 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC) -D_GNU_SOURCE
|
2013-04-04 16:08:57 +00:00
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
LIBRE_MK="$(STAGING_DIR)/usr/share/re/re.mk" \
|
|
|
|
LIBRE_INC="$(STAGING_DIR)/usr/include/re" \
|
|
|
|
LIBRE_SO="$(STAGING_DIR)/usr/lib" \
|
|
|
|
LIBREM_PATH="../rem" \
|
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
|
|
|
|
SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
|
|
|
|
SYSROOT_ALT="$(STAGING_DIR)/usr" \
|
|
|
|
RELEASE=1 \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
OS="linux" \
|
|
|
|
$(BARESIP_MOD_OPTIONS) \
|
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/baresip/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/baresip/modules
|
|
|
|
$(CP) \
|
2014-03-26 12:04:16 +00:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/baresip/modules/{account,auloop,contact,ice,menu,stun,turn}.so \
|
2013-04-04 16:08:57 +00:00
|
|
|
$(1)/usr/lib/baresip/modules/.
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/baresip
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/.
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip
|
|
|
|
endef
|
|
|
|
|
2014-12-28 16:03:36 +00:00
|
|
|
##################
|
|
|
|
# Baresip modules
|
2013-04-04 16:08:57 +00:00
|
|
|
# 1. Name
|
|
|
|
# 2. Title
|
|
|
|
# 3. Files
|
2014-12-28 16:03:36 +00:00
|
|
|
# 4. Dependencies
|
|
|
|
##################
|
|
|
|
|
2013-04-04 16:08:57 +00:00
|
|
|
define BuildPlugin
|
|
|
|
|
|
|
|
define Package/baresip-mod-$(1)
|
|
|
|
$$(call Package/baresip/Default)
|
|
|
|
TITLE:= baresip $(2) module
|
|
|
|
DEPENDS:= baresip $(4)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/baresip-mod-$(1)/install
|
|
|
|
[ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/baresip/modules
|
|
|
|
for f in $(3); do \
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/baresip/modules/$$$$$$$${f}.so \
|
|
|
|
$$(1)/usr/lib/baresip/modules/ ; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call BuildPackage,baresip-mod-$(1)))
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,baresip))
|
|
|
|
|
|
|
|
$(eval $(call BuildPlugin,alsa,ALSA audio driver,alsa,+PACKAGE_baresip-mod-alsa:alsa-lib))
|
|
|
|
$(eval $(call BuildPlugin,avcodec,FFmpeg video codecs,avcodec,+PACKAGE_baresip-mod-avcodec:libffmpeg-full))
|
|
|
|
$(eval $(call BuildPlugin,avformat,FFmpeg video source,avformat,+PACKAGE_baresip-mod-avformat:libffmpeg-full))
|
|
|
|
$(eval $(call BuildPlugin,cons,console UI,cons,))
|
2016-04-05 08:06:43 +00:00
|
|
|
$(eval $(call BuildPlugin,dtmfio,DTMF input/output,dtmfio,))
|
2013-04-04 16:08:57 +00:00
|
|
|
$(eval $(call BuildPlugin,evdev,input event device UI,evdev,))
|
|
|
|
$(eval $(call BuildPlugin,g711,G.711 audio codec,g711,))
|
|
|
|
$(eval $(call BuildPlugin,g722,G.722 audio codec,g722,+PACKAGE_baresip-mod-g722:libspandsp))
|
2015-07-22 13:16:46 +00:00
|
|
|
$(eval $(call BuildPlugin,g726,G.726 audio codec,g726,+PACKAGE_baresip-mod-g726:libspandsp))
|
|
|
|
$(eval $(call BuildPlugin,httpd,Webserver UI module,httpd,))
|
2013-04-04 16:08:57 +00:00
|
|
|
$(eval $(call BuildPlugin,oss,OSS audio driver,oss,))
|
|
|
|
$(eval $(call BuildPlugin,speex,Speex audio codec,speex,+PACKAGE_baresip-mod-speex:libspeex))
|
2015-07-22 13:16:46 +00:00
|
|
|
$(eval $(call BuildPlugin,speex-aec,Speex Acoustic Echo Cancellation,speex_aec,+PACKAGE_baresip-mod-speex-aec:libspeex))
|
|
|
|
$(eval $(call BuildPlugin,speex-pp,Speex Pre-processor,speex_pp,+PACKAGE_baresip-mod-speex-pp:libspeex))
|
2013-04-04 16:08:57 +00:00
|
|
|
$(eval $(call BuildPlugin,stdio,standard I/O UI,stdio,))
|
|
|
|
$(eval $(call BuildPlugin,v4l,Video4Linux video source,v4l,+PACKAGE_baresip-mod-v4l:libv4l))
|
|
|
|
$(eval $(call BuildPlugin,v4l2,Video4Linux2 video source,v4l2,+PACKAGE_baresip-mod-v4l2:libv4l))
|