Merge pull request #420 from micmac1/baresip-062
baresip: update and a bit of polishing
This commit is contained in:
commit
1f86f7e1e1
5 changed files with 9 additions and 131 deletions
|
@ -3,7 +3,7 @@ menu "bareSIP configuration"
|
|||
|
||||
config BARESIP_WITH_FFMPEG
|
||||
bool "Compile with FFmpeg support"
|
||||
default y if (i386||x86_64)
|
||||
default y if (x86_64)
|
||||
help
|
||||
The sole purpose of this symbol is to prevent that the bareSIP
|
||||
video modules, the ones which depend on FFmpeg, are built by
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=baresip
|
||||
PKG_VERSION:=0.6.0
|
||||
PKG_VERSION:=0.6.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
||||
PKG_HASH:=ab3dd329599e4df83eeeb5451b42811598e0171a45a90b34006c5628b61d0764
|
||||
PKG_HASH:=e1fae11ea9e6dc861bb2c43d6bef641778945aad86581d58bc4b0ea64b8d28e2
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=docs/COPYING
|
||||
|
@ -27,7 +27,6 @@ baresip-mods:= \
|
|||
avcodec \
|
||||
avformat \
|
||||
cons \
|
||||
echo \
|
||||
evdev \
|
||||
g711 \
|
||||
g722 \
|
||||
|
@ -41,7 +40,6 @@ baresip-mods:= \
|
|||
sndfile \
|
||||
srtp \
|
||||
stdio \
|
||||
v4l \
|
||||
v4l2
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@ -72,7 +70,6 @@ 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
|
||||
|
@ -86,7 +83,6 @@ 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
|
||||
|
||||
BARESIP_MOD_OPTIONS:= \
|
||||
|
@ -94,9 +90,6 @@ BARESIP_MOD_OPTIONS:= \
|
|||
EXTRA_MODULES="dtmfio" \
|
||||
$(foreach m,$(baresip-mods),$(baresip-mod-$(m))=$(if $(CONFIG_PACKAGE_baresip-mod-$(subst _,-,$(m))),1))
|
||||
|
||||
# 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.
|
||||
MAKE_FLAGS+= \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \
|
||||
|
@ -109,8 +102,7 @@ MAKE_FLAGS+= \
|
|||
RELEASE=1 \
|
||||
SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
|
||||
SYSROOT_ALT="$(STAGING_DIR)/usr" \
|
||||
$(BARESIP_MOD_OPTIONS) \
|
||||
USE_X264=
|
||||
$(BARESIP_MOD_OPTIONS)
|
||||
|
||||
TARGET_CFLAGS+=-D_GNU_SOURCE
|
||||
|
||||
|
@ -118,12 +110,14 @@ define Package/baresip/install
|
|||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/usr/lib/baresip/modules
|
||||
$(INSTALL_BIN) \
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/baresip/modules/{account,auloop,contact,ice,menu,stun,turn}.so \
|
||||
$(1)/usr/lib/baresip/modules
|
||||
$(INSTALL_DIR) $(1)/usr/share/baresip
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip
|
||||
$(INSTALL_DIR) $(1)/etc/baresip
|
||||
$(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/docs/examples/accounts
|
||||
$(SED) '/^#module_path/s|^#||;s|/local||' $(PKG_BUILD_DIR)/docs/examples/config
|
||||
$(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
|
||||
|
@ -146,11 +140,6 @@ if [ -z "$${IPKG_INSTROOT}" ]; then
|
|||
/etc/baresip/accounts \
|
||||
/etc/baresip/config \
|
||||
/etc/baresip/contacts
|
||||
|
||||
# Prevent $(PKG_NAME) from auto-starting after an upgrade. The modules may
|
||||
# not be upgraded yet and the user configuration may need a revision.
|
||||
sed -i '/^ENABLE_BARESIP="yes"/s/^/#/' \
|
||||
/etc/default/$(PKG_NAME)
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
@ -204,7 +193,6 @@ $(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,))
|
||||
$(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,))
|
||||
$(eval $(call BuildPlugin,opus,OPUS Interactive audio codec,opus,+libopus))
|
||||
$(eval $(call BuildPlugin,oss,OSS audio driver,oss,))
|
||||
|
@ -218,7 +206,6 @@ $(eval $(call BuildPlugin,sndfile,Audio dumper using libsndfile,sndfile,+libsndf
|
|||
$(eval $(call BuildPlugin,srtp,Secure RTP module using libre,srtp,))
|
||||
$(eval $(call BuildPlugin,stdio,Standard input/output UI driver,stdio,))
|
||||
$(eval $(call BuildPlugin,uuid,UUID generator and loader,uuid,))
|
||||
$(eval $(call BuildPlugin,v4l,Video4Linux video source,v4l,+libv4l))
|
||||
$(eval $(call BuildPlugin,v4l2,Video4Linux2 video source,v4l2,+libv4l))
|
||||
$(eval $(call BuildPlugin,v4l2_codec,Video4Linux2 video codec module,v4l2_codec,))
|
||||
$(eval $(call BuildPlugin,vidbridge,Video bridge module,vidbridge,))
|
||||
|
|
|
@ -12,7 +12,6 @@ DEFAULT=/etc/default/$DAEMON
|
|||
LOGGER="/usr/bin/logger -p user.err -s -t $DAEMON"
|
||||
OPTIONS=
|
||||
PROG=/usr/bin/$DAEMON
|
||||
TIMEOUT=30
|
||||
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
|
||||
|
@ -38,54 +37,3 @@ start_service() {
|
|||
procd_set_param user $DAEMON
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
local retval=
|
||||
local mypid=
|
||||
local timeout=$TIMEOUT
|
||||
|
||||
pgrep $DAEMON &> /dev/null
|
||||
[ $? -ne 0 ] && exit 0
|
||||
|
||||
[ -f /var/run/${DAEMON}.pid ]
|
||||
retval=$?
|
||||
|
||||
# init script could find itself in a scenario where baresip was started
|
||||
# very recently, so make it wait a while for a pid file to appear
|
||||
while [ $retval -ne 0 -a $timeout -gt 0 ]; do
|
||||
sleep 1
|
||||
[ -f /var/run/${DAEMON}.pid ]
|
||||
retval=$?
|
||||
timeout=$(($timeout-1))
|
||||
done
|
||||
|
||||
[ $retval -eq 0 ] || {
|
||||
$LOGGER PID file does not exist
|
||||
exit 1
|
||||
}
|
||||
|
||||
mypid=$(cat /var/run/${DAEMON}.pid)
|
||||
|
||||
[ "$mypid" -gt 1 ] 2> /dev/null || {
|
||||
$LOGGER PID file contains garbage
|
||||
exit 1
|
||||
}
|
||||
|
||||
timeout=$TIMEOUT
|
||||
kill $mypid 2>/dev/null
|
||||
pgrep $DAEMON | grep -w $mypid &>/dev/null
|
||||
retval=$?
|
||||
|
||||
while [ $retval -eq 0 -a $timeout -gt 0 ]; do
|
||||
sleep 10
|
||||
pgrep $DAEMON | grep -w $mypid &>/dev/null
|
||||
retval=$?
|
||||
[ $retval -eq 0 ] && kill $mypid 2>/dev/null
|
||||
timeout=$(($timeout-10))
|
||||
done
|
||||
|
||||
[ $retval -ne 1 ] && {
|
||||
$LOGGER Failed to stop $DAEMON
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=restund
|
||||
PKG_VERSION:=0.4.12
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
||||
|
@ -95,11 +95,6 @@ define Package/restund/postinst
|
|||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
chown $(PKG_NAME):$(PKG_NAME) /etc/restund.conf
|
||||
|
||||
# Prevent $(PKG_NAME) from auto-starting after an upgrade. The modules may
|
||||
# not be upgraded yet and the user configuration may need a revision.
|
||||
sed -i '/^ENABLE_RESTUND="yes"/s/^/#/' \
|
||||
/etc/default/$(PKG_NAME)
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
|
|
@ -12,7 +12,6 @@ DEFAULT=/etc/default/$DAEMON
|
|||
LOGGER="/usr/bin/logger -p user.err -s -t $DAEMON"
|
||||
OPTIONS=
|
||||
PROG=/usr/sbin/$DAEMON
|
||||
TIMEOUT=30
|
||||
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
|
||||
|
@ -38,54 +37,3 @@ start_service() {
|
|||
procd_set_param user $DAEMON
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
local retval=
|
||||
local mypid=
|
||||
local timeout=$TIMEOUT
|
||||
|
||||
pgrep $DAEMON &> /dev/null
|
||||
[ $? -ne 0 ] && exit 0
|
||||
|
||||
[ -f /var/run/${DAEMON}.pid ]
|
||||
retval=$?
|
||||
|
||||
# init script could find itself in a scenario where restund was started
|
||||
# very recently, so make it wait a while for a pid file to appear
|
||||
while [ $retval -ne 0 -a $timeout -gt 0 ]; do
|
||||
sleep 1
|
||||
[ -f /var/run/${DAEMON}.pid ]
|
||||
retval=$?
|
||||
timeout=$(($timeout-1))
|
||||
done
|
||||
|
||||
[ $retval -eq 0 ] || {
|
||||
$LOGGER PID file does not exist
|
||||
exit 1
|
||||
}
|
||||
|
||||
mypid=$(cat /var/run/${DAEMON}.pid)
|
||||
|
||||
[ "$mypid" -gt 1 ] 2> /dev/null || {
|
||||
$LOGGER PID file contains garbage
|
||||
exit 1
|
||||
}
|
||||
|
||||
timeout=$TIMEOUT
|
||||
kill $mypid 2>/dev/null
|
||||
pgrep $DAEMON | grep -w $mypid &>/dev/null
|
||||
retval=$?
|
||||
|
||||
while [ $retval -eq 0 -a $timeout -gt 0 ]; do
|
||||
sleep 10
|
||||
pgrep $DAEMON | grep -w $mypid &>/dev/null
|
||||
retval=$?
|
||||
[ $retval -eq 0 ] && kill $mypid 2>/dev/null
|
||||
timeout=$(($timeout-10))
|
||||
done
|
||||
|
||||
[ $retval -ne 1 ] && {
|
||||
$LOGGER Failed to stop $DAEMON
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue