]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add util option to customize suite names
authorTravis Cross <tc@traviscross.com>
Tue, 21 Jan 2014 04:40:00 +0000 (04:40 +0000)
committerTravis Cross <tc@traviscross.com>
Tue, 21 Jan 2014 07:09:32 +0000 (07:09 +0000)
This lets us set the suite name in the changelog file to
e.g. sid-experimental.  This way we can share a single debian repo URL
for all versions, but make sure that incoming files are directed to
the correct distro.

debian/util.sh

index fa2a6f7ba598872ae90ae9e7844becee52457175..b81181fe7723d3648a25e16d18d28ec7bf44393c 100755 (executable)
@@ -208,12 +208,13 @@ EOF
 create_dsc () {
   {
     set -e
-    local OPTIND OPTARG modules_conf="" modules_list="" speed="normal" zl=9
-    while getopts 'f:m:s:z:' o "$@"; do
+    local OPTIND OPTARG modules_conf="" modules_list="" speed="normal" suite_postfix="" suite_postfix_p=false zl=9
+    while getopts 'f:m:s:u:z:' o "$@"; do
       case "$o" in
         f) modules_conf="$OPTARG";;
         m) modules_list="$OPTARG";;
         s) speed="$OPTARG";;
+        u) suite_postfix="$OPTARG"; suite_postfix_p=true; ;;
         z) zl="$OPTARG";;
       esac
     done
@@ -222,6 +223,7 @@ create_dsc () {
     local suite="$(find_suite $distro)"
     local orig_ver="$(echo "$orig" | sed -e 's/^.*_//' -e 's/\.orig\.tar.*$//')"
     local dver="${orig_ver}-1~${distro}+1"
+    $suite_postfix_p && { suite="${distro}${suite_postfix}"; }
     [ -x "$(which dch)" ] \
       || err "package devscripts isn't installed"
     if [ -n "$modules_conf" ]; then
@@ -319,7 +321,7 @@ build_all () {
   local OPTIND OPTARG
   local orig_opts="" dsc_opts="" deb_opts="" modlist=""
   local archs="" distros="" orig="" depinst=false par=false
-  while getopts 'a:bc:df:ijl:m:no:s:v:z:' o "$@"; do
+  while getopts 'a:bc:df:ijl:m:no:s:u:v:z:' o "$@"; do
     case "$o" in
       a) archs="$archs $OPTARG";;
       b) orig_opts="$orig_opts -b";;
@@ -333,6 +335,7 @@ build_all () {
       n) orig_opts="$orig_opts -n";;
       o) orig="$OPTARG";;
       s) dsc_opts="$dsc_opts -s$OPTARG";;
+      u) dsc_opts="$dsc_opts -u$OPTARG";;
       v) orig_opts="$orig_opts -v$OPTARG";;
       z) orig_opts="$orig_opts -z$OPTARG"; dsc_opts="$dsc_opts -z$OPTARG";;
     esac
@@ -414,6 +417,8 @@ commands:
       Specify existing .orig.tar.xz file
     -s [ paranoid | reckless ]
       Set FS bootstrap/build -j flags
+    -u <suite-postfix>
+      Specify a custom suite postfix
     -v Set version
     -z Set compression level
 
@@ -435,6 +440,8 @@ commands:
       Choose custom list of modules to build
     -s [ paranoid | reckless ]
       Set FS bootstrap/build -j flags
+    -u <suite-postfix>
+      Specify a custom suite postfix
     -z Set compression level
 
   create-orig <treeish>