summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2012-03-11 12:20:21 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2012-03-11 12:20:21 +0000
commitbb148654a3991699c86a411542a0bc1b181c1e46 (patch)
treead792586eb906dec7b3762146aa0aba626c26d06
parent023f64b73179bcca412557c7fc2c63400e3fd647 (diff)
Support overriding sbuild target
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@504 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xsbuild-override-dist-obfsproxy13
-rwxr-xr-xsbuild-stuff29
2 files changed, 32 insertions, 10 deletions
diff --git a/sbuild-override-dist-obfsproxy b/sbuild-override-dist-obfsproxy
new file mode 100755
index 0000000..e72eddf
--- /dev/null
+++ b/sbuild-override-dist-obfsproxy
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+dist="$1"
+dsc="$2"
+
+case "$dist" in
+ lenny)
+ echo SKIP
+ ;;
+ squeeze)
+ echo squeeze-backports
+ ;;
+esac
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