|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2014,2015 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2014,2015,2017 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -22,15 +22,16 @@ |
|
|
|
|
# |
|
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
|
|
|
# |
|
|
|
|
# Latest belle-sip sourcecode is available at: <http://www.linphone.org/>. |
|
|
|
|
# Latest belle-sip sourcecode is available at: |
|
|
|
|
# <https://github.com/BelledonneCommunications/>. |
|
|
|
|
# |
|
|
|
|
# Depends: d/antlr3, l/mbedtls |
|
|
|
|
# Depends: d/antlr3, l/bctoolbox |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-belle-sip} |
|
|
|
|
VERSION=${VERSION:-1.4.2} |
|
|
|
|
VERSION=${VERSION:-1.6.1} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-http://download.savannah.gnu.org/releases/linphone/belle-sip/$ARCHIVE} |
|
|
|
|
WGET=${WGET:-https://github.com/BelledonneCommunications/belle-sip/archive/$VERSION.tar.gz} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-belle-sip} |
|
|
|
@ -57,27 +58,12 @@ if [ ! -d $TMP ]; then |
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Compilation flags |
|
|
|
|
LIBDIRSUFFIX="" |
|
|
|
|
case "$ARCH" in |
|
|
|
|
i?86) |
|
|
|
|
CPUOPT="-O2 -march=$ARCH -mtune=i686" |
|
|
|
|
;; |
|
|
|
|
x86_64) |
|
|
|
|
CPUOPT="-O2 -fPIC" |
|
|
|
|
LIBDIRSUFFIX="64" |
|
|
|
|
;; |
|
|
|
|
*) |
|
|
|
|
CPUOPT="-O2" |
|
|
|
|
;; |
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
# Get and verify the source archive |
|
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
@ -85,22 +71,27 @@ cd $TMP |
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=/usr \ |
|
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \ |
|
|
|
|
--disable-static |
|
|
|
|
mkdir bdir && cd bdir |
|
|
|
|
cmake \ |
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \ |
|
|
|
|
-DENABLE_STATIC=NO \ |
|
|
|
|
.. |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
make install/strip DESTDIR=$PKG |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 ../AUTHORS ../COPYING ../NEWS ../README.md $PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
|
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
|
antlr3 |
|
|
|
|
bctoolbox |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|
cd $PKG |
|
|
|
|
mkdir -p $OUT |
|
|
|
|