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
:=bf25d14749ca286716c9b23108472c8a
35 PKG_CONFIG_DEPENDS
:= \
36 $(patsubst %,CONFIG_PACKAGE_baresip-mod-
%,$(baresip-mods
)) \
38 include $(INCLUDE_DIR
)/package.mk
40 define Package
/baresip
/Default
44 URL
:=http
://www.creytiv.com
/
47 define Package
/baresip
48 $(call Package
/baresip
/Default
)
49 TITLE
:=Portable and modular SIP User-Agent with A
/V support
50 DEPENDS
:=+libre
+librem
+libpthread
54 baresip-mod-alsa
:= USE_ALSA
55 baresip-mod-avcodec
:= USE_FFMPEG
56 baresip-mod-avformat
:= USE_FFMPEG_AVFORMAT
57 baresip-mod-cons
:= USE_CONS
58 baresip-mod-evdev
:= USE_EVDEV
59 baresip-mod-g711
:= USE_G711
60 baresip-mod-g722
:= USE_G722
61 baresip-mod-oss
:= USE_OSS
62 baresip-mod-sdl
:= USE_SDL
63 baresip-mod-speex
:= USE_SPEEX
64 baresip-mod-stdio
:= USE_STDIO
65 baresip-mod-uuid
:= USE_UUID
66 baresip-mod-v4l
:= USE_V4L
67 baresip-mod-v4l2
:= USE_V4L2
69 BARESIP_MOD_OPTIONS
:= \
71 $(foreach m
,$(baresip-mods
),$(baresip-mod-
$(m
))=$(if
$(CONFIG_PACKAGE_baresip-mod-
$(m
)),1))
73 TARGET_CFLAGS
+= $(FPIC
)
76 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
77 LIBRE_MK
="$(STAGING_DIR)/usr/share/re/re.mk" \
78 LIBRE_INC
="$(STAGING_DIR)/usr/include/re" \
79 LIBRE_SO
="$(STAGING_DIR)/usr/lib" \
80 LIBREM_PATH
="../rem" \
82 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 EXTRA_CFLAGS
="$(TARGET_CFLAGS) -DOPENWRT" \
84 SYSROOT
="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
85 SYSROOT_ALT
="$(STAGING_DIR)/usr" \
87 CROSS_COMPILE
="$(TARGET_CROSS)" \
89 $(BARESIP_MOD_OPTIONS
) \
93 define Package
/baresip
/install
94 $(INSTALL_DIR
) $(1)/usr
/bin
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/baresip
$(1)/usr
/bin
/
96 $(INSTALL_DIR
) $(1)/usr
/lib
/baresip
/modules
98 $(PKG_INSTALL_DIR
)/usr
/lib
/baresip
/modules
/{account
,auloop
,contact
,ice
,menu
,stun
,turn
}.so \
99 $(1)/usr
/lib
/baresip
/modules
/.
100 $(INSTALL_DIR
) $(1)/usr
/share
/baresip
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/baresip
/* $(1)/usr
/share
/baresip
/.
102 $(INSTALL_DIR
) $(1)/etc
/init.d
103 $(INSTALL_BIN
) .
/files
/baresip.init
$(1)/etc
/init.d
/baresip
115 define Package
/baresip-mod-
$(1)
116 $$(call Package
/baresip
/Default
)
117 TITLE
:= baresip
$(2) module
118 DEPENDS
:= baresip
$(4)
121 define Package
/baresip-mod-
$(1)/install
122 [ -z
"$(3)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/baresip
/modules
125 $(PKG_INSTALL_DIR
)/usr
/lib
/baresip
/modules
/$$$$$$$${f}.so \
126 $$(1)/usr
/lib
/baresip
/modules
/ ; \
130 $$(eval
$$(call BuildPackage
,baresip-mod-
$(1)))
134 $(eval
$(call BuildPackage
,baresip
))
136 $(eval
$(call BuildPlugin
,alsa
,ALSA audio driver
,alsa
,+PACKAGE_baresip-mod-alsa
:alsa-lib
))
137 $(eval
$(call BuildPlugin
,avcodec
,FFmpeg video codecs
,avcodec
,+PACKAGE_baresip-mod-avcodec
:libffmpeg-full
))
138 $(eval
$(call BuildPlugin
,avformat
,FFmpeg video source
,avformat
,+PACKAGE_baresip-mod-avformat
:libffmpeg-full
))
139 $(eval
$(call BuildPlugin
,cons
,console UI
,cons
,))
140 $(eval
$(call BuildPlugin
,evdev
,input event device UI
,evdev
,))
141 $(eval
$(call BuildPlugin
,g711
,G
.711 audio codec
,g711
,))
142 $(eval
$(call BuildPlugin
,g722
,G
.722 audio codec
,g722
,+PACKAGE_baresip-mod-g722
:libspandsp
))
143 $(eval
$(call BuildPlugin
,sdl
,SDL video display
,sdl
,+libsdl @BROKEN
))
144 $(eval
$(call BuildPlugin
,oss
,OSS audio driver
,oss
,))
145 $(eval
$(call BuildPlugin
,speex
,Speex audio codec
,speex
,+PACKAGE_baresip-mod-speex
:libspeex
))
146 $(eval
$(call BuildPlugin
,stdio
,standard I
/O UI
,stdio
,))
147 $(eval
$(call BuildPlugin
,uuid
,UUID
,uuid
,+libuuid
))
148 $(eval
$(call BuildPlugin
,v4l
,Video4Linux video source
,v4l
,+PACKAGE_baresip-mod-v4l
:libv4l
))
149 $(eval
$(call BuildPlugin
,v4l2
,Video4Linux2 video source
,v4l2
,+PACKAGE_baresip-mod-v4l2
:libv4l
))