Commit c3f08cb9 authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by gerrit2

delete build-system dir

The files in this directory are outdated (for sflphone) and no longer
used.

Change-Id: Ic8aa820c842b31414656c7dae0be433932941bca
Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent 09d7b43f
To push packages for a new Ubuntu distribution on launchpad, you'll need to
modify the following files:
tools/build-system/launchpad/dput.conf
tools/build-system/setenv.sh
See commit 1b19e3869aa5e4632b8b043f47024297218ed2c5 for an example.
In addition, you'll have to modify the sflphone-package-manager job on Jenkins, specifically
Configure->Build->Execute Shell (add new distro).
#!/bin/bash
#
# Script to build the source tarball for distribution on sflphone.org
# Inclusion of KDE is a requirement. Run get-kde.sh to have it.
#
# Author: Francois Marier <francois@debian.org>
# Exit on error
set -o errexit
# This is an environment variable provided by Jenkins. It points to the repository's root
cd ${WORKSPACE}
if [ ! -e daemon/configure.ac ] ; then
echo "This script must be run in the root directory of the sflphone repository" >&2
exit 1
fi
if [ $# -ne 1 ] ; then
echo "Usage: $(basename $0) SOFTWARE_VERSION_NUMBER" >&2
exit 2
fi
if [ ! -d kde ] ; then
echo 'No "kde" directory. Make sure get-kde.sh ran at some point.' >&2
exit 1
fi
# Use the version fed by launch-build-machine-jenkins.sh
SOFTWARE_VERSION=$1
BUILDDIR=sflphone-$SOFTWARE_VERSION
if [ -e $BUILDDIR ] ; then
echo "The build directory ($BUILDDIR) already exists. Delete it first." >&2
exit 3
fi
# Populate the tarball directory
mkdir $BUILDDIR
SRCITEMS=$(echo *)
# Exclude existing tarballs from the created tarball
SRCITEMS=${SRCITEMS//*.tar.gz}
# ${SRCITEMS//$BUILDDIR} is used to remove $BUILDDIR from $SRCITEMS
# See bash parameter expansion
cp -r ${SRCITEMS//$BUILDDIR} $BUILDDIR/
pushd $BUILDDIR
# No dash in Version:
sed /^Version/s/[0-9].*/${SOFTWARE_VERSION%%-*}/ tools/build-system/rpm/sflphone.spec > sflphone.spec
# Remove unwanted files
rm -rf lang/
rm -rf tools/
rm -rf .git/
find -name .gitignore -delete
find -name .project -type f -delete
find -name .cproject -type f -delete
find -name .settings -type d -exec rm -rf {} +
# Generate the configure files
pushd daemon
./autogen.sh
find -name \*.spec -delete
popd
pushd gnome
NOCONFIGURE=1 ./autogen.sh
popd
find -name autom4te.cache -type d -exec rm -rf {} +
find -name *.in~ -type f -delete
popd # builddir
tar zcf sflphone-${SOFTWARE_VERSION}.tar.gz sflphone-${SOFTWARE_VERSION}
rm -rf $BUILDDIR
#!/bin/bash
# Get the KDE client
# To get all files, you have to create the tarball from scratch,
# then extract files from it. The directory is renamed "kde".
# $WORKSPACE is declared in setenv.sh
set -o errexit
source $(dirname $0)/setenv.sh
cd "$WORKSPACE"
baseurl='https://projects.kde.org/projects'
config_uri='/playground/network/sflphone-kde/repository/revisions/master/raw/data/config.ini'
createtarball_uri='/kde/kdesdk/kde-dev-scripts/repository/revisions/master/raw/createtarball/create_tarball.rb'
set -x
# timeout in seconds
let -i timeout=300
let -i timestamp=$(date +%s)
while ! curl --fail --remote-name ${baseurl}${config_uri}
do
if [ $(date +%s) -gt $(( $timestamp + $timeout)) ]; then
break
fi
sleep 15
done
let -i timestamp=$(date +%s)
while ! curl --fail --remote-name ${baseurl}${createtarball_uri}
do
if [ $(date +%s) -gt $(( $timestamp + $timeout)) ]; then
break
fi
sleep 15
done
ruby create_tarball.rb --noaccount --application sflphone-kde
rm -rf kde
rm -rf sflphone-kde-*.tar.*
rm create_tarball.rb config.ini
mv sflphone-kde-* kde
#!/bin/bash -e
#
# Copyright (C) 2004-2016 Savoir-faire Linux Inc.
#
# Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Script used by Hudson continious integration server to build SFLphone
XML_RESULTS="cppunitresults.xml"
TEST=0
BUILD=
CODE_ANALYSIS=0
DOXYGEN=0
#daemon opts
DOPTS="--prefix=/usr"
#gnome opts
GOPTS="--prefix=/usr --enable-video"
#compiler defaults
export CC=gcc
export CXX=g++
CONFIGDIR=~/.config
SFLCONFDIR=${CONFIGDIR}/sflphone
function exit_clean {
popd
exit $1
}
function run_code_analysis {
# Check if cppcheck is installed on the system
if [ `which cppcheck &>/dev/null ; echo $?` -ne 1 ] ; then
pushd src
cppcheck . --enable=all --xml --inline-suppr 2> cppcheck-report.xml
popd
fi
}
function gen_doxygen {
# Check if doxygen is installed on the system
if [ `which doxygen &>/dev/null ; echo $?` -ne 1 ] ; then
pushd doc/doxygen
doxygen core-doc.cfg.in
popd
fi
}
function launch_functional_test_daemon {
# Run the python functional tests for the daemon
# make sure no other instance are currently running
killall sflphoned
killall sipp
# make sure the configuration directory created
CONFDIR=~/.config
SFLCONFDIR=${CONFDIR}/sflphone
eval `dbus-launch --auto-syntax`
if [ ! -d ${CONFDIR} ]; then
mkdir ${CONFDIR}
fi
if [ ! -d ${SFLCONFDIR} ]; then
mkdir ${SFLCONFDIR}
fi
# make sure the most recent version of the configuration
# is installed
pushd tools/pysflphone
cp -f sflphoned.functest.yml ${SFLCONFDIR}
popd
# launch sflphone daemon, wait some time for
# dbus registration to complete
pushd daemon
./src/sflphoned &
sleep 3
popd
# launch the test script
pushd tools/pysflphone
nosetests --with-xunit test_sflphone_dbus_interface.py
popd
}
function build_contrib {
if [ -d contrib ] ; then
pushd contrib
mkdir -p native
pushd native
../bootstrap
# list dependencies that aren't detected by contrib
make list
# FIXME: this is very slow but it's the best we can do until we migrate
# to a builder with more up to date packages
if [ "$DEBUG_CONTRIB" != "" ]; then
make
else
make -j
fi
popd
else
# We're on 1.4.x
pushd libs
./compile_pjsip.sh
fi
popd
}
function build_daemon {
pushd daemon
# Build dependencies first
build_contrib
# Run static analysis code tool
if [ $CODE_ANALYSIS == 1 ]; then
run_code_analysis
fi
# Compile the daemon
./autogen.sh || exit_clean 1
#FIXME: this is a temporary hack around linking failure on jenkins
./configure $DOPTS
make clean
make -j
# Remove the previous XML test file
rm -rf $XML_RESULTS
# Compile unit tests
make check
popd
}
function build_gnome {
# Compile the plugins
pushd plugins
./autogen.sh || exit_clean 1
./configure $GOPTS
make -j
popd
# Compile the client
pushd gnome
./autogen.sh || exit_clean 1
./configure $GOPTS
make clean
make -j 1
make check
popd
}
function build_kde {
# Compile the KDE client
pushd kde
mkdir -p build
cd build
cmake ../
make -j
popd
}
if [ "$#" -eq 0 ]; then # Script needs at least one command-line argument.
echo "$0 accepts the following options:
-b select 'daemon' or 'gnome' component
-v enable video support
-c use clang compiler
-a run static code analysis after build
-t run unit tests after build
-m disable most optional options"
exit $E_OPTERR
fi
pushd "$(git rev-parse --show-toplevel)"
git clean -f -d -x
while getopts ":b: t a v c" opt; do
case $opt in
b)
echo "-b is set with option $OPTARG" >&2
if [ ! -d $OPTARG ]
then
echo "$OPTARG directory is missing, exiting"
exit_clean $E_OPTERR
fi
BUILD=$OPTARG
;;
t)
echo "-t is set, unit tests will be run after build" >&2
TEST=1
;;
a)
echo "-a is set, static code analysis will be run after build" >&2
CODE_ANALYSIS=1
;;
v)
echo "-v is set, video support is disabled" >&2
DOPTS="--disable-video $DOPTS"
;;
m)
echo "-m is set, disabling dbus, video, nm and pulse" >&2
DOPTS="--disable-video --without-dbus --without-pulse --without-networkmanager $DOPTS"
;;
c)
echo "-c is set, clang compiler is used" >&2
export CC=clang
export CXX=clang++
DOPTS="--without-dbus $DOPTS"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit_clean 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit_clean 1
;;
esac
done
# Call appropriate build function, with parameters if needed
build_$BUILD
if [ $TEST == 1 ]; then
launch_functional_test_daemon
fi
# SUCCESS
exit_clean 0
#!/bin/bash
# run with --help for documentation
set -x
set -e
#Check dependencies
for cmd in curl ruby git svn
do
if ! command -v $cmd; then
echo "$cmd is missing" >&2
exit 1
fi
done
source $(dirname $0)/setenv.sh
./$(dirname $0)/get-kde.sh
IS_RELEASE=
VERSION_INDEX="1"
IS_KDE_CLIENT=
DO_PUSH=1
DO_LOGGING=1
DO_UPLOAD=1
SNAPSHOT_TAG=`date +%Y%m%d`
TAG_NAME_PREFIX=
VERSION_NUMBER="1.4.2"
LAUNCHPAD_PACKAGES=("sflphone-daemon" "sflphone-kde" "sflphone-gnome" "sflphone-plugins" "sflphone-daemon-video" "sflphone-gnome-video")
cat << EOF
_________________________
| SFLPhone build system |
-------------------------
EOF
for PARAMETER in $*
do
case ${PARAMETER} in
--help)
echo
echo "Options :"
echo " --skip-push"
echo " --skip-upload"
echo " --kde-client"
echo " --no-logging"
echo " --release"
echo " --version-index=[1,2,...]"
echo
exit 0;;
--skip-push)
unset DO_PUSH;;
--skip-upload)
unset DO_UPLOAD;;
--kde-client)
IS_KDE_CLIENT=1;;
--no-logging)
unset DO_LOGGING;;
--release)
IS_RELEASE=1;;
--tag=*)
TAG=(${PARAMETER##*=});;
--version-index=*)
VERSION_INDEX=(${PARAMETER##*=});;
*)
echo "Unknown parameter : ${PARAMETER}"
exit -1;;
esac
done
#########################
# LAUNCHPAD
#########################
# change to working directory
cd ${LAUNCHPAD_DIR}
if [ "$?" -ne "0" ]; then
echo " !! Cannot cd to launchpad directory"
exit -1
fi
# logging
if [ ${DO_LOGGING} ]; then
rm -f ${ROOT_DIR}/packaging.log >/dev/null 2>&1
# open file descriptor
exec 3<> ${ROOT_DIR}/packaging.log
# redirect outputs (stdout & stderr)
exec 1>&3
exec 2>&3
fi
if [ ${RELEASE_MODE} ]; then
echo "Release mode"
else
echo "Snapshot mode"
fi
if [ ${IS_KDE_CLIENT} ]; then
TAG_NAME_PREFIX="kde."
fi
#########################
# COMMON PART
#########################
cd ${REFERENCE_REPOSITORY}
echo "Update reference sources"
git checkout . && git checkout -f master && git pull
# Get the version
if [ -n "$TAG" ]; then
CURRENT_RELEASE_TAG_NAME="$TAG"
else
CURRENT_RELEASE_TAG_NAME=`git describe --tags --abbrev=0`
fi
PREVIOUS_RELEASE_TAG_NAME=`git describe --tags --abbrev=0 ${CURRENT_RELEASE_TAG_NAME}^`
CURRENT_RELEASE_COMMIT_HASH=`git show --pretty=format:"%H" -s ${CURRENT_RELEASE_TAG_NAME} | tail -n 1`
PREVIOUS_RELEASE_COMMIT_HASH=`git show --pretty=format:"%H" -s ${PREVIOUS_RELEASE_TAG_NAME} | tail -n 1`