]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8271 simplify package building for the default case
authorWilliam King <william.king@quentustech.com>
Fri, 2 Oct 2015 11:04:00 +0000 (04:04 -0700)
committerWilliam King <william.king@quentustech.com>
Fri, 2 Oct 2015 11:05:44 +0000 (04:05 -0700)
build/debpkgs.sh [new file with mode: 0755]
debian/util.sh

diff --git a/build/debpkgs.sh b/build/debpkgs.sh
new file mode 100755 (executable)
index 0000000..9844fef
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+a='amd64 i386'
+c='wheezy jessie stretch sid'
+n='1'
+T='/tmp/fs.sources.list'
+K='/tmp/fs.asc'
+
+while getopts "a:c:n:" flag
+do
+    case $flag in
+       a) a=$OPTARG;;
+       c) c=$OPTARG;;
+       n) n=$OPTARG;;
+       T) T=$OPTARG;;
+       K) K=$OPTARG;;
+    esac
+done
+
+if [ "$EUID" -ne 0 ]
+then
+    echo "Build script must be run as root or under sudo"
+    exit 1
+fi
+
+VERSION=`cat ./build/next-release.txt`
+echo "This Version: $VERSION"
+
+HASH=`git log -n 1 --oneline |cut -d ' ' -f 1`
+echo "Commit hash $HASH"
+
+# Use the FreeSWITCH release repo for dependency testing
+# The release codename here does not matter, since the util.sh script
+# will adapt to the release being built
+if [ ! -r "$T" ]
+then
+    echo "deb http://files.freeswitch.org/repo/deb/debian/ jessie main" >> "$T"
+fi
+
+# Use the FreeSWITCH release repo key
+if [ ! -r "$K" ]
+then
+    cat << EOF > "$K"
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQGiBE8jEfIRBAC+Cca0fPQxhyhn0NMsPaMQJgTvqhWb5/f4Mel++kosmUQQ4fJq
+4U9NFvpfNyLp5MoHpnlDfAb+e57B2sr47NOJLTh83yQIAnvU+8O0Q4kvMaiiesX5
+CisApLBs6Vx28y7VWmLsY3vWu8mC7M+PORKfpBV8DWy/7569wQPx2SCsIwCgzv2T
+8YsnYsSVRr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=Xc8P
+-----END PGP PUBLIC KEY BLOCK-----
+EOF
+fi
+
+
+./debian/util.sh build-all -a $a -c $c -T $T -K $K -f ./build/modules.conf.most -j -bn -z9 -v$VERSION-$n~$HASH
+
+if [ $(ls -al ../freeswitch-mod* | wc -l) -lt 10 ]; then false; else true; fi
+
index 075de7cdd57ee6112ac3e9cfb1b54af4771b3511..2a8bbb26d7fc856ff0b94996dc95d1dea7c2baef 100755 (executable)
@@ -309,11 +309,13 @@ build_debs () {
     fi
     cow () {
       if ! $use_custom_sources; then
+        echo "Using system sources $keyring $distro $custom_sources_file"
         cowbuilder "$@" \
           --distribution $distro \
           --architecture $arch \
           --basepath $cow_img
       else
+        echo "Using custom sources $keyring $distro $custom_sources_file"
         cowbuilder "$@" \
           --distribution $distro \
           --architecture $arch \