[Wileyfox Swift 2 ROMs, Kernels, Recoveries, & Othe] robi0800:
This is the Room service and the script I use, but you also need certain packages as defined here

https://xdaforums.com/t/guide-linux-manjaro-arch-how-to-set-up-android-build-environment.3300596/

!/bin/bash

## Build Script for lineage Rom
## Android Build

# Specify colors utilized in the terminal

txtrst="\e[0m"
bold="\e[1m"

red="\e[31m"
grn="\e[32m"
ylw="\e[33m"
blu="\e[34m"
ppl="\e[35m"
cya="\e[36m"
bldred="${bold}\e[31m"
bldgrn="${bold}\e[32m"
bldyel="${bold}\e[33m"
bldblu="${bold}\e[34m"
bldppl="${bold}\e[35m"
bldcya="${bold}\e[36m"

echo -e ${bldgrn}
read -p "Press [Enter] key when ready to Continue ..."
echo -e "Build Script for lineage Rom"
echo -e ${txtrst}

# Set Build Constants
cd ~/

# FORMATS THE TIME
function format_time() {
MINS=$(((${1}-${2})/60))
SECS=$(((${1}-${2})%60))
if [[ ${MINS} -ge 60 ]]; then
HOURS=$((${MINS}/60))
MINS=$((${MINS}%60))
fi

if [[ ${HOURS} -eq 1 ]]; then
TIME_STRING+="1 Hour, "
elif [[ ${HOURS} -ge 2 ]]; then
TIME_STRING+="${HOURS} Hours, "
fi

if [[ ${MINS} -eq 1 ]]; then
TIME_STRING+="1 Minute"
else
TIME_STRING+="${MINS} Minutes"
fi

if [[ ${SECS} -eq 1 && -n ${HOURS} ]]; then
TIME_STRING+=", AND 1 Second"
elif [[ ${SECS} -eq 1 && -z ${HOURS} ]]; then
TIME_STRING+=" AND 1 Second"
elif [[ ${SECS} -ne 1 && -n ${HOURS} ]]; then
TIME_STRING+=", AND ${SECS} Seconds"
elif [[ ${SECS} -ne 1 && -z ${HOURS} ]]; then
TIME_STRING+=" AND ${SECS} Seconds"
fi

echo "Rom Buid Time" ${TIME_STRING}
}

# Set Program Constants

export CCACHE_DIR=~/Build/.ccache_lineage
export USE_CCACHE=1
export CCACHE_EXEC=/usr/bin/ccache
ccache -M 50

echo "all constants set"

cd ~/Build
# Short cuts & Repo

if [ -d ~/Build/lineage ]
then
echo "Repo not Needed"
else
echo " Installing Repo"
git config --global user.email robin0800@hotmail.co.uk
git config --global user.name robin0800
mkdir -p ~/Build/lineage
cd ~/Build/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
fi

# Check for local manifest--add-to-archive

if [ -f ~/Build/lineage/.repo/local_manifests/roomservice.xml ]
then
echo "local manifests exists"
else
echo "local manifests does not exist ......Generating"
mkdir ~/Build/lineage/.repo/local_manifests
cp ~/Build/android/marmite17/roomservice.xml ~/Build/lineage/.repo/local_manifests/
echo "local manifests has been Added"
fi

# Repo Sync
cd ~/Build/lineage
repo sync -c --force-sync --no-tags --no-clone-bundle -j10

# Make Clean
echo -e ${bldgrn}"Cleaning Rom Build System"
make clean

source build/envsetup.sh

echo -e ${txtrst}

breakfast marmite

# Build Rom

# Setup environment
echo -e ""
echo -e ""
echo -e "Setting up build environment..."
echo -e ""
echo -e ""

# Get intial time of compilation starting

START="$(date +%s)"

# Start compilation

echo -e ${bldgrn} " Starting compilation of lineage ROM..."
echo -e ${txtrst}

MAKE="bacon"
MAKE="mka ${MAKE}"
eval "${MAKE}" 2>&1 | tee

# Get elapsed time

END="$(date +%s)"
format_time ${END} ${START}

if [ -f stats.txt ]
then
rm stats.txt
fi
cat <<EOT >> stats.txt
Rom Build time ${TIME_STRING} on $(date +"%A %e %B %l:%M %P")
EOT

if [ -f ~/Build/lineage/out/target/product/marmite/system/etc/NOTICE.xml.gz ]
then
echo -e ${bldgrn} "Rom is OK"
else
echo -e ${bldred} "Rom build Failed"
fi

echo -e ${bldgrn}
read -p "Press [Enter] key when ready to Continue ..."

echo -e "sleep 10 seconds .... then exit"
echo -e ${txtrst}
sleep 10
exit