everest-build-tools/tools/README.bldr
2023-04-28 13:59:21 -04:00

90 lines
2.5 KiB
Plaintext

+------+
| bldr |
+------+
bldr is a program that builds binary packages from an Everest package. It is intened for system image development.
bldr is compatible with Everest packages. That being said, it's only recommended to build packages designated as bldr compatible.
+--------------+
| Installation |
+--------------+
Copy bldr to a convenient location:
(user)$ cp bldr PROJECT_DIR
Then, copy bldr.conf to either of the following locations:
/etc/bldr.conf
$HOME/.config/bldr.conf
PROJECT_DIR/bldr.conf
+-------+
| Usage |
+-------+
bldr [-h] [-v] [-b] PACKAGE
+-------------------+
| Building packages |
+-------------------+
(user)$ ./bldr -b /path/to/package
It is important to provide the full path.
bldr will compile the package, and install it to $BLDR_OUT_DIR/pkgs/PACKAGE_NAME.
$BLDR_OUT_DIR can be defined in bldr.conf.
After a package has been compiled, you can either import the package-agnostic installation script,
or write your own.
+---------------------------+
| Writing packages for bldr |
+---------------------------+
Everest packages only require slight modification in order to be compatible with bldr.
First, ensure the getsource() function looks similar to this:
getsource() {
command1
command2
cd ${SOURCES[1]}
}
The last command in this function is very important. It MUST be "cd ${SOURCES[1]}", otherwise
bldr will throw an error when a user attempts to build.
It is safe to assume most people using bldr will be cross compiling packages.
In this case, ensure the toolchain is being used. Toolchains will always be located
in $BLDR_OUT_DIR/toolchain.
When configuring a package for compilation, ensure the target triplet matches the
desired system profile. In the case of "x86-musl":
TARGET="x86_64-linux-musl"
ALWAYS install bldr packages to $BLDR_OUT_DIR/pkgs/PACKAGE_NAME
bldr packages must not support system functions.
+-----------+
| Copyright |
+-----------+
(C) 2023 Everest Linux
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program.
If not, see <https://www.gnu.org/licenses/>.