Add support for schroot builds

This commit is contained in:
bones_was_here 2023-10-15 21:11:59 +10:00
parent 4624719114
commit 7fbdf50544
No known key found for this signature in database
GPG Key ID: 982FE90EDA930528
2 changed files with 10 additions and 3 deletions

View File

@ -31,7 +31,8 @@ export CACHEDIR=$HOME/.xonotic-cached-converter-crunch
export dds_tool=crunch
# Build locally.
export HOSTS_THAT_ARE_MYSELF='xonotic-build-linux64 xonotic-build-win32 xonotic-build-win64 xonotic-build-osx'
export HOSTS_THAT_ARE_MYSELF='xonotic-build-win32 xonotic-build-win64 xonotic-build-osx'
export HOSTS_THAT_ARE_SCHROOT='xonotic-build-linux64'
mepwd=$PWD
me=$0

View File

@ -215,6 +215,7 @@ case "$cmd" in
srcdir=$5
depsdir=$6
targetfiles=$7
schroot=
set -x
if [ -z "$targetfiles" ]; then
exit
@ -224,13 +225,18 @@ case "$cmd" in
exit
;;
esac
case " $HOSTS_THAT_ARE_MYSELF " in
case " $HOSTS_THAT_ARE_SCHROOT " in
*\ $host\ *)
schroot="schroot -c $host --"
;;
esac
case " $HOSTS_THAT_ARE_MYSELF $HOSTS_THAT_ARE_SCHROOT " in
*\ $host\ *)
verbose rsync --delete -zLvaSHP "$srcdir"/ "$buildpath/"
verbose rsync --delete -zLvaSHP misc/logos/icons_ico/xonotic.ico "$buildpath"/darkplaces.ico
verbose rsync --delete -zLvaSHP "$depsdir"/*/ "$buildpath.deps/"
verbose ln -snf "$buildpath.deps" "$buildpath/.deps"
verbose eval make -C "$buildpath" clean $maketargets $makeflags
verbose eval $schroot make -C "$buildpath" clean $maketargets $makeflags
for f in $targetfiles; do
verbose mv "$buildpath/${f%:*}" "${f##*:}" || true
done