Changes between Version 19 and Version 20 of Obsolete/MovedToTree/PackageManagement/BuildingPackages


Ignore:
Timestamp:
Jun 10, 2013, 3:48:01 PM (11 years ago)
Author:
bonefish
Comment:

Beginning of haikuporter documentation

Legend:

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

    v19 v20  
    11= Building Packages =
    22
    3 This page provides information regarding the package building process.
     3This page provides information regarding the package building process. The first section documents building a package with the low level command `package`. The second section gives details on building packages with the `haikuporter` tool.
    44
    55
    6 == Haiku Package Files ==
     6== Building a Package with the "package" Command ==
    77
    8 The 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.
     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 with the `package` command.
    99
    1010A 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.
     
    113113The revision part of the version string is assigned by the packager (not by the vendor). It allows to uniquely identify updated packages of the same vendor version of a software.
    114114
    115 
    116115=== Package File Names ===
    117116
     
    120119file_name       ::= name "-" version "-" architecture ".hpkg"
    121120}}}
     121
     122
     123== Building a Package with "haikuporter" ==
     124
     125`haikuporter` is a high level tool for building packages. As input it reads a build recipe file for a certain version of a software (aka port) and produces one or more packages, as declared in the recipe. A recipes specifies package requirements similar to how it is done in an `.PackageInfo` file. When asked to build a port, `haikuporter` resolves the respective dependencies and recursively builds all not-yet-built ports required for the requested port. `haikuporter` itself and a large library of recipe files are hosted at [http://ports.haiku-files.org/ HaikuPorts].
     126
     127=== The Build Recipe File ===
     128
     129For a particular version of a port a recipe file specifies what packages shall be built for that port and it provides all required information for that purpose. A recipe file is name according to the pattern "<portname>-<version>.recipe". The <version> component complies to `version_ref`, though without the revision component. The revision is specified in the recipe itself. It is incremented whenever the recipe itself or a Haiku specific patch for the port changes. A recipe file is a shell script. It is sourced (shell lingo for included) by `haikuporter`. It must set several shell variables and functions that are interpreted and used by `haikuporter`. A set of other variables and functions that can be used in the recipe are defined by `haikuporter` before sourcing it.