X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/2a5c4333ed94acad2786f3e31c31648c6dd0e7a0..fe33bda7db1db4ae068a147e16ee70625e7844ad:/bin/mdw-sbuild?ds=sidebyside diff --git a/bin/mdw-sbuild b/bin/mdw-sbuild index f9ceee5..9a9a9d0 100755 --- a/bin/mdw-sbuild +++ b/bin/mdw-sbuild @@ -27,15 +27,15 @@ prog=${0##*/} fail () { echo >&2 "$prog: $*"; exit 1; } -usage () { echo "usage: $prog [-ain] [-k KEYID] [-t TARGET] HOST"; } +usage () { echo "usage: $prog [-ainT] [-k KEYID] [-p DIR] [-t TARGET] [-A DBPARGS] HOST"; } fail_usage () { usage >&2; exit 1; } ###-------------------------------------------------------------------------- ### Parse options. bogusp=nil noactp=nil signp=nil -unset buildopts pkgs -while getopts "haik:np:t:" opt; do +unset buildopts pkgs dbpargs +while getopts "haik:np:t:A:T" opt; do case $opt in h) usage @@ -49,6 +49,8 @@ Options: -n Don't actually do the build. -p DIR Upload additional packages from DIR. -t TARGET Build in TARGET build environment. + -A ARGS Pass ARGS to \`dpkg-buildpackage'. + -T Don't run the tests. EOF exit 0 ;; @@ -58,6 +60,11 @@ EOF n) buildopts="${buildopts+$buildopts }-n" noactp=t ;; p) pkgs=$OPTARG ;; t) buildopts="${buildopts+$buildopts }-t$OPTARG" ;; + A) + buildopts="${buildopts+$buildopts }-A$OPTARG" + dbpargs="${dbpargs+$dbpargs }$OPTARG" + ;; + T) buildopts="${buildopts+$buildopts }-T" ;; *) bogusp=t ;; esac done @@ -88,7 +95,7 @@ case ${ver+t} in t) ;; *) fail "can't figure out the package version" ;; esac ## Build a Debian source package. Don't sign anything yet. That will happen ## at the end, all in one go. -dpkg-buildpackage -S -uc -us -d +dpkg-buildpackage -S -uc -us -d -i $dbpargs cd .. dsc=${pkg}_${ver}.dsc [ -f "$dsc" ] || fail "where is my \`.dsc' file?" @@ -113,3 +120,5 @@ rm $chchch case $signp in t) debsign -k"$keyid" "${pkg}_${ver}_multi.changes" ;; esac + +###----- That's all, folks --------------------------------------------------