Constructor.
Takes an array of named parameters to set attributes during construction. Example below.
Package
origin: some_recipe -- Recipe object
name: "hello-bin"
files: {"/usr/bin/hello"}
Package
Package described and built from a Recipe.
Packages dynamically inherit most of their attributes from their Recipe. As a consequence, a way to easily share values between packages is to put them inside their common Recipe.
Recipe |
Atom |
Constructor.
Takes an array of named parameters to set attributes during construction. Example below.
Package
origin: some_recipe -- Recipe object
name: "hello-bin"
files: {"/usr/bin/hello"}
Argument | Type | Description |
---|---|---|
arg | table | Array of named parameters. |
Type | Description | |
---|---|---|
Package |
Package’s name.
Version of the packaged software or content.
Version of the package’s recipe itself.
@release
must always be an integer.
Its minimum legal value is 1.
Short (one-line) description of the packaged software or content.
Long (multi-line) description of the packaged software or content.
Dependencies the package needs to be installed.
Packages that must not be installed at the same time as the generated package.
Virtual packages that this package will provide.
Generic options field for build and packaging modules.
Legacy options for some RPM-based distributions.
List of files that will have to be taken from the fake installation root of the recipe and saved into this package. The recipe’s first package will have an empty list of files, as it will take any file not taken by another package.
The files are represented by paths relative to their fake installation root.
Imports values from another object.
arg
fieldstype | field | description |
---|---|---|
string | name | New name of the package. |
string | version | Version of the packaged software. |
integer | release | Version of the package. |
table | dependencies | A list of Atoms representing the package’s dependencies. |
table | conflicts | A list of conflicts for this package. |
table | provides | A list of virtual packages provided. |
table | buildDependencies | A list of build-time dependencies needed for this package and its recipe. |
table | groups | Legacy option for old RPMs. |
table | options | A list of options to pass to pkgxx modules. |
string | summary | Short description of the packaged software. |
string | description | Long description of the packaged software. |
string | license | License of the packaged software. |
string | copyright | One-line copyright statement to generate debian/copyright. |
string | class | Package class. |
Argument | Type | Description |
---|---|---|
data |
Type | Description | |
---|---|---|
nil |
Creates a package using the package manager module passed as parameter.
Checks that the package has the files it’s supposed to have in @files
.
Argument | Type | Description |
---|---|---|
module | Module | Package manager module. |
Type | Description | |
---|---|---|
true | ||
nil, string |
Type | Description | |
---|---|---|
string | The directory this package will be built in. |
Recipe\packagingDirectory |
Checks the Package possesses any specific option.
Argument | Type | Description |
---|---|---|
option | string | Any arbitrary package option. |
Type | Description | |
---|---|---|
boolean | Whether the package has the given option or not. |
Package.options |
Indicates whether the package’s expected files have been built or not.
This method is meant to be used after Recipe\build has been called.
Type | Description | |
---|---|---|
boolean | Whether the Package can be build with all of its files. |
Recipe\build |
Dynamic inheritance that obtains missing attributes or methods in @recipe
.
The order in which values are accessed is the following: self, class, origin (Recipe).
Argument | Type | Description |
---|---|---|
key | object |
Recipe |
Package can be transformed to a string for debug operations.