2012-05-06 03:24:46 +00:00
|
|
|
#!/bin/sh
|
2012-03-06 03:13:16 +00:00
|
|
|
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
|
|
|
|
2012-05-06 02:58:16 +00:00
|
|
|
sdir="."
|
|
|
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
|
|
|
. $sdir/common.sh
|
2012-03-06 03:13:16 +00:00
|
|
|
|
2012-05-06 02:58:16 +00:00
|
|
|
eval $(parse_version "$1")
|
2012-05-06 02:08:29 +00:00
|
|
|
datestamp="$(date +%Y%m%dT%H%M%SZ)"
|
|
|
|
nightly="n${datestamp}"
|
|
|
|
build="b$2"
|
2012-05-06 05:26:56 +00:00
|
|
|
distro=${3:="unstable"}
|
|
|
|
|
|
|
|
fver="${ver}~${nightly}~${build}"
|
|
|
|
fname="freeswitch-$fver"
|
|
|
|
orig="freeswitch_$fver.orig"
|
|
|
|
ddir=$src_repo/debbuild
|
|
|
|
bdir=$src_repo/debbuild/$fname
|
|
|
|
|
|
|
|
mkdir -p $ddir
|
|
|
|
git clone . $bdir
|
|
|
|
cd $bdir
|
|
|
|
set_fs_ver "$ver" "$major" "$minor" "$micro" "$rev"
|
|
|
|
sleep 2
|
|
|
|
cd $ddir
|
|
|
|
tar -c --exclude=.git -vf $orig.tar $fname
|
|
|
|
bzip2 -z -k $orig.tar
|
|
|
|
rm $orig.tar
|
|
|
|
|
|
|
|
cd $bdir
|
2012-05-06 03:32:11 +00:00
|
|
|
(cd debian && ./bootstrap.sh)
|
2012-05-06 04:12:06 +00:00
|
|
|
# dch can't handle comments in control file
|
|
|
|
(cd debian; \
|
|
|
|
mv control control.orig; \
|
|
|
|
grep -e '^#' -v control.orig > control)
|
2012-05-06 04:11:40 +00:00
|
|
|
# dependency: libparse-debcontrol-perl
|
2012-05-06 05:26:56 +00:00
|
|
|
dch -b -v "${fver}-1" \
|
2012-05-06 02:08:29 +00:00
|
|
|
-M --force-distribution -D "$distro" \
|
|
|
|
"Nightly build at ${datestamp}."
|
2012-05-06 04:11:40 +00:00
|
|
|
# dependency: fakeroot
|
2012-05-06 05:26:56 +00:00
|
|
|
dpkg-buildpackage -rfakeroot -S -us -uc || exit $?
|
2012-03-06 03:13:16 +00:00
|
|
|
|
2012-05-06 05:26:56 +00:00
|
|
|
cat 1>&2 <<EOF
|
2012-03-06 03:13:16 +00:00
|
|
|
----------------------------------------------------------------------
|
2012-05-06 05:26:56 +00:00
|
|
|
The ${fname} DEB-SRCs have been rolled, now we
|
2012-05-06 01:52:50 +00:00
|
|
|
just need to push them to the Debian repo
|
2012-03-06 03:13:16 +00:00
|
|
|
----------------------------------------------------------------------
|
|
|
|
EOF
|
|
|
|
|