Changes between Version 20 and Version 21 of Obsolete/MovedToTree/PackageManagement/BuildingPackages
- Timestamp:
- Jun 10, 2013, 5:39:19 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Obsolete/MovedToTree/PackageManagement/BuildingPackages
v20 v21 6 6 == Building a Package with the "package" Command == 7 7 8 The package file format is inspecified 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.8 The package file format is 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. 9 9 10 A 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 conveniencethe file itself is added to the archive as well and can be extracted later, but it will be ignored by packagefs.10 An 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 an 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 11 12 12 The `.PackageInfo` file must be located in the top directory that is archived. A `package` invocation usually looks like that: … … 50 50 * `copyrights`: A list of copyrights applying to the software contained in this package. 51 51 * `licenses`: A list of names of the licenses applying to the software contained in this package. 52 * `urls`: A list of URLs referring to the packaged software's project home page. The list elements can be regular URLs or anemail-like named URLs (e.g. "Project Foo <!http://foo.example.com>").52 * `urls`: A list of URLs referring to the packaged software's project home page. The list elements can be regular URLs or email-like named URLs (e.g. "Project Foo <!http://foo.example.com>"). 53 53 * `source-urls`: A list of URLs referring to the packaged software's source code or build instructions. Elements have the same format as those of `urls`. 54 54 * `flags`: A list of boolean flags applying to the package. Can contain any of the following: … … 109 109 The meaning of the major, minor, and micro version parts is vendor specific. A typical, but not universal (!), convention is to increment the major version when breaking binary compatibility (i.e. version a.d.e is backwards compatible to version a.b.c for all b.c <= d.e), to increment the minor version when adding new features (in a binary compatible way), and to increment the micro version for bug fix releases. There are, however, projects that use different conventions which don't imply that e.g. version 1.4 is backwards compatible with version 1.2. Which convention is used is important for the packager to know, as it is required for a correct declaration of the compatibility versions for the provided resolvables. The compatibility version specifies the oldest version the provided resolvable is backwards compatible with, thus implying the version range requested by a dependent package the resolvable can satisfy. When following the aforementioned convention a resolvable of version 2.4.3 should have compatibility version 2 (or, semantically virtually identical, 2.0.0). Not following the convention 2.4 may be correct instead. If no compatibility version is specified, the resolvable can only satisfy dependency constraints with an exactly matching version. 110 110 111 The pre-release part of the version string has aspecial semantics for comparison. Unlike minor and micro its presence makes the version older. E.g. version R1.0~alpha1 is considered to be older than version R1.0. When both version strings have a pre-release part, that part is compared naturally after the micro part (R1.0.1~alpha1 > R1.0 > R1.0~beta1 > R1.0~alpha2).111 The pre-release part of the version string has special semantics for comparison. Unlike minor and micro its presence makes the version older. E.g. version R1.0~alpha1 is considered to be older than version R1.0. When both version strings have a pre-release part, that part is compared naturally after the micro part (R1.0.1~alpha1 > R1.0 > R1.0~beta1 > R1.0~alpha2). 112 112 113 113 The 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. … … 123 123 == Building a Package with "haikuporter" == 124 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 recipe s 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].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 recipe specifies package requirements similar to how it is done in a `.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 126 127 127 === The Build Recipe File === 128 128 129 For 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 aredefined by `haikuporter` before sourcing it.129 For 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 named 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 is defined by `haikuporter` before sourcing it.