1) The BUILD_CHROOT global variable contains a list of packages that the chroot_build_packages function takes as arguments.
https://github.com/The-going/armbian-build/blob/a99d4c51ff5592995ffe3098220a56b737d93ec6/lib/chroot-buildpackages.sh#L172
2) Next, the find utility searches for the full path for the configuration file of the corresponding name.
https://github.com/The-going/armbian-build/blob/a99d4c51ff5592995ffe3098220a56b737d93ec6/lib/chroot-buildpackages.sh#L251
- Then, in the for loop, the configuration file is read and becomes part of the script for the period of one cycle.
https://github.com/The-going/armbian-build/blob/a99d4c51ff5592995ffe3098220a56b737d93ec6/lib/chroot-buildpackages.sh#L260
It contains local variables and functions necessary for operation. Example:
leo@vm-jammy:~/armbian$ cat packages/extras-buildpkgs/90-hostapd-realtek.conf
# hostapd-realtek
local package_name="hostapd-realtek"
local package_repo="http://w1.fi/hostap.git"
local package_ref="tag:hostap_2_5"
local package_upstream_version="3:2.5-4"
local package_install_target="hostapd-realtek"
local package_component="${release}-utils"
package_checkbuild()
{
true
}
package_checkinstall()
{
false
}
package_repo - the repository will be cloned from the address
package_ref - the corresponding tag will be extracted to the working directory. You can specify a branch:master.
package_upstream_version - If it exists, then during the build process, the package version will be installed larger than this one.
In order for your assembled package to be newer than the one that exists in the system.
package_checkbuild() - a function that checks various conditions and returns true or false. If false, the package will be skipped and will not be built.
package_install_target - A strange entity. Must contain a name. By which the existence of the collected package is checked.
If it exists then the build is skipped. To rebuild a package, you must first delete it.
package_component - the template is part of the path where the built package will be moved
package_checkinstall - If true, then the newly built package will be installed before the next package is built.
3) NCPU_CHROOT - A global variable that contains the number of dedicated processors for building a package in a chroot environment.
Can be defined at the very beginning. If not defined then it will be equal to 2