提交 47c39fbd authored 作者: Steven Ayre's avatar Steven Ayre

add scripts to aid building debian packages from git or tarball

上级 7c03f504
freeswitch*
libfreeswitch*
#!/bin/sh -e
#
# Helper script for building Debian packages
#
# FreeSWITCH will be downloaded from Git into ./freeswitch/ and built.
# The resulting Debian packages will be placed in the current directory.
#
# You should run this as an unprivileged user, with sudo permissions
# to install build dependencies (add your user to the sudo group).
#
# Build dependencies:
# $ apt-get -y install git dpkg-dev devscripts sudo
# All other dependencies are installed by the script.
#
# If modules.conf exists in the current directory then it will be
# used to select the modules to be built.
#
# Configuration
BRANCH=v1.2.stable
DCH_DISTRO=UNRELEASED
# SIGN_KEY= (Optional)
# Download FreeSWITCH
git clone -b $BRANCH git://git.freeswitch.org/freeswitch.git
# Version number for Git checkouts needs to be generated
DISTRO=`lsb_release -cs`
FS_VERSION="$(cat freeswitch/build/next-release.txt | sed -e 's/-/~/g')~n$(date +%Y%m%dT%H%M%SZ)-1~${DISTRO}+1"
(cd freeswitch && build/set-fs-version.sh "$FS_VERSION")
(cd freeswitch && dch -b -m -v "$FS_VERSION" --force-distribution -D "$DCH_DISTRO" "Custom build.")
# Optional: if modules.conf exists use this to select which modules to build
if [ -f modules.conf ]; then cp modules.conf freeswitch/debian; fi
# Bootstrap debian buildsystem
(cd freeswitch/debian && ./bootstrap.sh -c ${DISTRO})
# See FS-5863 (mk-build-deps hates comments and whitespace, this is a workaround for bugs in that program)
mv freeswitch/debian/control freeswitch/debian/control.bak
cat freeswitch/debian/control.bak | sed -e '/^#/d' | sed -e 's/^ *$//' | sed -e '/^$/N;/^\n$/D' > freeswitch/debian/control
# Install build dependencies
sudo mk-build-deps -i freeswitch/debian/control
# Build
if [ -z "$SIGN_KEY" ]; then
(cd freeswitch && dpkg-buildpackage -b -uc)
else
(cd freeswitch && dpkg-buildpackage -b -k$SIGN_KEY)
fi
#!/bin/sh -e
#
# Helper script for building Debian packages
#
# FreeSWITCH will be downloaded from Git into ./freeswitch/ and built.
# The resulting Debian packages will be placed in the current directory.
#
# You should run this as an unprivileged user, with sudo permissions
# to install build dependencies (add your user to the sudo group).
#
# Build dependencies:
# $ apt-get -y install git dpkg-dev devscripts sudo
# All other dependencies are installed by the script.
#
# If modules.conf exists in the current directory then it will be
# used to select the modules to be built.
#
# Configuration
VERSION=1.2.23
DCH_DISTRO=UNRELEASED
# SIGN_KEY= (Optional)
# Download FreeSWITCH
wget http://files.freeswitch.org/freeswitch-${VERSION}.tar.bz2
# Extract tarball
tar -jxvf freeswitch-${VERSION}.tar.bz2
## Version number for Git checkouts needs to be generated
DISTRO=`lsb_release -cs`
FS_VERSION="$(cat freeswitch-${VERSION}/build/next-release.txt | sed -e 's/-/~/g')~n$(date +%Y%m%dT%H%M%SZ)-1~${DISTRO}+1"
(cd freeswitch-${VERSION} && dch -b -m -v "$FS_VERSION" --force-distribution -D "$DCH_DISTRO" "Custom build.")
# Optional: if modules.conf exists use this to select which modules to build
if [ -f modules.conf ]; then cp modules.conf freeswitch-${VERSION}/debian; fi
# Bootstrap debian buildsystem
touch freeswitch-${VERSION}/.stamp-bootstrap
(cd freeswitch-${VERSION}/debian && ./bootstrap.sh -c ${DISTRO})
# See FS-5863 (mk-build-deps hates comments and whitespace, this is a workaround for bugs in that program)
mv freeswitch-${VERSION}/debian/control freeswitch-${VERSION}/debian/control.bak
cat freeswitch-${VERSION}/debian/control.bak | sed -e '/^#/d' | sed -e 's/^ *$//' | sed -e '/^$/N;/^\n$/D' > freeswitch-${VERSION}/debian/control
# Install build dependencies
sudo mk-build-deps -i freeswitch-${VERSION}/debian/control
# Build
echo 123
sleep 20
if [ -z "$SIGN_KEY" ]; then
(cd freeswitch-${VERSION} && dpkg-buildpackage -b -uc)
else
(cd freeswitch-${VERSION} && dpkg-buildpackage -b -k$SIGN_KEY)
fi
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论