|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2010,2011,2012,2013 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2010,2011,2012,2013,2014 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -25,18 +25,18 @@
|
|
|
|
|
# Latest linphone sourcecode is available at: |
|
|
|
|
# <http://www.linphone.org/>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/libeXosip2, l/speex |
|
|
|
|
# Depends: l/belle-sip, l/zrtpcpp |
|
|
|
|
# Recommends: xap/ffmpeg |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-linphone} |
|
|
|
|
VERSION=${VERSION:-3.6.1} |
|
|
|
|
VERSION=${VERSION:-3.7.0} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-http://download.savannah.gnu.org/releases/linphone/3.6.x/sources/$ARCHIVE} |
|
|
|
|
WGET=${WGET:-http://download.savannah.gnu.org/releases/linphone/3.7.x/sources/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-linphone} |
|
|
|
|
BUILD=${BUILD:-3GGD} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} |
|
|
|
|
JOBS=${JOBS:-1} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
@ -82,7 +82,28 @@ fi
|
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
|
# Get forked srtp library |
|
|
|
|
if [ ! -r srtp.tar.gz ]; then |
|
|
|
|
git clone git://git.linphone.org/srtp.git |
|
|
|
|
cd srtp |
|
|
|
|
git archive --format=tar --prefix=srtp/ da2ece56f18d35a12f0fee5dcb99e03ff15864de | gzip > ../srtp.tar.gz |
|
|
|
|
cd .. |
|
|
|
|
rm -rf srtp |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Compile forked srtp library |
|
|
|
|
cd $TMP |
|
|
|
|
echo "Building srtp..." |
|
|
|
|
tar xf $CWD/srtp.tar.gz |
|
|
|
|
cd srtp |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
./configure --prefix=$TMP/srtp-tree --enable-syslog |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install |
|
|
|
|
rm $TMP/srtp-tree/lib/libsrtp.so* |
|
|
|
|
|
|
|
|
|
# Compile Linphone |
|
|
|
|
cd $TMP |
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
@ -95,11 +116,13 @@ CXXFLAGS=$CPUOPT \
|
|
|
|
|
--mandir=/usr/man \ |
|
|
|
|
--docdir=/usr/doc/$NAME \ |
|
|
|
|
--disable-static \ |
|
|
|
|
--enable-ldap \ |
|
|
|
|
--enable-ipv6 \ |
|
|
|
|
--enable-truespeech \ |
|
|
|
|
--enable-ssl \ |
|
|
|
|
--enable-zrtp \ |
|
|
|
|
--enable-alsa \ |
|
|
|
|
--enable-video |
|
|
|
|
--enable-video \ |
|
|
|
|
--with-srtp=$TMP/srtp-tree |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
|
|
|
|
@ -111,12 +134,10 @@ mv $PKG/usr/share/doc $PKG/usr/doc
|
|
|
|
|
mv $PKG/usr/doc/mediastreamer-*/html $PKG/usr/doc/$NAME/mediastreamer |
|
|
|
|
mv $PKG/usr/doc/ortp-*/html $PKG/usr/doc/$NAME/ortp |
|
|
|
|
rmdir $PKG/usr/doc/mediastreamer-* $PKG/usr/doc/ortp-* |
|
|
|
|
rm -rf $PKG/usr/share/gnome/help |
|
|
|
|
install -m 644 AUTHORS BUGS COPYING ChangeLog NEWS README TODO \ |
|
|
|
|
$PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Remove empty directories |
|
|
|
|
rmdir $PKG/usr/share/tutorials/linphone $PKG/usr/share/tutorials |
|
|
|
|
|
|
|
|
|
# Copy slack-desc and doinst.sh files |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh |
|
|
|
@ -129,6 +150,7 @@ chown root:root . -R
|
|
|
|
|
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT |
|
|
|
|
rm -rf $PKG |
|
|
|
|
rm -rf $TMP/$NAME |
|
|
|
|
rm -rf $TMP/srtp $TMP/srtp-tree |
|
|
|
|
" |
|
|
|
|
if type -p fakeroot ; then |
|
|
|
|
echo "$PACKAGING" | fakeroot |
|
|
|
|