2013-04-04 16:08:57 +00:00
|
|
|
#
|
2018-12-26 18:16:55 +00:00
|
|
|
# Copyright (C) 2010-2017 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
|
2018-12-26 18:17:57 +00:00
|
|
|
PKG_VERSION:=0.6.0
|
|
|
|
PKG_RELEASE:=1
|
2013-04-04 16:08:57 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2017-11-26 21:45:24 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
2018-12-26 18:17:57 +00:00
|
|
|
PKG_HASH:=ab3dd329599e4df83eeeb5451b42811598e0171a45a90b34006c5628b61d0764
|
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
|
|
|
|
2017-11-26 21:42:05 +00:00
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
2013-04-04 16:08:57 +00:00
|
|
|
baresip-mods:= \
|
|
|
|
alsa \
|
|
|
|
avcodec \
|
|
|
|
avformat \
|
|
|
|
cons \
|
2018-12-26 18:17:57 +00:00
|
|
|
echo \
|
2013-04-04 16:08:57 +00:00
|
|
|
evdev \
|
|
|
|
g711 \
|
|
|
|
g722 \
|
2015-07-22 13:16:46 +00:00
|
|
|
g726 \
|
2017-01-05 00:13:57 +00:00
|
|
|
opus \
|
2013-04-04 16:08:57 +00:00
|
|
|
oss \
|
2017-11-26 22:01:25 +00:00
|
|
|
plc \
|
|
|
|
portaudio \
|
|
|
|
pulse \
|
2018-12-26 18:17:57 +00:00
|
|
|
rtcpsummary \
|
2017-11-26 22:01:25 +00:00
|
|
|
sndfile \
|
|
|
|
srtp \
|
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:= \
|
2018-04-09 21:30:49 +00:00
|
|
|
$(patsubst %,CONFIG_PACKAGE_baresip-mod-%,$(subst _,-,$(baresip-mods)))
|
2013-04-04 16:08:57 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2017-12-13 18:37:11 +00:00
|
|
|
define Package/$(PKG_NAME)/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
|
|
|
endef
|
|
|
|
|
2013-04-04 16:08:57 +00:00
|
|
|
define Package/baresip/Default
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
SUBMENU:=Telephony
|
2017-11-26 21:45:24 +00:00
|
|
|
URL:=http://www.creytiv.com
|
2013-04-04 16:08:57 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/baresip
|
|
|
|
$(call Package/baresip/Default)
|
|
|
|
TITLE:=Portable and modular SIP User-Agent with A/V support
|
2017-11-26 21:45:24 +00:00
|
|
|
DEPENDS:=+libre +librem
|
2017-12-26 14:21:25 +00:00
|
|
|
USERID:=$(PKG_NAME)=374:$(PKG_NAME)=374
|
2014-10-28 20:43:11 +00:00
|
|
|
MENU:=1
|
2013-04-04 16:08:57 +00:00
|
|
|
endef
|
|
|
|
|
2018-12-26 18:17:57 +00:00
|
|
|
baresip-mod-alsa := USE_ALSA
|
|
|
|
baresip-mod-avcodec := USE_AVCODEC
|
|
|
|
baresip-mod-avformat := USE_AVFORMAT
|
|
|
|
baresip-mod-cons := USE_CONS
|
|
|
|
baresip-mod-echo := USE_ECHO
|
|
|
|
baresip-mod-evdev := USE_EVDEV
|
|
|
|
baresip-mod-g711 := USE_G711
|
|
|
|
baresip-mod-g722 := USE_G722
|
|
|
|
baresip-mod-g726 := USE_G726
|
|
|
|
baresip-mod-opus := USE_OPUS
|
|
|
|
baresip-mod-oss := USE_OSS
|
|
|
|
baresip-mod-plc := USE_PLC
|
|
|
|
baresip-mod-portaudio := USE_PORTAUDIO
|
|
|
|
baresip-mod-pulse := USE_PULSE
|
|
|
|
baresip-mod-rtcpsummary := USE_RTCPSUMMARY
|
|
|
|
baresip-mod-sndfile := USE_SNDFILE
|
|
|
|
baresip-mod-srtp := USE_SRTP
|
|
|
|
baresip-mod-stdio := USE_STDIO
|
|
|
|
baresip-mod-v4l := USE_V4L
|
|
|
|
baresip-mod-v4l2 := USE_V4L2
|
2013-04-04 16:08:57 +00:00
|
|
|
|
|
|
|
BARESIP_MOD_OPTIONS:= \
|
|
|
|
MOD_AUTODETECT= \
|
2015-08-12 11:56:44 +00:00
|
|
|
EXTRA_MODULES="dtmfio" \
|
2018-04-09 21:30:49 +00:00
|
|
|
$(foreach m,$(baresip-mods),$(baresip-mod-$(m))=$(if $(CONFIG_PACKAGE_baresip-mod-$(subst _,-,$(m))),1))
|
2013-04-04 16:08:57 +00:00
|
|
|
|
2018-11-11 10:15:36 +00:00
|
|
|
# According to upstream baresip can use x264 directly or through ffmpeg. ffmpeg
|
|
|
|
# is preferred. The possibility to use it directly might even go away in the
|
|
|
|
# future. So prevent baresip from linking directly to x264.
|
2017-11-26 21:42:05 +00:00
|
|
|
MAKE_FLAGS+= \
|
2017-12-26 13:34:45 +00:00
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
2017-11-26 21:42:05 +00:00
|
|
|
EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \
|
2017-12-07 20:32:45 +00:00
|
|
|
LD="$(TARGET_CC)" \
|
2017-11-26 21:42:05 +00:00
|
|
|
LIBRE_MK="$(STAGING_DIR)/usr/share/re/re.mk" \
|
|
|
|
LIBRE_INC="$(STAGING_DIR)/usr/include/re" \
|
|
|
|
LIBRE_SO="$(STAGING_DIR)/usr/lib" \
|
|
|
|
LIBREM_PATH="$(STAGING_DIR)/usr" \
|
2017-12-26 13:34:45 +00:00
|
|
|
OS=linux \
|
|
|
|
RELEASE=1 \
|
2017-11-26 21:42:05 +00:00
|
|
|
SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
|
|
|
|
SYSROOT_ALT="$(STAGING_DIR)/usr" \
|
2018-11-11 10:15:36 +00:00
|
|
|
$(BARESIP_MOD_OPTIONS) \
|
|
|
|
USE_X264=
|
2013-04-04 16:08:57 +00:00
|
|
|
|
2017-11-26 21:45:24 +00:00
|
|
|
TARGET_CFLAGS+=-D_GNU_SOURCE
|
|
|
|
|
2013-04-04 16:08:57 +00:00
|
|
|
define Package/baresip/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2017-11-26 21:45:24 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin
|
2013-04-04 16:08:57 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/baresip/modules
|
2019-04-21 13:21:36 +00:00
|
|
|
$(INSTALL_DATA) \
|
2014-03-26 12:04:16 +00:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/baresip/modules/{account,auloop,contact,ice,menu,stun,turn}.so \
|
2017-11-26 21:45:24 +00:00
|
|
|
$(1)/usr/lib/baresip/modules
|
2013-04-04 16:08:57 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/share/baresip
|
2019-04-21 13:21:36 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip
|
2017-12-26 14:21:25 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/baresip
|
|
|
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/docs/examples/{accounts,config,contacts} $(1)/etc/baresip
|
|
|
|
$(INSTALL_DIR) $(1)/etc/default
|
|
|
|
$(INSTALL_CONF) ./files/baresip.default $(1)/etc/default/baresip
|
2013-04-04 16:08:57 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip
|
|
|
|
endef
|
|
|
|
|
2017-12-26 14:21:25 +00:00
|
|
|
define Package/baresip/conffiles
|
|
|
|
/etc/baresip/accounts
|
|
|
|
/etc/baresip/config
|
|
|
|
/etc/baresip/contacts
|
|
|
|
/etc/default/baresip
|
|
|
|
/etc/init.d/baresip
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/baresip/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
|
|
chown $(PKG_NAME):$(PKG_NAME) \
|
|
|
|
/etc/baresip/accounts \
|
|
|
|
/etc/baresip/config \
|
|
|
|
/etc/baresip/contacts
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
endef
|
|
|
|
|
2014-12-28 16:03:36 +00:00
|
|
|
##################
|
2017-11-26 21:56:38 +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
|
|
|
|
|
2018-04-09 21:30:49 +00:00
|
|
|
define Package/baresip-mod-$(subst _,-,$(1))
|
2013-04-04 16:08:57 +00:00
|
|
|
$$(call Package/baresip/Default)
|
2017-11-26 21:56:38 +00:00
|
|
|
TITLE:=$(2)
|
2018-04-09 21:30:49 +00:00
|
|
|
DEPENDS:=baresip $(patsubst +%,+PACKAGE_$(PKG_NAME)-mod-$(subst _,-,$(1)):%,$(4))
|
2013-04-04 16:08:57 +00:00
|
|
|
endef
|
|
|
|
|
2018-04-09 21:30:49 +00:00
|
|
|
define Package/baresip-mod-$(subst _,-,$(1))/install
|
2013-04-04 16:08:57 +00:00
|
|
|
[ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/baresip/modules
|
|
|
|
for f in $(3); do \
|
2017-11-26 21:45:24 +00:00
|
|
|
$(INSTALL_DATA) \
|
2013-04-04 16:08:57 +00:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/baresip/modules/$$$$$$$${f}.so \
|
2017-11-26 21:45:24 +00:00
|
|
|
$$(1)/usr/lib/baresip/modules; \
|
2013-04-04 16:08:57 +00:00
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
2018-04-09 21:30:49 +00:00
|
|
|
$$(eval $$(call BuildPackage,baresip-mod-$(subst _,-,$(1))))
|
2013-04-04 16:08:57 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,baresip))
|
|
|
|
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,alsa,ALSA audio driver,alsa,+alsa-lib))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,aubridge,Audio bridge module,aubridge,))
|
|
|
|
$(eval $(call BuildPlugin,aufile,Audio module for using a WAV-file as audio input,aufile,))
|
2018-11-11 10:15:36 +00:00
|
|
|
$(eval $(call BuildPlugin,avcodec,Video codec using FFmpeg,avcodec,@BARESIP_WITH_FFMPEG +libffmpeg-full))
|
2018-03-24 08:41:40 +00:00
|
|
|
$(eval $(call BuildPlugin,avformat,Video source using FFmpeg,avformat,baresip-mod-avcodec))
|
2018-12-26 18:17:57 +00:00
|
|
|
$(eval $(call BuildPlugin,b2bua,Back-to-Back User-Agent module,b2bua,))
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,cons,UDP/TCP console UI driver,cons,))
|
2018-02-16 20:58:14 +00:00
|
|
|
$(eval $(call BuildPlugin,ctrl_tcp,TCP control interface,ctrl_tcp,))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,debug_cmd,Debug commands,debug_cmd,))
|
|
|
|
$(eval $(call BuildPlugin,dtls_srtp,DTLS-SRTP end-to-end encryption,dtls_srtp,))
|
2016-04-05 08:06:43 +00:00
|
|
|
$(eval $(call BuildPlugin,dtmfio,DTMF input/output,dtmfio,))
|
2018-12-26 18:17:57 +00:00
|
|
|
$(eval $(call BuildPlugin,echo,Echo server module,echo,))
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,evdev,Linux input driver,evdev,))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,fakevideo,Fake video input/output driver,fakevideo,))
|
2013-04-04 16:08:57 +00:00
|
|
|
$(eval $(call BuildPlugin,g711,G.711 audio codec,g711,))
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,g722,G.722 audio codec,g722,+libspandsp))
|
|
|
|
$(eval $(call BuildPlugin,g726,G.726 audio codec,g726,+libspandsp))
|
|
|
|
$(eval $(call BuildPlugin,httpd,HTTP webserver UI-module,httpd,))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,mwi,Message Waiting Indication,mwi,))
|
|
|
|
$(eval $(call BuildPlugin,natbd,NAT Behavior Discovery Module,natbd,))
|
|
|
|
$(eval $(call BuildPlugin,natpmp,NAT Port Mapping Protocol module,natpmp,))
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,opus,OPUS Interactive audio codec,opus,+libopus))
|
2013-04-04 16:08:57 +00:00
|
|
|
$(eval $(call BuildPlugin,oss,OSS audio driver,oss,))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,plc,Packet Loss Concealment,plc,+libspandsp))
|
|
|
|
$(eval $(call BuildPlugin,portaudio,Portaudio audio driver,portaudio,+portaudio))
|
|
|
|
$(eval $(call BuildPlugin,presence,Presence module,presence,))
|
2018-03-18 09:19:27 +00:00
|
|
|
$(eval $(call BuildPlugin,pulse,Pulseaudio audio driver,pulse,+pulseaudio))
|
2018-12-26 18:17:57 +00:00
|
|
|
$(eval $(call BuildPlugin,rtcpsummary,RTCP summary module,rtcpsummary,))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,selfview,Video selfview module,selfview,))
|
|
|
|
$(eval $(call BuildPlugin,sndfile,Audio dumper using libsndfile,sndfile,+libsndfile))
|
|
|
|
$(eval $(call BuildPlugin,srtp,Secure RTP module using libre,srtp,))
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,stdio,Standard input/output UI driver,stdio,))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,uuid,UUID generator and loader,uuid,))
|
2017-11-26 21:56:38 +00:00
|
|
|
$(eval $(call BuildPlugin,v4l,Video4Linux video source,v4l,+libv4l))
|
|
|
|
$(eval $(call BuildPlugin,v4l2,Video4Linux2 video source,v4l2,+libv4l))
|
2017-11-26 22:01:25 +00:00
|
|
|
$(eval $(call BuildPlugin,v4l2_codec,Video4Linux2 video codec module,v4l2_codec,))
|
|
|
|
$(eval $(call BuildPlugin,vidbridge,Video bridge module,vidbridge,))
|
|
|
|
$(eval $(call BuildPlugin,vidloop,Video-loop test module,vidloop,))
|
|
|
|
$(eval $(call BuildPlugin,vumeter,Display audio levels in console,vumeter,))
|