2 # Copyright (C) 2010-2014 OpenWrt.org
3 # Copyright (C) 2010 Alfred E. Heggestad
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.creytiv.com
/pub
/
17 PKG_MD5SUM
:=93c0ea33ec0e96b89b1c3e0f78b72c5b
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=docs
/COPYING
21 PKG_MAINTAINER
:=Jiri Slachta
<slachta@cesnet.cz
>
38 PKG_CONFIG_DEPENDS
:= \
39 $(patsubst %,CONFIG_PACKAGE_baresip-mod-
%,$(baresip-mods
)) \
41 include $(INCLUDE_DIR
)/package.mk
43 define Package
/baresip
/Default
47 URL
:=http
://www.creytiv.com
/
50 define Package
/baresip
51 $(call Package
/baresip
/Default
)
52 TITLE
:=Portable and modular SIP User-Agent with A
/V support
53 DEPENDS
:=+libre
+librem
+libpthread
57 baresip-mod-alsa
:= USE_ALSA
58 baresip-mod-avcodec
:= USE_AVCODEC
59 baresip-mod-avformat
:= USE_AVFORMAT
60 baresip-mod-cons
:= USE_CONS
61 baresip-mod-evdev
:= USE_EVDEV
62 baresip-mod-g711
:= USE_G711
63 baresip-mod-g722
:= USE_G722
64 baresip-mod-oss
:= USE_OSS
65 baresip-mod-speex
:= USE_SPEEX
66 baresip-mod-stdio
:= USE_STDIO
67 baresip-mod-uuid
:= USE_UUID
68 baresip-mod-v4l
:= USE_V4L
69 baresip-mod-v4l2
:= USE_V4L2
71 BARESIP_MOD_OPTIONS
:= \
73 $(foreach m
,$(baresip-mods
),$(baresip-mod-
$(m
))=$(if
$(CONFIG_PACKAGE_baresip-mod-
$(m
)),1))
75 TARGET_CFLAGS
+= $(FPIC
)
78 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
79 LIBRE_MK
="$(STAGING_DIR)/usr/share/re/re.mk" \
80 LIBRE_INC
="$(STAGING_DIR)/usr/include/re" \
81 LIBRE_SO
="$(STAGING_DIR)/usr/lib" \
82 LIBREM_PATH
="../rem" \
84 DESTDIR
="$(PKG_INSTALL_DIR)" \
85 EXTRA_CFLAGS
="$(TARGET_CFLAGS) -DOPENWRT" \
86 SYSROOT
="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
87 SYSROOT_ALT
="$(STAGING_DIR)/usr" \
89 CROSS_COMPILE
="$(TARGET_CROSS)" \
91 $(BARESIP_MOD_OPTIONS
) \
95 define Package
/baresip
/install
96 $(INSTALL_DIR
) $(1)/usr
/bin
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/baresip
$(1)/usr
/bin
/
98 $(INSTALL_DIR
) $(1)/usr
/lib
/baresip
/modules
100 $(PKG_INSTALL_DIR
)/usr
/lib
/baresip
/modules
/{account
,auloop
,contact
,ice
,menu
,stun
,turn
}.so \
101 $(1)/usr
/lib
/baresip
/modules
/.
102 $(INSTALL_DIR
) $(1)/usr
/share
/baresip
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/baresip
/* $(1)/usr
/share
/baresip
/.
104 $(INSTALL_DIR
) $(1)/etc
/init.d
105 $(INSTALL_BIN
) .
/files
/baresip.init
$(1)/etc
/init.d
/baresip
118 define Package
/baresip-mod-
$(1)
119 $$(call Package
/baresip
/Default
)
120 TITLE
:= baresip
$(2) module
121 DEPENDS
:= baresip
$(4)
124 define Package
/baresip-mod-
$(1)/install
125 [ -z
"$(3)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/baresip
/modules
128 $(PKG_INSTALL_DIR
)/usr
/lib
/baresip
/modules
/$$$$$$$${f}.so \
129 $$(1)/usr
/lib
/baresip
/modules
/ ; \
133 $$(eval
$$(call BuildPackage
,baresip-mod-
$(1)))
136 $(eval
$(call BuildPackage
,baresip
))
138 $(eval
$(call BuildPlugin
,alsa
,ALSA audio driver
,alsa
,+PACKAGE_baresip-mod-alsa
:alsa-lib
))
139 $(eval
$(call BuildPlugin
,avcodec
,FFmpeg video codecs
,avcodec
,+PACKAGE_baresip-mod-avcodec
:libffmpeg-full
))
140 $(eval
$(call BuildPlugin
,avformat
,FFmpeg video source
,avformat
,+PACKAGE_baresip-mod-avformat
:libffmpeg-full
))
141 $(eval
$(call BuildPlugin
,cons
,console UI
,cons
,))
142 $(eval
$(call BuildPlugin
,evdev
,input event device UI
,evdev
,))
143 $(eval
$(call BuildPlugin
,g711
,G
.711 audio codec
,g711
,))
144 $(eval
$(call BuildPlugin
,g722
,G
.722 audio codec
,g722
,+PACKAGE_baresip-mod-g722
:libspandsp
))
145 $(eval
$(call BuildPlugin
,oss
,OSS audio driver
,oss
,))
146 $(eval
$(call BuildPlugin
,speex
,Speex audio codec
,speex
,+PACKAGE_baresip-mod-speex
:libspeex
))
147 $(eval
$(call BuildPlugin
,stdio
,standard I
/O UI
,stdio
,))
148 $(eval
$(call BuildPlugin
,uuid
,UUID
,uuid
,+libuuid
))
149 $(eval
$(call BuildPlugin
,v4l
,Video4Linux video source
,v4l
,+PACKAGE_baresip-mod-v4l
:libv4l
))
150 $(eval
$(call BuildPlugin
,v4l2
,Video4Linux2 video source
,v4l2
,+PACKAGE_baresip-mod-v4l2
:libv4l
))