Patchwork [3,of,4,STABLE,ppa] builddeb: add flag for a source-only deb

login
register
mail settings
Submitter Sean Farley
Date April 20, 2016, 11:04 p.m.
Message ID <a6611c79194c52c915f5.1461193464@laptop.office.atlassian.com>
Download mbox | patch
Permalink /patch/14746/
State Accepted
Headers show

Comments

Sean Farley - April 20, 2016, 11:04 p.m.
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1460836907 25200
#      Sat Apr 16 13:01:47 2016 -0700
# Branch stable
# Node ID a6611c79194c52c915f5271a5a604202d968757f
# Parent  f7c47a7944db6dc71fc249f5f8e376e2dcdf6ba8
# EXP-Topic ppa
builddeb: add flag for a source-only deb

This is required for building a ppa for ubuntu which following patches will
use.

Patch

diff --git a/contrib/builddeb b/contrib/builddeb
--- a/contrib/builddeb
+++ b/contrib/builddeb
@@ -8,10 +8,11 @@ 
 
 BUILD=1
 CLEANUP=1
 DISTID=`(lsb_release -is 2> /dev/null | tr '[:upper:]' '[:lower:]') || echo debian`
 CODENAME=`lsb_release -cs 2> /dev/null || echo unknown`
+DEBFLAGS=-b
 while [ "$1" ]; do
     case "$1" in
     --distid )
         shift
         DISTID="$1"
@@ -28,10 +29,14 @@  while [ "$1" ]; do
         ;;
     --build )
         shift
         CLEANUP=
         ;;
+    --source-only )
+        shift
+        DEBFLAGS=-S
+        ;;
     * )
         echo "Invalid parameter $1!" 1>&2
         exit 1
         ;;
     esac
@@ -74,11 +79,11 @@  if [ "$BUILD" ]; then
 
     # remove the node from the version string
     SRCFILE="mercurial_$(echo $debver | sed "s,-$node,,").orig.tar.gz"
     "$PWD/hg" archive $SRCFILE
     mv $SRCFILE ..
-    debuild -us -uc -i -I -b
+    debuild -us -uc -i -I $DEBFLAGS
     if [ $? != 0 ]; then
         echo 'debuild failed!'
         exit 1
     fi