source: trunk/debathena/scripts/sbuildhack @ 25792

Revision 25792, 907 bytes checked in by jdreed, 12 years ago (diff)
Update for sbuild 0.62.6: - sbuild no longer passes its configuration as environment variables (e.g. SBUILD_BUILD_CONF_DISTRIBUTION). Replace this functionality with our own variable, DEBATHENA_BUILD_DIST - update chroot-sources to use DEBATHENA_BUILD_DIST and fallback to guessing intelligently, rather than constructing invalid sources.list files - update sbuildhack to set the new environment variable (this also requires that the variable be filtered in ~/.sbuildrc) - update daschroot and do-build to set the new environment variable instead of the old one.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# Wrapper around sbuild.  The main purpose is to append a
4# distribution-dependent string like "~ubuntu7.10" to the binary
5# package version
6
7# This script us normally run as "da sbuildhack filename.dsc".
8
9# This script will skip dists listed in ./nobuild.
10
11usage() {
12    echo "Usage: $0 <dist>-<arch> ..." >&2
13    exit 1
14}
15
16: ${DA_SCRIPTS_DIR="$(dirname "$0")"}
17. "$DA_SCRIPTS_DIR"/debian-versions.sh
18
19dist_arch=$1; shift
20if [ -z "$dist_arch" ]; then usage; fi
21IFS=- read dist arch <<EOF
22$dist_arch
23EOF
24if [ -z "$dist" ] || [ -z "$arch" ]; then usage; fi
25
26if [ -e nobuild ] && fgrep -q "$dist" nobuild; then
27  echo "Skipping $dist since it is listed in ./nobuild."
28  exit
29fi
30
31env DEBATHENA_BUILD_DIST="$dist" \
32sbuild --append-to-version=`gettag "$dist"` \
33        -d "$dist" --arch="$arch" \
34        --apt-update --apt-distupgrade \
35        --setup-hook="$(readlink -f "$DA_SCRIPTS_DIR/chroot-sources")" \
36        -v "$@"
Note: See TracBrowser for help on using the repository browser.