Package builds are performed in a chroot populated by the portbuild script using the ${arch}/${branch}/builds/${buildid}/bindist.tar file.
The following command builds a world from the ${arch}/${branch}/builds/${buildid}/src/ tree and installs it into ${worlddir}. The tree will be updated first unless -nocvs is specified.
/var/portbuild# scripts/makeworld ${arch} ${branch} ${buildid} [-nocvs]
The bindist.tar tarball is created from the previously installed world by the mkbindist script. It should be run as root with the following command:
/var/portbuild# scripts/mkbindist ${arch} ${branch} ${buildid}
The per-machine tarballs are located in ${arch}/clients.
The bindist.tar file is extracted onto each client at client boot time, and at the start of each pass of the dopackages script.