Browse Source

n/ring-daemon: Upgraded to ring-daemon-20191111.3.a3432a2.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
571ea06e23
  1. 4
      n/ring-daemon/checksums
  2. 1
      n/ring-daemon/jami_20191111.3.a3432a2.tar.gz.sha256
  3. 163
      n/ring-daemon/ring-daemon.SlackBuild

4
n/ring-daemon/checksums

@ -1,4 +0,0 @@
c8c83a70662ad786c5aac82745eebf72b114358cf4c505b3c392f377312cae71 ring_20180718.1.af8399f.tar.gz
e1aa9c4c4219bc06943d6b2130f664daee213fb262fcb94dd355815b8f4536b0 libnatpmp-20150609.tar.gz
9c2c828abab7626edf18e04b041ef274bfaa86f99adf2c25ff56f1509e813772 pjproject-2.7.2.tar.bz2
5fced76228ca2603cd9f80a5537fc568cc9f19d139107a03dc1f0c40e9489476 opendht-1.7.3rc4.tar.gz

1
n/ring-daemon/jami_20191111.3.a3432a2.tar.gz.sha256

@ -0,0 +1 @@
50aa6d150db61abf5bef174a891c9631f5e3534c200e3e0261b0ad1095514908 jami_20191111.3.a3432a2.tar.gz

163
n/ring-daemon/ring-daemon.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2018 Damien Goutte-Gattat
# Copyright (C) 2018,2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -22,30 +22,23 @@
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest ring-daemon sourcecode is available at: <https://www.ring.cx/>.
# Latest ring-daemon sourcecode is available at: <https://jami.net/>.
#
# Depends: l/yaml-cpp, l/jsoncpp, xap/ffmpeg, l/argon2, l/restbed
# Depends: l/msgpack-c, l/secp256k1
# Recommends: l/libdbus-c++, l/opus, l/speex, l/libgsm
# Optional: ap/jack, l/libilbc
# Note to my future self or whoever re-uses this SlackBuild:
# The ring-daemon source code comes bundled with all its
# required dependencies, which are built and installed in a
# temporary location before being statically linked to the
# final binaries.
# FOR YOUR OWN SANITY, DO NOT ATTEMPT TO “UNBUNDLE” THOSE
# DEPENDENCIES INTO SEPARATE PACKAGES.
# Seriously, don’t. Just use whatever upstream provides.
# Source package infos
NAMESRC=${NAMESRC:-ring}
VERSION=${VERSION:-20180718.1.af8399f}
NAMESRC=${NAMESRC:-jami}
VERSION=${VERSION:-20191111.3.a3432a2}
ARCHIVE=${ARCHIVE:-${NAMESRC}_$VERSION.tar.gz}
WGET=${WGET:-https://dl.ring.cx/ring-release/tarballs/$ARCHIVE}
# Bundled dependencies
NATPMP_VERSION=${NATPMP_VERSION:-20150609}
NATPMP_ARCHIVE=${NATPMP_ARCHIVE:-libnatpmp-$NATPMP_VERSION.tar.gz}
NATPMP_WGET=${NATPMP_URL:-http://miniupnp.free.fr/files/download.php?file=$NATPMP_ARCHIVE}
PJPROJECT_VERSION=${PJPROJECT_VERSION:-2.7.2}
PJPROJECT_ARCHIVE=${PJPROJECT_ARCHIVE:-pjproject-$PJPROJECT_VERSION.tar.bz2}
PJPROJECT_WGET=${PJPROJECT_WGET:-http://www.pjsip.org/release/$PJPROJECT_VERSION/$PJPROJECT_ARCHIVE}
OPENDHT_VERSION=${OPENDHT_VERSION:-1.7.3rc4}
OPENDHT_ARCHIVE=${OPENDHT_ARCHIVE:-opendht-$OPENDHT_VERSION.tar.gz}
OPENDHT_WGET=${OPENDHT_WGET:-https://github.com/savoirfairelinux/opendht/archive/$OPENDHT_VERSION.tar.gz}
# Build infos
NAMEPKG=${NAMEPKG:-ring-daemon}
BUILD=${BUILD:-1GGD}
@ -86,98 +79,28 @@ x86_64)
;;
esac
# Download source and bundled dependencies
#
# Rationale for bundling those dependencies instead of
# making proper packages for each of them:
#
# - libnatpmp: needs to be statically linked into libring.so,
# otherwise the dring daemon crashes at startup (WTF?)
# - pjproject: heavily patched by the Ring developers, and only
# a subset of its features are used
# - opendht: tightly tied to Ring
for dep in "" NATPMP_ PJPROJECT_ OPENDHT_ ; do
eval archive=\$${dep}ARCHIVE
eval url=\$${dep}WGET
if [ ! -r $archive ]; then
wget -c -O $archive.part $url
mv $archive.part $archive
fi
eval ${dep}NAME=$(tar ft $archive | head -n 1 | cut -d / -f 1)
done
sha256sum -c checksums
# Download source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part $WGET
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar tf $ARCHIVE | head -n 1 | cut -d / -f 1)
# Extract all sources
mkdir -p $TMP/ring-daemon/bundle
cd $TMP/ring-daemon
# Extract the archive
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
tar xf $CWD/$NATPMP_ARCHIVE
tar xf $CWD/$PJPROJECT_ARCHIVE
tar xf $CWD/$OPENDHT_ARCHIVE
# Building bundled libnatpmp
cd $NATPMP_NAME
make INSTALLPREFIX=$TMP/ring-daemon/bundle install
rm -f $TMP/ring-daemon/bundle/lib/libnatpmp.so*
# Building bundled pjproject
cd $TMP/ring-daemon/$PJPROJECT_NAME
for patch in gnutls notestsapps ipv6 ice_config multiple_listeners pj_ice_sess fix_turn_fallback fix_ioqueue_ipv6_sendto add_dtls_transport rfc6062 ; do
patch -p 1 < $TMP/ring-daemon/$NAME/daemon/contrib/src/pjproject/$patch.patch
done
PJPROJECT_EXTRA_CFLAGS="-DPJ_ICE_MAX_CAND=256 -DPJ_ICE_MAX_CHECKS=150 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000 -DPJ_ICE_ST_MAX_CAND=32"
PJPROJECT_EXTRA_CXXFLAGS="$PJPROJECT_EXTRA_CFLAGS -std=gnu++11"
./configure --prefix=$TMP/ring-daemon/bundle \
--disable-oss \
--disable-sound \
--disable-video \
--enable-ext-sound \
--disable-speex-aec \
--disable-g711-codec \
--disable-l16-codec \
--disable-gsm-codec \
--disable-g722-codec \
--disable-g7221-codec \
--disable-speex-codec \
--disable-ilbc-codec \
--disable-opencore-amr \
--disable-silk \
--disable-sdl \
--disable-ffmpeg \
--disable-v4l2 \
--disable-openh264 \
--disable-resample \
--disable-libwebrtc \
--enable-ssl=gnutls \
--enable-static \
--disable-shared \
--disable-dependency-tracking
CFLAGS="$CPUOPT $PJPROJECT_EXTRA_CFLAGS" \
CXXFLAGS="$CPUOPT $PJPROJECT_EXTRA_CXXFLAGS" \
make -j $JOBS
make install
cd $NAME/daemon
# Building bundled OpenDHT
cd $TMP/ring-daemon/$OPENDHT_NAME
./autogen.sh
CFLAGS="$CPUOPT" \
CXXFLAGS="$CPUOPT -std=c++14" \
./configure \
--prefix=$TMP/ring-daemon/bundle \
--disable-tools \
--disable-python \
--disable-doc \
--enable-proxy-server \
--enable-proxy-client \
--enable-push-notifications \
--enable-static \
--disable-shared \
--disable-dependency-tracking
# Build the bundled dependencies
mkdir contrib/build
cd contrib/build
../bootstrap
make -j $JOBS
make install
# Build ring-daemon itself
cd $TMP/ring-daemon/$NAME/daemon
# Now build ring-daemon proper
cd ../..
./autogen.sh
CFLAGS="$CPUOPT" \
CXXFLAGS="$CPUOPT" \
@ -187,42 +110,22 @@ CXXFLAGS="$CPUOPT" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--enable-ipv6 \
--with-contrib=$TMP/ring-daemon/bundle
--build=$ARCH-slackware-linux
export PATH=$PATH=$TMP/$NAME/daemon/contrib/$ARCH-slackware-linux/bin
make -j $JOBS
# We need to convince Libtool that there's no need to link
# to libnatpmp.so...
sed -i 's,-lnatpmp,,' bin/dring
sed -i 's,-lnatpmp,,' src/libring.la
make install-strip DESTDIR=$PKG
sed -i 's,-lnatpmp,,' $PKG/usr/lib$LIBDIRSUFFIX/libring.la
# Compress man page
gzip -9 $PKG/usr/man/man1/dring.1
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 AUTHORS CODING COPYING ChangeLog NEWS README \
install -m 644 AUTHORS CODING COPYING NEWS README \
$PKG/usr/doc/$NAMEPKG-$VERSION
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
argon2
ffmpeg
jsoncpp
libdbus-c++
libgsm
msgpack-c
opus
restbed
secp256k1
speex
yaml-cpp
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
@ -230,7 +133,7 @@ PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/ring-daemon
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot

Loading…
Cancel
Save