Kaydet (Commit) 0687ff5f authored tarafından sulincix's avatar sulincix

documentation

üst e4bcccb1
MODDIR
=====
Include order : *api -> modules -> unibuild file -> host -> target -> hooks*
Moddir included unibuild **modules**, **api**, **hooks**, **target** and **host** directories.
Modules
^^^^^
Unibuild modules in here. modules included and called before unibuild files. Defining main functins and detecting target and host functions in here. Also default fallback variables defined here. Unibuild require **_fetch** function for getting sources. Other functions are optional.
Api
^^
Unibuild helper function defined here. Included before unibuild files. All functions are optional. Modules can use api functions.
Hooks
^^^
Hook functions included after unibuild files so override unibuild files. you don't have to define unibuild function or variable in here. All hook functions are optional.
Target
^^^^
Target functions are package manager specific functions. More detail : doc/development/target.rst
Host
^^^^
Host functions are distribution specific functions. More detail : doc/development/host.rst
unibuildrc file
========
Firstly imported file. **$HOME/.unibuildrc**
All unibuild functions override unibuildrc file.
Create new host
=================
Host file must be within **host/** directory. For auto detecting host, you should edit **modules/autohost** file.
Only **_get_build_deps** function needed. We must use **builddepends** array con check and install build dependencies.
for example:
.. code-block:: shell
_get_build_deps(){
needed="" #missing package list
for i in ${builddepends[@]}
do
[ -f /info/$i ] || needed="$needed $i"
done
if [ "$needed" != "" ] ; then
err "Missing: $needed"
.... # package installation command or exit
fi
}
#!/bin/bash
_get_build_deps(){
needed=""
for i in ${builddepends}
for i in ${builddepends[@]}
do
[ -f /info/$i ] || needed="$needed $i"
done
......
#!/bin/bash
[ -f $HOME/.unibuildrc ] && source $HOME/.unibuildrc
[ "$MODDIR" == "" ] && export MODDIR=/usr/lib/unibuild/modules
set -e
for api in $(ls $MODDIR/../api | sort) ; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment