Add in the mess from the original symbiosisware version.
[distorted-chroot] / mess / hacks / buildwrap
CommitLineData
fd0f20e1
MW
1#! /bin/sh -ex
2
3## Set up compiler caching. This makes a big difference to build times.
4PATH=/usr/lib/ccache:$PATH; export PATH
5CCACHE_DIR=/build/.ccache; export CCACHE_DIR
6unset CCACHE_HARDLINK
7CCACHE_COMPRESS=t; export CCACHE_COMPRESS
8CCACHE_UMASK=002; export CCACHE_UMASK
9
10## Hack the build options. `sbuild' tries to turn off testing for
11## cross-builds, which is exactly wrong. Turn them back on unless I really
12## want them off.
13old=$DEB_BUILD_OPTIONS new= force_nocheck=nil
14for o in $old; do
15 case $o in x-mdw-nocheck) force_nocheck=t ;; esac
16done
17for o in $old; do
18 include=t
19 case $o in
20 x-mdw-nocheck) include=nil ;;
21 nocheck) include=$force_nocheck ;;
22 esac
23 case $include in
24 t) new=${new:+$new }$o ;;
25 esac
26done
27DEB_BUILD_OPTIONS=$new; export DEB_BUILD_OPTIONS
28
29## Preset the library search path to find the tools version of `fakeroot'.
30for i in /usr/lib/*/libfakeroot; do
31 LD_LIBRARY_PATH=${LD_LIBRARY_PATH+$LD_LIBRARY_PATH:}$i
32done
33export LD_LIBRARY_PATH
34
35## We're ready to go.
36exec "$@"