8 test "$#" = 2 || die "usage: $0 <architecture> <package>"
11 if ! dpkg-architecture "-a$HOST_ARCH" >/dev/null 2>&1; then
12 die "$HOST_ARCH is not a valid architecture"
14 BUILDTMP=$(mktemp -d) || die "failed to create temporary directory"
19 cd "$BUILDTMP" || die "failed to cd to tmpdir"
20 export SBUILD_CONFIG="$BUILDTMP/sbuild.conf"
21 cat >"$SBUILD_CONFIG" <<'EOF'
25 $distribution = "unstable";
26 $build_profiles = "cross nocheck";
27 $manual_depends = ["libc-dev", "libstdc++-dev"];
28 $dpkg_buildpackage_user_options = ["--jobs-try=1"];
29 $bd_uninstallable_explainer = "apt";
30 $source_only_changes = 0;
33 $lintian_opts = ["-T", "binary-from-other-architecture,triplet-dir-and-architecture-mismatch"];
34 #$lintian_require_success = 1;
38 $sbuild_mode = "user";
42 sbuild "--host=$HOST_ARCH" "$PACKAGE" >/dev/null || RET=$?
44 test -L "$f" && continue
45 test -f "$f" || continue
46 # poor substitute for missing $lintian_require_success.
47 if tail -n20 "$f" | grep -q "^Lintian: fail$"; then