Receipt for: linphone
source
PACKAGE="linphone"
VERSION="3.5.2"
CATEGORY="network"
TAGS="softphone telephony"
SHORT_DESC="SIP soft phone."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://www.linphone.org/"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="http://download-mirror.savannah.gnu.org/releases/linphone/${VERSION%.*}.x/sources/$TARBALL"
DEPENDS="exosip glib gtk+ ffmpeg libglade libv4l osip speex xorg-libXv"
BUILD_DEPENDS="cmake exosip-dev ffmpeg-dev glib-dev gtk+-dev intltool
libglade-dev libsdl-dev libv4l-dev osip-dev speex-dev xorg-libXv-dev"
current_version()
{
local base=http://download-mirror.savannah.gnu.org/releases/linphone
wget -O - $base/$(wget -O - $base 2>/dev/null | \
sed '/href="[0-9]/!d;s|.*href="\(.*\)/".*|\1|' | sort -Vr | sed q)/sources/ 2>/dev/null | \
sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}
compile_rules()
{
export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries"
sed -i -e 's/CodecID/AV&/' -e 's/avcodec_init();//' \
-e 's/avcodec_open(\([^)]*\)/avcodec_open2(\1, NULL/' \
-e 's/avcodec_get_context_defaults(\([^)]*\)/avcodec_get_context_defaults3(\1, NULL/' \
-e 's/avcodec_alloc_context(\([^)]*\)/avcodec_alloc_context3(\1 NULL/' \
mediastreamer2/src/*.c
sed -i 's/g_thread_init(NULL);//' gtk/*.c
# Define deprecated ffmepg flags ...
export CFLAGS="-Wno-deprecated-declarations -DCODEC_FLAG_PART=0x0080 -DCODEC_FLAG_H263P_UMV=0x0200000 -DCODEC_FLAG_H263P_SLICE_STRUCT=0x01000000 -DFF_I_TYPE=1"
export LIBS="-lavutil -lz"
./configure \
--prefix=/usr \
--libexecdir=/usr/bin \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
$CONFIGURE_ARGS
make &&
make DESTDIR=$DESTDIR install 2>&1 | sed \
-e "s/css': No such file/css': no such file/" \
-e "s/html': No such file/html': no such file/"
}
genpkg_rules()
{
mkdir -p $fs/usr/lib
mkdir -p $fs/usr/share
cp -a $install/usr/share/applications $fs/usr/share
cp -a $install/usr/share/pixmaps $fs/usr/share
cp -a $install/usr/share/sounds $fs/usr/share
cp -a $install/usr/share/locale $fs/usr/share
cp -a $install/usr/share/images $fs/usr/share
cp -a $install/usr/share/linphone $fs/usr/share
cp -a $install/usr/bin $fs/usr
cp -a $install/usr/lib/*.so* $fs/usr/lib
}