
BYLD: Build Your Linux Disk
License: GPL2 (see LICENSE)

(C) 1999-2000, Erich Roncarolo <erich@roncarolo.eu.org>


--- Wath is a package ---

Since version 1.0, BYLD ./root/ is generated by a BuildRoot, a script that
read a configuration file and put packages in ./root/
A BYLD package is a directory in which some files are present:

./packages/<DistributionName>/<PackageName>/README
./packages/<DistributionName>/<PackageName>/Buildfile
./packages/<DistributionName>/<PackageName>/Depend
...

README		# informations about package.
Buildfile	# a bash script that contains all command to install package.
Depend		# a file in which are listed (one each line) packages which
		#  current package depends on.

Each package depends on Base (except Base itself).


--- How packages are organized ---

Packages are in ./packages/ directory (see PACK_DIR in Config). Above dir is
organized as follows:

./packages/
|
+---+.dep/			# Dependences auxiliary dir
|
+----README			# This file
|
+---+Skel/			# Trivial Package example
|
+---+<DistributionName>/	# Distribution dir
|   |
|   +----+<PackageName>/	# Package dir
|   |
|   +----+<PackageName>/
|   |
|   +----+<PackageName>/
|   |
|   +....
|
+---+<DistributionName>/
|   |
|   +----+<PackageName>/
|   |
|   +----+<PackageName>/
|   |
|   +----+<PackageName>/
|   |
|   +....
|
+---+<DistributionName>/
|   |
|   +----+<PackageName>/
|   |
|   +----+<PackageName>/
|   |
|   +----+<PackageName>/
|   |
|   +....
|
+....


--- What is a Distribution ---

A Distribution is a directory that contains packages, so more packages can
have the same name, but if they are in different distributions, then there is
no conflict.


--- What contains .dep/ directory ---

This dir contains some files that are useful for dependences check.
An example can be useful.
BYLD/Joe package contains joe editor. If you want create a package that
requires an editor, you should put in its Depend file the correct line; an
example of Depend file could be:

BYLD/Base
BYLD/BusyBox
BYLD/Joe

But if you want use another editor (maybe vi), you should change Depend of
each package that requires an editor.
In .dep/ there are some files in which is declared the type of packages.
In above example, we can append MyDistro/Vi in .dep/Editor file and in
Depend file of packages that depends from an editor we can put a generic
Editor dependence:

BYLD/Base
BYLD/BusyBox
Editor

so procedure that checks dependences search also in file .dep/Editor


--- How to make a package ---

To make a package you should only create a dir in a distribution dir and
write 3 files: README, Depend and Buildfile (look in ./packages/Skel/ for a
trivial example).
Look in .dep/: if your package is can be logically used in one category
append its name to the correct file.


--- How to write a Buildfile ---

A Buildfile is a simple bash script. It is sourced (not executed!) by
BuildRoot in ./root/ directory with BuildRoot environment so you can use
following environment variables:
 HOUSE		# BYLD home (complete path)
 PACK_WD	# package work directory (where is Buildfile: complete path)
 RLOG		# logfile (complete path)
You can also use script Take (sourcing it) to search and copy files.
Note: a Buildfile must be a bash script because it's sourced by BuildRoot.
If you want use another kind of executable file, you should execute it from
a bash Buildfile.





Have a lot of fun!

Erich Roncarolo
<erich@roncarolo.eu.org>

