1. Directory structure

2. Control file naming conventions

There are three kind of file names in the root of a package source directory:

By convention, the name of the file reflects in which group they are:

3. Control files

3.1. global-list

3.1.1. Makefile

3.1.2. Files

+ shell globbing

3.1.3. Arch

3.1.4. Relations

This file is available only as a global-list and can not be replaced by a specific file.

Each line defines a relation for one of the subpackages. Fields are saprated by whitespace. The first field is the name of the subpackage, the second field is the type of relation, the remaining part of the line describes the relation. If there are multiple lines of the same type for the same subpackage, the logical relation between those entries are AND. A relation is described with a list of || separated relation items; if there are multiple relation items within a line, the logical relation between them is OR. A relation item is a package name and an optional version info in the form of operator vernum where operator is one of ==, !=, < >, <= >= (with their ANSI C meaning).

Available relation types are:

3.1.5. Alternative

3.1.6. Tags

This file is available only as a global-list and can not be replaced by a specific file.

Each line defines a tag for one of the subpackages. Fields are saprated by whitespace. The first field is the name of the subpackage, the second field is tag key, the third field is tag value.

Tag keys start with alpha and contain only alnum, colon and underscore characters. Tag values may contain alnum, undescore, dash, period. Neither key or value may be empty.

3.2. global-generic

3.2.1. pkginfo

Rarely present; used from global-generic pkginfo or specific $subpackage.pkginfo. Plain text file, each line containing a key|value pair that's simply appended to the package's pkginfo file, after the auto-generated lines.

3.2.2. build-depends

Each line of the file defines a build-depend relation for the whole package (including all subpackages), in the form specified for Relations above. The package is build only if these dependencies are statisfied.

3.3. specific

$subpackage is the name of the subpackage, the first field in Arch and Files. Yes, this is "_" for the main package, so files like _.alternatives are normal.

3.2.1. $subpackage.pkginfo

See at global-generic pkginfo.