~/lfs_packaging is presently used to provide all the packages of my LFS virtual machine. It contains directories whose names match the name of the package the build.sh script within provides. These scripts cannot be manually executed; instead packages are built using autobuild pkg (with the -f option required if the latest version of the package is already installed). That being said, autobuild does have the capacity to install BLFS and LFS packages from the development book instructions, too, but I prefer the custom package script approach as it allows me to easily edit the build commands and set the version of the package as the latest upstream stable release. Consequently, autobuild pkg always defaults to using the ~/lfs_packaging package when one is available.
Most of the build instructions in build.sh scripts are based on LFS and BLFS build instructions; some are based on SlackBuilds developed, by other packagers, to provide the package for Slackware. Some are also based on Arch Linux PKGBUILDs. version= lines in these scripts typically following this algorithm for determining the version:
They determine the latest upstream version from the source archive website of the package.
Failing this, it will use the tags of its git repository.
Failing this, it will use Anitya's API to query the version.
Failing this, it will use tox-wtf's Version Aggregator and Tracker.
Failing this, it will use Arch Linux's PKGBUILD for the package.
Failing this, it will use Artix's versioning for the package.
It may also use NixOS' unstable branch's versioning of the package.
Each time, it fetches one of these versions it will check it against both the installed version of the package and the LFS/BLFS book's version of the package to determine whether the version fetched is newer than the installed version and whether the LFS/BLFS version is newer than the installed version. If it is, the newest of these will be printed. If all of these methods fail, it will just print the installed version and write to ~/logs/failed_versioning.log the time and the name of the package whose upstream versioning failed.