X-Git-Url: https://git.madduck.net/code/mbuild.git/blobdiff_plain/30ae46aab50796388cc5a4db807c7e3d872ad57c..bc0fe05f73724a39893e01f76db97416b4088152:/sbuild-wrapper.sh diff --git a/sbuild-wrapper.sh b/sbuild-wrapper.sh index 243587d..8d00787 100755 --- a/sbuild-wrapper.sh +++ b/sbuild-wrapper.sh @@ -54,7 +54,7 @@ usage() echo echo "Valid options are:" cat <<-_eof | column -s\& -t - --dist & specify the target distribution (default: sid) + --dist & specify the target distribution (default: from changes file) --arch & specify the target architecture (default: $DEB_BUILD_ARCH) -sa & pass --force-orig-source to sbuild -B & do a binary-only build @@ -67,13 +67,11 @@ binonly=0 sbuild_args= schangesfile= arch= -dist= for opt in "$@"; do case "$opt" in -h|--help) usage; exit 0;; -V|--version) about; exit 0;; --arch=*) arch="${opt#--arch=}";; - --dist=*) dist="${opt#--dist=}";; -sa) sbuild_args="${sbuild_args:+$sbuild_args }--force-orig-source";; -B) binonly=1;; --*) sbuild_args="${sbuild_args:+$sbuild_args }$opt";; @@ -103,7 +101,8 @@ if [ -z "$schangesfile" ]; then fi [ -z "$arch" ] && arch="$DEB_BUILD_ARCH" -[ -z "$dist" ] && dist="unstable" + +dist="$(sed -ne 's,Distribution: ,,p' "$schangesfile")" schangesfile_basename="${schangesfile##*/}" packagenameversion="${schangesfile_basename%_*}" @@ -124,11 +123,11 @@ sbuild $sbuild_args --arch="$arch" --dist="$dist" --keyid=$KEYID \ changesfile="${packagenameversion}_${arch}.changes" -mv "$changesfile" "${changesfile}.binonly" -mergechanges "$schangesfile" "${changesfile}.binonly" > "$changesfile" -rm "${changesfile}.binonly" "$schangesfile" +mergechanges "$schangesfile" "$changesfile" > temp-combined.changes +mv temp-combined.changes "$changesfile" +changestool "$changesfile" updatechecksums -#TODO sign here +#sign_changes_file "$changesfile" dinstall "$dist" "$changesfile"