Changes between Version 1 and Version 2 of Obsolete/MovedToTree/PackageManagement/BuildingPackages


Ignore:
Timestamp:
Jun 25, 2011, 10:17:47 PM (13 years ago)
Author:
bonefish
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Obsolete/MovedToTree/PackageManagement/BuildingPackages

    v1 v2  
    1 = Building Package =
    2 TODO: This page shall document the package building process.
     1= Building Packages =
     2
     3This page provides information regarding the package building process.
     4
     5
     6== Haiku Package Files ==
     7
     8The package file format is in specified in detail in a [wiki:PackageManagement/FileFormat separate document]. This section presents information from the perspective of how to build a package file.
     9
     10A hpkg file is an archive file (just like tar or zip files) that additionally contains package meta information in a separate section of the file. When building a hpkg file via the `package` command the meta information must be provided via a `.PackageInfo` file. For convenience the file itself is added to the archive as well and can be extracted later, but it will be ignored by packagefs.
     11
     12The `.PackageInfo` file must be located in the top directory that is archived. A `package` invocation usually looks like that:
     13{{{
     14package -C foo-4.5.26-1 foo-4.5.26-1.hpkg
     15}}}
     16
     17The argument of the `-C` option specifies the directory whose contents to archive (by default the current directory), the remaining argument is the path of the package file to be built.
     18
     19The contents of the .PackageInfo` contains name-value pairs, with the following simple grammar:
     20{{{
     21package_info    ::= attribute*
     22attribute       ::= name "=" value_list "\n"
     23value_list      ::= value | ( "[" value* "]" )
     24}}}
     25
     26`name` can be one of the attribute names defined below. `value` is either an unquoted string not containing any whitespace characters or a string enclosed in quotation marks (`"`) which can contain whitespace and also escaped characters (using `\`).
     27
     28The supported attributes are:
     29 * `name`: The name of the package, not including the package version. Must only contain `<alphanum_underline>` characters.
     30 * `version`: The version of the package. Must be a string of the following form:
     31{{{
     32version ::= major [ "." minor [ "." micro ] ] "-" release
     33major   ::= alphanum_underline+
     34minor   ::= alphanum_underline+
     35micro   ::= alphanum_underline+
     36release ::= integer_between_0_and_255
     37}}}
     38 * `architecture`: The system architecture the package has been built for. Can be either of:
     39   - `any`: Any architecture (e.g. a documentation package).
     40   - `x86`: Haiku x86, built with gcc 4.
     41   - `x86_gcc2`: Haiku x86, built with gcc 2.
     42 * `summary`: A short (one-line) description of the package.
     43 * `description`: A longer description of the package.
     44 * `vendor`: The name of the person/organization publishing this package.
     45 * `packager`: The name and e-mail address of person that created this package (e.g. "Peter Packman <peter.packman@example.com>").
     46 * `copyright`: The copyright applying to the software contained in this package.
     47 * `copyrights`: A list of copyrights applying to the software contained in this package.
     48 * `licenses`: A list of names of the licenses applying to the software contained in this package.
     49 * `flags`: A list of boolean flags applying to the package. Can contain any of the following:
     50   - `approve_license`: This package's license requires approval (i.e. must be shown to and acknowledged by user before installation).
     51   - `system_package`: This is a system package (i.e. lives under "/boot/system") .
     52 * `provides`: A list of entities provided by this package. The list elements must have the following format:
     53{{{
     54entity          ::= entity_name [ "=" version ]
     55entity_name     ::= [ entity_type ":" ] alphanum_underline+
     56entity_type     ::= alphanum_underline+
     57}}}
     58 * `requires`: A list of entities required by this package. The list elements must have the following format:
     59{{{
     60required_entity         ::= entity_name [ version_operator version ]
     61version_operator        ::= "<" | "<=" | "==" | "!=" | ">=" | ">"
     62}}}
     63 * `supplements`: A list of entities that are supplemented by this package (i.e. this package will automatically be selected for installation if the supplemented entities are already installed). The list elements must have the `required_entity` format.
     64 * `conflicts`: A list of entities that this package conflicts with (i.e. only one of both can be installed at any time). The list elements must have the `required_entity` format.
     65 * `freshens`: A list of entities that are being freshened by this package (i.e. this package will patch one or more files of the package(s) that provide this entity). The list elements must have the `required_entity` format.
     66 * `replaces`: A list of entities that are being replaced by this package (used if the name of a package changes, or if a package has been split). The list elements must have the `entity_name` format.
     67