summaryrefslogtreecommitdiff
path: root/sbuild-stuff
diff options
context:
space:
mode:
Diffstat (limited to 'sbuild-stuff')
-rwxr-xr-xsbuild-stuff29
1 files changed, 19 insertions, 10 deletions
diff --git a/sbuild-stuff b/sbuild-stuff
index 8890c68..af08124 100755
--- a/sbuild-stuff
+++ b/sbuild-stuff
@@ -55,6 +55,18 @@ fi
metadata="$(get_metadata "$DSC")"
read dscdist debian_version <<< "$metadata"
+sourcepkg="$(grep-dctrl -n -s Source '' "$DSC")"
+
+if [ -z "${ARCH:-}" ]; then
+ if [ "`uname -m`" = "x86_64" ]; then
+ ARCH="amd64"
+ elif [ "`uname -m`" = "i386" ] || [ "`uname -m`" = "i686" ]; then
+ ARCH="i386"
+ else
+ echo >&2 "Do not know arch"
+ exit 1
+ fi
+fi
if [ -z "${DIST:-}" ]; then
DIST=sid
@@ -64,18 +76,15 @@ if [ -z "${DIST:-}" ]; then
break
fi
done
+ if command -v "sbuild-override-dist-$sourcepkg" >/dev/null 2>&1; then
+ NEWDIST=$("sbuild-override-dist-$sourcepkg" "$DIST" "$DSC" "$ARCH")
+ [ -z "$NEWDIST" ] || DIST="$NEWDIST"
+ fi
fi
-
-if [ -z "${ARCH:-}" ]; then
- if [ "`uname -m`" = "x86_64" ]; then
- ARCH="amd64"
- elif [ "`uname -m`" = "i386" ] || [ "`uname -m`" = "i686" ]; then
- ARCH="i386"
- else
- echo >&2 "Do not know arch"
- exit 1
- fi
+if [ "$DIST" = "SKIP" ] ;then
+ echo "skipping build for $DSC because DIST is $DIST."
+ exit 0
fi
if [ "$BINARCH" = 1 ]; then