Skip to content
Snippets Groups Projects
Select Git revision
  • 84724c1a76ac4ff1b6f57bcc7a0934e74b6fe98b
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/releaseWindowsTestOne
  • release/windowsReleaseTest
  • release/releaseTest
  • release/releaseWindowsTest
  • release/201910
  • release/qt/201910
  • release/windows-test/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • 4.0.0
  • 2.2.0
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
31 results

build_tarball.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    build_tarball.sh 2.64 KiB
    #!/bin/bash
    #
    # Script to build the source tarball for distribution on sflphone.org
    #
    # Author: Francois Marier <francois@debian.org>
    
    if [ ! -e sflphone-common/configure.ac ] ; then
        echo "This script must be run in the root directory of the sflphone repository"
        exit 1
    fi
    
    if [ "z$1" = "z" ] ; then
        echo "Usage: $0 VERSION_NUMBER"
        exit 2
    fi
    
    VERSION=$1
    BUILDDIR=sflphone-$VERSION
    
    if [ -e $BUILDDIR ] ; then
        echo "The build directory ($BUILDDIR) already exists. Delete it first."
        exit 3
    fi
    
    mkdir $BUILDDIR
    cp -r * $BUILDDIR/
    
    pushd $BUILDDIR
    rm -rf $BUILDDIR
    rm -f *.tar.gz
    
    rm -rf lang/
    rm -rf tools/build-system/
    rm -f tools/pysflphone/*.pyc
    rm -f tools/build-package.sh tools/bleach.sh tools/autotoolize.sh
    rm -rf sflphone-client-kde/build
    
    find -name .project -type f -exec rm {} \;
    find -name .cproject -type f -exec rm {} \;
    find -name .settings -type d -exec rm -rf {} \;
    
    pushd sflphone-common
    ./autogen.sh
    popd
    
    pushd sflphone-common/libs/pjproject
    find -name os-auto.mak -type f -exec rm {} \;
    
    # Remove pre-built binaries
    rm -f pjsip/bin/pjsip-test-x86_64-unknown-linux-gnu
    rm -f pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu
    rm -f pjlib/bin/pjlib-test-x86_64-unknown-linux-gnu
    rm -f pjnath/bin/pjnath-test-x86_64-unknown-linux-gnu
    rm -f pjnath/bin/pjturn-client-x86_64-unknown-linux-gnu
    rm -f pjlib-util/bin/pjlib-util-test-x86_64-unknown-linux-gnu
    rm -f pjnath/bin/pjturn-srv-x86_64-unknown-linux-gnu
    rm -f pjmedia/bin/pjmedia-test-x86_64-unknown-linux-gnu
    
    # Put actual files in the tarball
    rm -f config.guess config.sub
    cp /usr/share/misc/config.guess .
    cp /usr/share/misc/config.sub .
    
    rm -f config.log config.status build.mak
    rm -f pjlib/include/pj/compat/m_auto.h
    rm -f pjlib/include/pj/compat/os_auto.h
    rm -f pjmedia/include/pjmedia-codec/config_auto.h
    rm -f pjmedia/include/pjmedia/config_auto.h
    rm -f pjsip/include/pjsip/sip_autoconf.h
    
    # Remove non-GPL compatible code
    sed -e 's/ milenage / /' third_party/build/Makefile > third_party/build/Makefile.new
    mv third_party/build/Makefile.new third_party/build/Makefile
    sed -e 's/ -lmilenage-$(TARGET_NAME) / /' build.mak.in > build.mak.in.new
    mv build.mak.in.new build.mak.in
    sed -e 's/ $(PJ_DIR)\/third_party\/lib\/libmilenage-$(LIB_SUFFIX) / /' build.mak.in > build.mak.in.new
    mv build.mak.in.new build.mak.in
    rm -rf third_party/build/ilbc/
    rm -rf third_party/build/milenage/
    rm -rf third_party/ilbc/
    rm -rf third_party/milenage/
    
    aclocal --force
    popd
    
    pushd sflphone-client-gnome
    ./autogen.sh
    popd
    
    find -name autom4te.cache -type d -exec rm -rf {} \;
    find -name *.in~ -type f -exec rm {} \;
    popd # builddir
    
    rm -f sflphone-$VERSION.tar.gz
    tar zcf sflphone-$VERSION.tar.gz sflphone-$VERSION
    rm -rf $BUILDDIR