#!/bin/sh
set -e
set -x
su builder -c "../pkg-prep.sh $1"
mount -o remount,size=8G /tmp
systemd-nspawn --console=autopipe -a -M pkg-builder64-$$ --volatile=overlay --bind=/sources \
--overlay=/build-core::/mnt/armlfs \
--bind-ro=/var/lib/pacman/sync:/mnt/armlfs/var/lib/pacman/sync \
--bind=/buildcore64/var/cache/pacman/pkg:/var/cache/pacman/pkg \
-D /buildcore64 $(pwd)/build-in64.sh $(pwd)
../pkg-repo.sh
echo firefox >> ../$CARCH-built-order