-SBUILD = t=\$@; sbuild \\
- --dist=\$\${t%-*} --arch=\$\${t\#*-} \\
- --chroot=\$@ --verbose
-TAGLINES = \\
- while IFS= read -r line; do printf "%s: %s\n" "\$@" "\$\$line"; done
+sbuild-wrap = \\
+ t=\$@; \\
+ host=\$\${t\#\#*/} full=\$\${t%/*}; \\
+ suite=\$\${full%%-*} target=\$\${full\#*-}; \\
+ { echo started >build-status.\$\$full; \\
+ sbuild \\
+ --extra-package=pkgs.\$\$target/ \\
+ --dist=\$\$suite --build=\$\$host --host=\$\$target \\
+ --chroot=\$\$suite-\$\$host --verbose \$1 \$(DSC); \\
+ rc=\$\$?; case \$\$rc in \\
+ 0) echo ok >build-status.\$\$full ;; \\
+ *) echo failed rc=\$\$rc >build-status.\$\$full ;; \\
+ esac; } | \\
+ while IFS= read -r line; do \\
+ printf "%s: %s\n" "\$\$full" "\$\$line"; \\
+ done; \\
+ read st _ <build-status.\$\$full && \\
+ case \$\$st in ok) exit 0 ;; *) exit 1 ;; esac