3 ### Wrapper around `sbuild' builds
5 ### (c) 2018 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the distorted.org.uk chroot maintenance tools.
12 ### distorted-chroot is free software: you can redistribute it and/or
13 ### modify it under the terms of the GNU General Public License as
14 ### published by the Free Software Foundation; either version 2 of the
15 ### License, or (at your option) any later version.
17 ### distorted-chroot is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ### General Public License for more details.
22 ### You should have received a copy of the GNU General Public License
23 ### along with distorted-chroot. If not, write to the Free Software
24 ### Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27 ## Set up compiler caching. This makes a big difference to build times.
28 PATH=/usr/lib/ccache:$PATH; export PATH
29 CCACHE_DIR=/build/.ccache/$SCHROOT_CHROOT_NAME; export CCACHE_DIR
31 CCACHE_COMPRESS=t; export CCACHE_COMPRESS
32 CCACHE_UMASK=002; export CCACHE_UMASK
34 ## Hack the build options. `sbuild' tries to turn off testing for
35 ## cross-builds, which is exactly wrong. Turn them back on unless I really
37 old=$DEB_BUILD_OPTIONS new= force_nocheck=nil
39 case $o in x-mdw-nocheck) force_nocheck=t ;; esac
44 x-mdw-nocheck) include=nil ;;
45 nocheck) include=$force_nocheck ;;
48 t) new=${new:+$new }$o ;;
51 DEB_BUILD_OPTIONS=$new; export DEB_BUILD_OPTIONS
53 ## Preset the library search path to find the tools version of `fakeroot'.
54 for i in /usr/lib/*/libfakeroot; do
55 LD_LIBRARY_PATH=${LD_LIBRARY_PATH+$LD_LIBRARY_PATH:}$i
57 export LD_LIBRARY_PATH