2012-02-23 20:03:09 -05:00
|
|
|
FreeSWITCH for Debian
|
2012-10-02 22:15:51 -04:00
|
|
|
---------------------
|
2012-02-23 20:03:09 -05:00
|
|
|
|
|
|
|
You may be reading this because you're wondering where all the files
|
2012-08-20 04:18:02 -04:00
|
|
|
are in debian/, such as control. You may also be here looking for the
|
|
|
|
sound or music packages. Read on.
|
2012-02-23 20:03:09 -05:00
|
|
|
|
|
|
|
Because FreeSWITCH has so many modules it was necessary to create a
|
|
|
|
system to autogenerate the majority of the packaging. This in done
|
|
|
|
mostly in the file debian/bootstrap.sh. This bootstrap needs to run
|
|
|
|
before any other step of the packaging, though we do try to
|
|
|
|
autogenerate it when possible.
|
|
|
|
|
|
|
|
The build dependencies, runtime dependencies, and other details about
|
|
|
|
modules can be configured in the debian/control-modules file. Even
|
|
|
|
though this file looks a bit like a debian control file and has a
|
|
|
|
similar format, we are parsing this file ourselves so the format is a
|
|
|
|
bit more restricted.
|
|
|
|
|
|
|
|
debian/control-modules currently supports the following fields:
|
|
|
|
|
|
|
|
# lines that begin with the hash character are comments
|
|
|
|
#
|
|
|
|
# every block must start with a Module field
|
|
|
|
Module: <category>/<module_name>
|
|
|
|
Description: <short description>
|
|
|
|
<long description> # empty lines with "."s are not yet supported
|
|
|
|
Build-Depends: <build deps for this module>
|
|
|
|
Depends: <runtime deps for this module>
|
|
|
|
Recommends: <recommended packages>
|
|
|
|
Suggests: <suggested packages>
|
|
|
|
Distro-Conflicts: <distributions on which this module should not be built> # not yet implemented
|
|
|
|
|
|
|
|
During bootstrap we build a file control-modules.gen. If the
|
|
|
|
control-modules file is properly formatted, this generated file should
|
|
|
|
be identical. This is a sanity check mechanism for our parsing, as
|
|
|
|
well as a way to automatically reorganize the file.
|
|
|
|
|
|
|
|
If the file debian/modules.conf is present, we read that file and only
|
|
|
|
build and package the files listed there. Otherwise, we build every
|
|
|
|
module except the ones that either should not be packaged, or for
|
|
|
|
which we don't yet have good packaging.
|
|
|
|
|
|
|
|
The format of debian/modules.conf is:
|
|
|
|
|
|
|
|
## comments should start with two hash characters
|
|
|
|
<category>/<module_name>
|
|
|
|
|
|
|
|
To build this package, I recommend running the following from the root
|
|
|
|
directory of your FS git working tree:
|
|
|
|
|
2012-05-24 12:36:31 -04:00
|
|
|
distro=sid
|
|
|
|
ver="$(cat build/next-release.txt | sed -e 's/-/~/g')~n$(date +%Y%m%dT%H%M%SZ)-1~${distro}+1"
|
2012-05-05 19:33:17 -04:00
|
|
|
git clean -fdx && git reset --hard HEAD
|
2012-05-24 12:36:31 -04:00
|
|
|
./build/set-fs-version.sh "$ver"
|
|
|
|
git add configure.in && git commit -m "bump to custom v$ver"
|
|
|
|
(cd debian && ./bootstrap.sh -c $distro)
|
2012-09-04 10:55:50 -04:00
|
|
|
dch -b -m -v "$ver" --force-distribution -D "unstable" "Custom build."
|
2012-09-04 10:57:09 -04:00
|
|
|
dpkg-buildpackage -b -us -uc -Zxz -z9
|
2012-05-24 12:36:31 -04:00
|
|
|
git reset --hard HEAD^
|
2012-02-23 20:03:09 -05:00
|
|
|
|
2012-09-04 10:53:34 -04:00
|
|
|
To build for a stable branch, do this:
|
|
|
|
|
|
|
|
distro=sid # update as needed
|
|
|
|
stable_ver="1.2.1" # update as needed
|
|
|
|
# if you only want to build some modules, put them one per line here, e.g.:
|
|
|
|
#echo "applications/mod_commands" >> debian/modules.conf
|
|
|
|
ver="$(echo "$stable_ver" | sed -e 's/-/~/g')~n$(date +%Y%m%dT%H%M%SZ)-1~${distro}+1"
|
|
|
|
git clean -fdx && git reset --hard refs/tags/v${stable_ver}
|
|
|
|
./build/set-fs-version.sh "$ver"
|
|
|
|
git add configure.in && git commit -m "bump to custom v$ver"
|
|
|
|
(cd debian && ./bootstrap.sh -c $distro)
|
|
|
|
dch -b -m -v "$ver" --force-distribution -D "unstable" "Custom build."
|
|
|
|
dpkg-buildpackage -b -us -uc -Zxz -z9
|
|
|
|
git reset --hard origin/master
|
|
|
|
|
2013-03-11 13:10:52 -04:00
|
|
|
Alternatively, you can build using our automated tools. To build the
|
|
|
|
source packages and all supported binary packages for sid, wheezy,
|
|
|
|
squeeze on i386 and amd64, run the following as root from a clean
|
2013-03-29 18:10:10 -04:00
|
|
|
Debian sid 'buildd' image:
|
2013-03-11 13:10:52 -04:00
|
|
|
|
|
|
|
aptitude update && aptitude upgrade
|
2014-01-17 15:03:39 -05:00
|
|
|
aptitude install -y git
|
2013-03-11 13:10:52 -04:00
|
|
|
mkdir /usr/src/freeswitch
|
|
|
|
git clone git://git.freeswitch.org/freeswitch /usr/src/freeswitch/src
|
|
|
|
cd /usr/src/freeswitch/src
|
2012-09-04 10:53:34 -04:00
|
|
|
# if you only want to build some modules, create a modules.conf
|
|
|
|
# outside the source tree and add -f ../path/to/modules.conf to the
|
2013-03-11 13:10:52 -04:00
|
|
|
# command below. See ./debian/util.sh -h for further usage
|
|
|
|
# information.
|
2014-01-17 15:03:39 -05:00
|
|
|
./debian/util.sh build-all -ibn -z9
|
2012-09-04 10:53:34 -04:00
|
|
|
|
2014-01-17 15:06:14 -05:00
|
|
|
If you need to build a small set of modules for compile testing in the
|
|
|
|
pbuilder environment, run something like:
|
|
|
|
|
|
|
|
./debian/util.sh build-all -dni -z1 -a amd64 -c sid -l "applications/mod_commands"
|
|
|
|
|
2012-08-20 04:18:02 -04:00
|
|
|
The source packages for sounds and music on hold are maintained in a
|
|
|
|
separate repository. Each set of sounds has a separate version number
|
|
|
|
and the processing of the sounds is quite different from what we're
|
|
|
|
doing here, so trying to maintain a merged debian/ between FreeSWITCH
|
|
|
|
and the sounds and music would be a mess.
|
|
|
|
|
|
|
|
To build the Debian packages for freeswitch-sounds-* and
|
|
|
|
freeswitch-music-*:
|
|
|
|
|
|
|
|
git clone https://github.com/traviscross/freeswitch-sounds.git
|
|
|
|
cd freeswitch-sounds && cat debian/README.source
|
|
|
|
|
2014-01-17 15:06:14 -05:00
|
|
|
-- Travis Cross <tc@traviscross.com>, Fri, 17 Jan 2014 20:05:52 +0000
|