APKBUILD.5: fix mdoc syntax warnings
This commit is contained in:
parent
e073ce1890
commit
6cc2e53f3f
409
APKBUILD.5
409
APKBUILD.5
|
@ -1,17 +1,11 @@
|
||||||
.Dd February 13, 2018
|
.Dd February 13, 2018
|
||||||
.Dt APKBUILD 5 PRM
|
.Dt APKBUILD 5 PRM
|
||||||
.Os "Alpine Linux"
|
.Os "Alpine Linux"
|
||||||
|
|
||||||
|
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm APKBUILD
|
.Nm APKBUILD
|
||||||
.Nd metadata and instructions to build a package
|
.Nd metadata and instructions to build a package
|
||||||
|
|
||||||
|
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm /usr/src/packages/<repo>/<package>/APKBUILD
|
.Nm /usr/src/packages/<repo>/<package>/APKBUILD
|
||||||
|
|
||||||
|
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
An
|
An
|
||||||
.Nm
|
.Nm
|
||||||
|
@ -19,10 +13,11 @@ file is used by tools such as
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
to build a package for eventual installation by the
|
to build a package for eventual installation by the
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
package manager. It defines metadata such as the name of the package, the
|
package manager.
|
||||||
version information, the source license, and contact information for the
|
It defines metadata such as the name of the package, the version information,
|
||||||
developer. It additionally contains the commands needed to build, test, and
|
the source license, and contact information for the developer.
|
||||||
install the package.
|
It additionally contains the commands needed to build, test, and install the
|
||||||
|
package.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
|
@ -30,34 +25,34 @@ format is similar to a typical shell script; you set pre-defined variables and
|
||||||
implement pre-defined functions, and the
|
implement pre-defined functions, and the
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
(or similar) utility will use them to create the package.
|
(or similar) utility will use them to create the package.
|
||||||
|
|
||||||
|
|
||||||
.Ss Required Variables
|
.Ss Required Variables
|
||||||
The following variables must be set in all
|
The following variables must be set in all
|
||||||
.Nm
|
.Nm
|
||||||
files:
|
files:
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Cm pkgname
|
.It Cm pkgname
|
||||||
Specifies name of the package. This is typically the name of the package
|
Specifies name of the package.
|
||||||
upstream; however, note that all letters must be lowercased.
|
This is typically the name of the package upstream; however, note that all
|
||||||
|
letters must be lowercased.
|
||||||
.Pp
|
.Pp
|
||||||
Libraries for scripting languages should have a prefix before the library name
|
Libraries for scripting languages should have a prefix before the library name
|
||||||
describing the language. Such prefixes include
|
describing the language.
|
||||||
|
Such prefixes include
|
||||||
.Em lua- ,
|
.Em lua- ,
|
||||||
.Em perl- ,
|
.Em perl- ,
|
||||||
.Em py- ,
|
.Em py- ,
|
||||||
and
|
and
|
||||||
.Em rb- .
|
.Em rb- .
|
||||||
Not all languages use prefixes. For a definitive list, consult the PREFIXES
|
Not all languages use prefixes.
|
||||||
file in the root directory of the repository you are using for packaging.
|
For a definitive list, consult the PREFIXES file in the root directory of the
|
||||||
|
repository you are using for packaging.
|
||||||
.It Cm pkgver
|
.It Cm pkgver
|
||||||
Specifies the version of the software being packaged. The version of a package
|
Specifies the version of the software being packaged.
|
||||||
must consist of one or more numbers separated by the radix (decimal point).
|
The version of a package must consist of one or more numbers separated by the
|
||||||
|
radix (decimal point).
|
||||||
The final number may have a single letter following it, for upstreams that use
|
The final number may have a single letter following it, for upstreams that use
|
||||||
such a versioning scheme (such as 1.5a, 1.5b, 1.5c).
|
such a versioning scheme (such as 1.5a, 1.5b, 1.5c).
|
||||||
|
.Pp
|
||||||
After the final number (and optional single letter), a suffix may be appended,
|
After the final number (and optional single letter), a suffix may be appended,
|
||||||
which must be an underscore (_) followed by one of
|
which must be an underscore (_) followed by one of
|
||||||
.Em alpha ,
|
.Em alpha ,
|
||||||
|
@ -70,7 +65,8 @@ which must be an underscore (_) followed by one of
|
||||||
.Em hg ,
|
.Em hg ,
|
||||||
or
|
or
|
||||||
.Em p ,
|
.Em p ,
|
||||||
optionally followed by another number. If the suffix is
|
optionally followed by another number.
|
||||||
|
If the suffix is
|
||||||
.Em alpha ,
|
.Em alpha ,
|
||||||
.Em beta ,
|
.Em beta ,
|
||||||
.Em pre ,
|
.Em pre ,
|
||||||
|
@ -85,132 +81,121 @@ is
|
||||||
or
|
or
|
||||||
.Em p ,
|
.Em p ,
|
||||||
it is considered to be later than the version without a suffix.
|
it is considered to be later than the version without a suffix.
|
||||||
|
|
||||||
All of the following examples are valid versions, in order from lowest to
|
All of the following examples are valid versions, in order from lowest to
|
||||||
highest:
|
highest:
|
||||||
|
.Pp
|
||||||
1.0, 1.1_alpha2, 1.1.3_pre, 1.1.3, 1.1.3_hg, 1.2, 1.2a, 1.2b
|
1.0, 1.1_alpha2, 1.1.3_pre, 1.1.3, 1.1.3_hg, 1.2, 1.2a, 1.2b
|
||||||
|
|
||||||
.It Cm pkgrel
|
.It Cm pkgrel
|
||||||
Specifies the package release number of this particular package version. This
|
Specifies the package release number of this particular package version.
|
||||||
indicates when a package has changed without a corresponding change in version.
|
This indicates when a package has changed without a corresponding change in
|
||||||
|
version.
|
||||||
Always increment
|
Always increment
|
||||||
.Cm pkgrel
|
.Cm pkgrel
|
||||||
when you change the contents, dependencies, or metadata of a package. The
|
when you change the contents, dependencies, or metadata of a package.
|
||||||
first release of a package is always
|
The first release of a package is always
|
||||||
.Li 0 .
|
.Li 0 .
|
||||||
|
|
||||||
.It Cm pkgdesc
|
.It Cm pkgdesc
|
||||||
Specifies what the package contains.
|
Specifies what the package contains.
|
||||||
.Cm pkgdesc
|
.Cm pkgdesc
|
||||||
must be 128 characters or less, and should concisely describe what actions the
|
must be 128 characters or less, and should concisely describe what actions the
|
||||||
software or items being packaged will allow the user to perform. For example,
|
software or items being packaged will allow the user to perform.
|
||||||
.Li Dq Fully-featured word processor with spell check and many plugins
|
For example,
|
||||||
|
.Dq Fully-featured word processor with spell check and many plugins
|
||||||
would be a sufficient
|
would be a sufficient
|
||||||
.Cm pkgdesc
|
.Cm pkgdesc
|
||||||
for AbiWord.
|
for AbiWord.
|
||||||
|
|
||||||
.It Cm url
|
.It Cm url
|
||||||
Specifies the Web address of the package's upstream. This allows users and
|
Specifies the Web address of the package's upstream.
|
||||||
future maintainers to find documentation, release information, and contact
|
This allows users and future maintainers to find documentation, release
|
||||||
information for the package. If no Web address is available for the package,
|
information, and contact information for the package.
|
||||||
you must set
|
If no Web address is available for the package, you must set
|
||||||
.Cm url
|
.Cm url
|
||||||
to an empty string ("").
|
to an empty string ("").
|
||||||
|
|
||||||
.It Cm arch
|
.It Cm arch
|
||||||
Specifies the architectures for which the package may be built. It is highly
|
Specifies the architectures for which the package may be built.
|
||||||
recommended that you set this variable to "all" if the package is portable.
|
It is highly recommended that you set this variable to "all" if the package is
|
||||||
|
portable.
|
||||||
|
.Pp
|
||||||
You may use "noarch" if the package does not contain any architecture-specific
|
You may use "noarch" if the package does not contain any architecture-specific
|
||||||
binary files - that is, any files that are compiled for the target only. Such
|
binary files - that is, any files that are compiled for the target only.
|
||||||
packages may include pure Python packages, shell script packages, and JARs. If
|
Such packages may include pure Python packages, shell script packages, and
|
||||||
you are not sure what this means, using "all" is safe.
|
JARs.
|
||||||
|
If you are not sure what this means, using "all" is safe.
|
||||||
.It Cm license
|
.It Cm license
|
||||||
Specifies the license under which the package is distributed. The value
|
Specifies the license under which the package is distributed.
|
||||||
provided must match a SPDX license identifier.
|
The value provided must match a SPDX license identifier.
|
||||||
|
|
||||||
.It Cm source
|
.It Cm source
|
||||||
Specifies the location of both local and remote source files used to build the
|
Specifies the location of both local and remote source files used to build the
|
||||||
package. Typically, the remote source file(s) or archive(s) is specified,
|
package.
|
||||||
followed by any local patches, install scripts, configuration files, or other
|
Typically, the remote source file(s) or archive(s) is specified, followed by
|
||||||
necessary files.
|
any local patches, install scripts, configuration files, or other necessary
|
||||||
|
files.
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Ss Optional Variables
|
.Ss Optional Variables
|
||||||
The following variables are not required, but may be set in any
|
The following variables are not required, but may be set in any
|
||||||
.Nm
|
.Nm
|
||||||
file:
|
file:
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Cm checkdepends
|
.It Cm checkdepends
|
||||||
Specifies test-time dependencies of the package. Common packages that are
|
Specifies test-time dependencies of the package.
|
||||||
used for testing include check, dejagnu, and perl-test-command.
|
Common packages that are used for testing include check, dejagnu, and
|
||||||
|
perl-test-command.
|
||||||
.It Cm depends
|
.It Cm depends
|
||||||
Specifies the run-time dependencies of the package. The
|
Specifies the run-time dependencies of the package.
|
||||||
|
The
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
utility will automatically scan the resultant package for shared library (.so)
|
utility will automatically scan the resultant package for shared library (.so)
|
||||||
dependencies; do not specify them here.
|
dependencies; do not specify them here.
|
||||||
|
|
||||||
.It Cm install
|
.It Cm install
|
||||||
Specifies install scripts for the package, if any. See
|
Specifies install scripts for the package, if any.
|
||||||
|
See
|
||||||
.Sx Install Scripts
|
.Sx Install Scripts
|
||||||
for more information about install scripts.
|
for more information about install scripts.
|
||||||
|
|
||||||
.It Cm install_if
|
.It Cm install_if
|
||||||
Specifies a condition when
|
Specifies a condition when
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
should automatically install the package (or subpackage). For instance, the
|
should automatically install the package (or subpackage).
|
||||||
OpenRC subpackages set
|
For instance, the OpenRC subpackages set
|
||||||
.Cm install_if
|
.Cm install_if
|
||||||
to
|
to
|
||||||
.Li Dq $pkgname=$pkgver openrc
|
.Li $pkgname=$pkgver openrc
|
||||||
which means that the OpenRC subpackage will be automatically installed if the
|
which means that the OpenRC subpackage will be automatically installed if the
|
||||||
origin package and OpenRC are both installed on the same computer.
|
origin package and OpenRC are both installed on the same computer.
|
||||||
|
|
||||||
.It Cm makedepends
|
.It Cm makedepends
|
||||||
Specifies build dependencies for the package.
|
Specifies build dependencies for the package.
|
||||||
|
|
||||||
.It Cm pkggroups
|
.It Cm pkggroups
|
||||||
Specifies a space-separated list of login groups to create during build-time.
|
Specifies a space-separated list of login groups to create during build-time.
|
||||||
Note that you will need to create the login groups in a pre-install install
|
Note that you will need to create the login groups in a pre-install install
|
||||||
script as well; see
|
script as well; see
|
||||||
.Sx Install Scripts
|
.Sx Install Scripts
|
||||||
for more information about install scripts.
|
for more information about install scripts.
|
||||||
|
|
||||||
.It Cm pkgusers
|
.It Cm pkgusers
|
||||||
Specifies a space-separated list of user logins to create during build-time.
|
Specifies a space-separated list of user logins to create during build-time.
|
||||||
Note that you will ned to create the user logins in a pre-install install
|
Note that you will ned to create the user logins in a pre-install install
|
||||||
script as well; see
|
script as well; see
|
||||||
.Sx Install Scripts
|
.Sx Install Scripts
|
||||||
for more information about install scripts.
|
for more information about install scripts.
|
||||||
|
|
||||||
.It Cm provides
|
.It Cm provides
|
||||||
Specifies that the package "provides" the same contents as another package.
|
Specifies that the package "provides" the same contents as another package.
|
||||||
There are two formats that you may use for
|
There are two formats that you may use for
|
||||||
.Cm provides :
|
.Cm provides :
|
||||||
a provider name, and a provider name with version.
|
a provider name, and a provider name with version.
|
||||||
|
.Pp
|
||||||
Specifying a provider name with version such as
|
Specifying a provider name with version such as
|
||||||
.Li Dq foobar=1.2
|
.Li foobar=1.2
|
||||||
will cause the package to be an "alias" of foobar version 1.2. It will be
|
will cause the package to be an "alias" of foobar version 1.2.
|
||||||
automatically installed if a user then runs
|
It will be automatically installed if a user then runs
|
||||||
.Li apk add foobar
|
.Li apk add foobar
|
||||||
or similar, and it will conflict with a package named foobar.
|
or similar, and it will conflict with a package named foobar.
|
||||||
|
.Pp
|
||||||
Specifying a provider name without a version such as
|
Specifying a provider name without a version such as
|
||||||
.Li Dq baz
|
.Li baz
|
||||||
will cause the package to provide a "virtual" called baz. Multiple packages
|
will cause the package to provide a "virtual" called baz.
|
||||||
with the same virtual provider can be installed on a system; however, if a user
|
Multiple packages with the same virtual provider can be installed on a system;
|
||||||
runs
|
however, if a user runs
|
||||||
.Li apk add baz
|
.Li apk add baz
|
||||||
they will provided a list of packages that provide baz and must select one and
|
they will provided a list of packages that provide baz and must select one and
|
||||||
install it.
|
install it.
|
||||||
|
|
||||||
.It Cm provider_priority
|
.It Cm provider_priority
|
||||||
Specifies the numeric value for
|
Specifies the numeric value for
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
|
@ -218,25 +203,24 @@ to use for the package when considering which provider should be installed for
|
||||||
the same
|
the same
|
||||||
.Cm provides
|
.Cm provides
|
||||||
virtual provider.
|
virtual provider.
|
||||||
|
|
||||||
.It Cm replaces
|
.It Cm replaces
|
||||||
Specifies packages that the package replaces. This is typically used for
|
Specifies packages that the package replaces.
|
||||||
packages renamed by upstream.
|
This is typically used for packages renamed by upstream.
|
||||||
|
|
||||||
.It Cm subpackages
|
.It Cm subpackages
|
||||||
Specifies subpackages or split packages built with this package. Typically,
|
Specifies subpackages or split packages built with this package.
|
||||||
this will include
|
Typically, this will include
|
||||||
.Li Dq $pkgname-dev
|
.Li $pkgname-dev
|
||||||
for development files (such as /usr/include and static library files) and
|
for development files (such as /usr/include and static library files) and
|
||||||
.Li Dq $pkgname-doc
|
.Li $pkgname-doc
|
||||||
for documentation (such as /usr/share/doc and /usr/share/man).
|
for documentation (such as /usr/share/doc and /usr/share/man).
|
||||||
|
.Pp
|
||||||
Each subpackage may be specified using three different methods. The first, and
|
Each subpackage may be specified using three different methods.
|
||||||
most common, is
|
The first, and most common, is
|
||||||
.Li Dq $pkgname-foo
|
.Li $pkgname-foo
|
||||||
where
|
where
|
||||||
.Li foo
|
.Li foo
|
||||||
is the name of the split function specified later in the file. Similar to the
|
is the name of the split function specified later in the file.
|
||||||
|
Similar to the
|
||||||
.Cm package
|
.Cm package
|
||||||
function, the
|
function, the
|
||||||
.Li foo
|
.Li foo
|
||||||
|
@ -248,18 +232,18 @@ to
|
||||||
.Pa $subpkgdir
|
.Pa $subpkgdir
|
||||||
after creating
|
after creating
|
||||||
.Pa $subpkgdir .
|
.Pa $subpkgdir .
|
||||||
|
.Pp
|
||||||
The second method is to simply call the subpackage
|
The second method is to simply call the subpackage
|
||||||
.Li Dq foo
|
.Li foo
|
||||||
which will create a package called
|
which will create a package called
|
||||||
.Li foo
|
.Li foo
|
||||||
instead of pkgname-foo.
|
instead of pkgname-foo.
|
||||||
|
.Pp
|
||||||
However,
|
However,
|
||||||
.Li foo
|
.Li foo
|
||||||
in both of these examples cannot contain a hyphen, as shell function names
|
in both of these examples cannot contain a hyphen, as shell function names
|
||||||
cannot have hyphens in them. In this case, the third method may be used:
|
cannot have hyphens in them. In this case, the third method may be used:
|
||||||
.Li Dq foo:funcname
|
.Li foo:funcname
|
||||||
where
|
where
|
||||||
.Li foo
|
.Li foo
|
||||||
is the name of the subpackage and
|
is the name of the subpackage and
|
||||||
|
@ -267,11 +251,12 @@ is the name of the subpackage and
|
||||||
is the name of the shell function in the
|
is the name of the shell function in the
|
||||||
.Nm
|
.Nm
|
||||||
that creates it.
|
that creates it.
|
||||||
|
.Pp
|
||||||
Note that an additional colon may be used to specify an architecture for the
|
Note that an additional colon may be used to specify an architecture for the
|
||||||
subpackage; typically, this is used for marking miscellaneous files that are
|
subpackage; typically, this is used for marking miscellaneous files that are
|
||||||
not architecture-specific as noarch. For example,
|
not architecture-specific as noarch.
|
||||||
.Li Dq $pkgname-doc $pkgname-foo $pkgname-foo-misc:foo_misc:noarch
|
For example,
|
||||||
|
.Li $pkgname-doc $pkgname-foo $pkgname-foo-misc:foo_misc:noarch
|
||||||
will create the $pkgname-doc package using the
|
will create the $pkgname-doc package using the
|
||||||
.Cm doc
|
.Cm doc
|
||||||
function, the $pkgname-foo package using the
|
function, the $pkgname-foo package using the
|
||||||
|
@ -279,68 +264,61 @@ function, the $pkgname-foo package using the
|
||||||
function, and the $pkgname-foo-misc package using the
|
function, and the $pkgname-foo-misc package using the
|
||||||
.Cm foo_misc
|
.Cm foo_misc
|
||||||
function and set $pkgname-foo-misc as noarch.
|
function and set $pkgname-foo-misc as noarch.
|
||||||
|
|
||||||
.It Cm triggers
|
.It Cm triggers
|
||||||
Specifies a trigger script used by the package. A trigger script is a shell
|
Specifies a trigger script used by the package.
|
||||||
script that is called whenever monitored files or directories are modified.
|
A trigger script is a shell script that is called whenever monitored files or
|
||||||
|
directories are modified.
|
||||||
You may specify the paths to monitor using the triggers variable as follows:
|
You may specify the paths to monitor using the triggers variable as follows:
|
||||||
|
.Pp
|
||||||
.Li Dq $pkgname.trigger=/usr/share/man:/usr/local/share/man
|
.Li $pkgname.trigger=/usr/share/man:/usr/local/share/man
|
||||||
|
.Pp
|
||||||
This will run the package trigger script whenever files in
|
This will run the package trigger script whenever files in
|
||||||
.Pa /usr/share/man
|
.Pa /usr/share/man
|
||||||
or
|
or
|
||||||
.Pa /usr/local/share/man
|
.Pa /usr/local/share/man
|
||||||
are created, modified, or removed.
|
are created, modified, or removed.
|
||||||
|
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Ss options
|
.Ss options
|
||||||
The
|
The
|
||||||
.Cm options
|
.Cm options
|
||||||
variable allows you to set parameters for the package at build time. There are
|
variable allows you to set parameters for the package at build time.
|
||||||
a number of valid options you may set, and you may set multiple options by
|
There are a number of valid options you may set, and you may set multiple
|
||||||
inserting a space between each one.
|
options by writing a space between each one.
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Cm !archcheck
|
.It Cm !archcheck
|
||||||
Specifies that the package contains binaries that cannot run on the target
|
Specifies that the package contains binaries that cannot run on the target
|
||||||
architecture. This is primarily used for packages containing firmware, and
|
architecture.
|
||||||
should typically never need to be used.
|
This is primarily used for packages containing firmware, and should typically
|
||||||
|
never need to be used.
|
||||||
.It Cm charset.alias
|
.It Cm charset.alias
|
||||||
Specifies that the package ships a /usr/lib/charset.alias file and that it
|
Specifies that the package ships a /usr/lib/charset.alias file and that it
|
||||||
should be installed on the user's system. This is almost never the case. Do
|
should be installed on the user's system.
|
||||||
not use this option.
|
This is almost never the case.
|
||||||
|
Do not use this option.
|
||||||
.It Cm !check
|
.It Cm !check
|
||||||
Specifies that the package will not run a test suite. The reason for disabling
|
Specifies that the package will not run a test suite.
|
||||||
the check phase should be noted in a comment.
|
The reason for disabling the check phase should be noted in a comment.
|
||||||
|
|
||||||
.It Cm !checkroot
|
.It Cm !checkroot
|
||||||
Specifies that the package's test suite will be run as a non-privileged user
|
Specifies that the package's test suite will be run as a non-privileged user
|
||||||
instead of using
|
instead of using
|
||||||
.Xr fakeroot 8 .
|
.Xr fakeroot 8 .
|
||||||
This is necessary for some test suites which fail when run as root.
|
This is necessary for some test suites which fail when run as root.
|
||||||
|
|
||||||
.It Cm !dbg
|
.It Cm !dbg
|
||||||
Specifies that the package should not be built with a debug information
|
Specifies that the package should not be built with a debug information
|
||||||
package. This is the default unless
|
package.
|
||||||
|
This is the default unless
|
||||||
.Ev DEFAULT_DBG
|
.Ev DEFAULT_DBG
|
||||||
is set in the environment or
|
is set in the environment or
|
||||||
.Xr abuild.conf 5 .
|
.Xr abuild.conf 5 .
|
||||||
It is typically used on packages that do not generate debug information (such
|
It is typically used on packages that do not generate debug information (such
|
||||||
as pure Python packages) or packages that do not support debug information
|
as pure Python packages) or packages that do not support debug information
|
||||||
packages.
|
packages.
|
||||||
|
|
||||||
.It Cm !fhs
|
.It Cm !fhs
|
||||||
Specifies that the package violates FHS and installs to a location such as
|
Specifies that the package violates FHS and installs to a location such as
|
||||||
.Pa /usr/local ,
|
.Pa /usr/local ,
|
||||||
.Pa /opt ,
|
.Pa /opt ,
|
||||||
or
|
or
|
||||||
.Pa /srv .
|
.Pa /srv .
|
||||||
|
|
||||||
.It Cm ldpath-recursive
|
.It Cm ldpath-recursive
|
||||||
Specifies that
|
Specifies that
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
|
@ -349,99 +327,84 @@ should use the
|
||||||
argument to
|
argument to
|
||||||
.Xr scanelf 1
|
.Xr scanelf 1
|
||||||
when attempting to find shared library (.so) dependencies for the package.
|
when attempting to find shared library (.so) dependencies for the package.
|
||||||
|
|
||||||
.It Cm libtool
|
.It Cm libtool
|
||||||
Specifies that the package requires its libtool (.la) files. They will not be
|
Specifies that the package requires its libtool (.la) files.
|
||||||
automatically removed by
|
They will not be automatically removed by
|
||||||
.Xr abuild 1 .
|
.Xr abuild 1 .
|
||||||
|
|
||||||
.It Cm net
|
.It Cm net
|
||||||
Specifies that the package build system requires access to a network. This is
|
Specifies that the package build system requires access to a network.
|
||||||
discouraged and an issue should be filed with the package's authors.
|
This is discouraged and an issue should be filed with the package's authors.
|
||||||
|
|
||||||
.It Cm !strip
|
.It Cm !strip
|
||||||
Specifies that
|
Specifies that
|
||||||
.Xr strip 1
|
.Xr strip 1
|
||||||
should not be run on any of the package's binaries. This is automatically
|
should not be run on any of the package's binaries.
|
||||||
implied if the -dbg subpackage is enabled, or if you are using
|
This is automatically implied if the -dbg subpackage is enabled, or if you are
|
||||||
|
using
|
||||||
.Ev DEFAULT_DBG .
|
.Ev DEFAULT_DBG .
|
||||||
|
|
||||||
.It Cm suid
|
.It Cm suid
|
||||||
Specifies that binaries in the package may be installed set-uid. This is a
|
Specifies that binaries in the package may be installed set-uid.
|
||||||
security risk and it is highly recommended to use capabilities or process
|
This is a security risk and it is highly recommended to use capabilities or
|
||||||
separation instead of set-uid where available.
|
process separation instead of set-uid where available.
|
||||||
|
|
||||||
.It Cm textrels
|
.It Cm textrels
|
||||||
Specifies that the package's binaries are known to contain relocations against
|
Specifies that the package's binaries are known to contain relocations against
|
||||||
text segments. By default,
|
text segments.
|
||||||
|
By default,
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
will refuse to create such a package because this is a security concern.
|
will refuse to create such a package because this is a security concern.
|
||||||
|
|
||||||
.It Cm toolchain
|
.It Cm toolchain
|
||||||
Specifies that the package is part of the base toolchain set and may depend
|
Specifies that the package is part of the base toolchain set and may depend
|
||||||
on packages like
|
on packages like
|
||||||
.Li g++ .
|
.Li g++ .
|
||||||
|
|
||||||
.It Cm !tracedeps
|
.It Cm !tracedeps
|
||||||
Specifies that
|
Specifies that
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
should not automatically populate
|
should not automatically populate
|
||||||
.Cm depends
|
.Cm depends
|
||||||
with shared library (.so) or symlink target dependencies.
|
with shared library (.so) or symlink target dependencies.
|
||||||
|
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Ss Automatic Variables
|
.Ss Automatic Variables
|
||||||
The following variables are defined for you by
|
The following variables are defined for you by
|
||||||
.Xr abuild 1 ,
|
.Xr abuild 1 ,
|
||||||
but may be overridden if necessary.
|
but may be overridden if necessary.
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Cm builddir
|
.It Cm builddir
|
||||||
Specifies the directory where the source code of the package will be built.
|
Specifies the directory where the source code of the package will be built.
|
||||||
The default value is
|
The default value is
|
||||||
.Pa $srcdir/$pkgname-$pkgver
|
.Pa $srcdir/$pkgname-$pkgver
|
||||||
which is appropriate for most source distributions. If the source tarball does
|
which is appropriate for most source distributions.
|
||||||
not create a $pkgname-$pkgver directory when it is unpacked, you must override
|
If the source tarball does not create a $pkgname-$pkgver directory when it is
|
||||||
|
unpacked, you must override
|
||||||
.Cm builddir .
|
.Cm builddir .
|
||||||
|
|
||||||
.It Cm pkgdir
|
.It Cm pkgdir
|
||||||
Specifies the directory where the built files will be installed. Typically,
|
Specifies the directory where the built files will be installed.
|
||||||
you will call
|
Typically, you will call
|
||||||
.Li Dq make DESTDIR="$pkgdir" install
|
.Li make DESTDIR="$pkgdir" install
|
||||||
or similar to install the files. The default value is
|
or similar to install the files.
|
||||||
|
The default value is
|
||||||
.Pa $startdir/pkg
|
.Pa $startdir/pkg
|
||||||
and you should not modify this variable.
|
and you should not modify this variable.
|
||||||
|
|
||||||
.It Cm srcdir
|
.It Cm srcdir
|
||||||
Specifies the directory where the files specified in
|
Specifies the directory where the files specified in
|
||||||
.Cm source
|
.Cm source
|
||||||
are downloaded and unpacked. The default value is
|
are downloaded and unpacked.
|
||||||
|
The default value is
|
||||||
.Pa $startdir/src
|
.Pa $startdir/src
|
||||||
and you should not need to modify this.
|
and you should not need to modify this.
|
||||||
|
|
||||||
.It Cm startdir
|
.It Cm startdir
|
||||||
Specifies the directory where the
|
Specifies the directory where the
|
||||||
.Nm
|
.Nm
|
||||||
file resides.
|
file resides.
|
||||||
|
|
||||||
.It Cm subpkgdir
|
.It Cm subpkgdir
|
||||||
Specifies the directory where the subpackage's files should be placed. This
|
Specifies the directory where the subpackage's files should be placed.
|
||||||
variable is only set inside subpackage functions.
|
This variable is only set inside subpackage functions.
|
||||||
|
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Ss Special Variables
|
.Ss Special Variables
|
||||||
The following variables are used only in special circumstances, and may be
|
The following variables are used only in special circumstances, and may be
|
||||||
required or optional depending on their usage and the contents of other
|
required or optional depending on their usage and the contents of other
|
||||||
variables.
|
variables.
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Cm depends_dev
|
.It Cm depends_dev
|
||||||
Specifies the run-time dependencies of the -dev subpackage.
|
Specifies the run-time dependencies of the -dev subpackage.
|
||||||
|
|
||||||
.It Cm giturl
|
.It Cm giturl
|
||||||
Specifies the URL of the Git repository to use with
|
Specifies the URL of the Git repository to use with
|
||||||
.Cm abuild checkout .
|
.Cm abuild checkout .
|
||||||
|
@ -451,32 +414,27 @@ specified by appending
|
||||||
where
|
where
|
||||||
.Cm branch
|
.Cm branch
|
||||||
is the branch to checkout.
|
is the branch to checkout.
|
||||||
|
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Ss Functions
|
.Ss Functions
|
||||||
Functions specified here may be present in any
|
Functions specified here may be present in any
|
||||||
.Nm
|
.Nm
|
||||||
file, but with the exception of
|
file, but with the exception of
|
||||||
.Cm package ,
|
.Cm package ,
|
||||||
are not strictly required.
|
are not strictly required.
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Cm fetch
|
.It Cm fetch
|
||||||
This function is called to download the remote files in
|
This function is called to download the remote files in
|
||||||
.Cm source .
|
.Cm source .
|
||||||
|
|
||||||
.It Cm unpack
|
.It Cm unpack
|
||||||
This function unpacks any archives in
|
This function unpacks any archives in
|
||||||
.Cm source
|
.Cm source
|
||||||
to
|
to
|
||||||
.Ev srcdir .
|
.Ev srcdir .
|
||||||
|
|
||||||
.It Cm prepare
|
.It Cm prepare
|
||||||
Prepares the source in
|
Prepares the source in
|
||||||
.Ev srcdir
|
.Ev srcdir
|
||||||
to be built. The default
|
to be built.
|
||||||
|
The default
|
||||||
.Cm prepare
|
.Cm prepare
|
||||||
function ensures the build directories are set up correctly and applies any
|
function ensures the build directories are set up correctly and applies any
|
||||||
*.patch files specified in
|
*.patch files specified in
|
||||||
|
@ -486,19 +444,17 @@ You must call
|
||||||
if you write a custom
|
if you write a custom
|
||||||
.Cm prepare
|
.Cm prepare
|
||||||
function.
|
function.
|
||||||
|
|
||||||
.It Cm build
|
.It Cm build
|
||||||
Compiles the source in
|
Compiles the source in
|
||||||
.Ev builddir .
|
.Ev builddir .
|
||||||
You must implement this function yourself. If no compilation is required, you
|
You must implement this function yourself.
|
||||||
may omit it.
|
If no compilation is required, you may omit it.
|
||||||
|
|
||||||
.It Cm check
|
.It Cm check
|
||||||
Runs the package's test suite. This function must be implemented unless
|
Runs the package's test suite.
|
||||||
.Li Dq !check
|
This function must be implemented unless
|
||||||
|
.Li !check
|
||||||
was specified in
|
was specified in
|
||||||
.Cm options .
|
.Cm options .
|
||||||
|
|
||||||
.It Cm package
|
.It Cm package
|
||||||
Installs the package into
|
Installs the package into
|
||||||
.Ev pkgdir .
|
.Ev pkgdir .
|
||||||
|
@ -508,116 +464,101 @@ is not created for you; if this package installs no files (for example, a
|
||||||
metapackage), you must use
|
metapackage), you must use
|
||||||
.Li mkdir -p "$pkgdir"
|
.Li mkdir -p "$pkgdir"
|
||||||
to skip the package phase.
|
to skip the package phase.
|
||||||
|
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Ss Install Scripts
|
.Ss Install Scripts
|
||||||
An install script is run when an action is taken on a package by
|
An install script is run when an action is taken on a package by
|
||||||
.Xr apk 8 .
|
.Xr apk 8 .
|
||||||
An install script must be written in shell and must have a
|
An install script must be written in shell and must have a
|
||||||
.Li Dq #!/bin/sh
|
.Li #!/bin/sh
|
||||||
interpreter declaration as the first line. The
|
interpreter declaration as the first line.
|
||||||
|
The
|
||||||
.Cm install
|
.Cm install
|
||||||
variable must contain the install scripts needed by the package.
|
variable must contain the install scripts needed by the package.
|
||||||
|
.Pp
|
||||||
The install script will be run inside the root filesystem where the package is
|
The install script will be run inside the root filesystem where the package is
|
||||||
being installed. A single argument will be passed to all scripts, which is the
|
being installed.
|
||||||
version of the package being currently installed (or deinstalled). The
|
A single argument will be passed to all scripts, which is the version of the
|
||||||
pre-upgrade and post-upgrade scripts will have an additional second argument,
|
package being currently installed (or deinstalled).
|
||||||
which specifies the version of the package before the upgrade process.
|
The pre-upgrade and post-upgrade scripts will have an additional second
|
||||||
|
argument, which specifies the version of the package before the upgrade
|
||||||
|
process.
|
||||||
|
.Pp
|
||||||
The different actions that may have install scripts specified are as follows:
|
The different actions that may have install scripts specified are as follows:
|
||||||
|
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Ic $pkgname.pre-install
|
.It Ic $pkgname.pre-install
|
||||||
Executed before the package is installed. If this script exits with an error
|
Executed before the package is installed.
|
||||||
(non-zero exit code),
|
If this script exits with an error (non-zero exit code),
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
will halt the installation and the package will not be installed. This install
|
will halt the installation and the package will not be installed.
|
||||||
script is typically used to create any users or groups needed as described in
|
This install script is typically used to create any users or groups needed as
|
||||||
|
described in
|
||||||
.Cm pkggroups
|
.Cm pkggroups
|
||||||
and
|
and
|
||||||
.Cm pkgusers .
|
.Cm pkgusers .
|
||||||
|
|
||||||
.It Ic $pkgname.post-install
|
.It Ic $pkgname.post-install
|
||||||
Executed after the package is installed. If this script exits with an error
|
Executed after the package is installed.
|
||||||
(non-zero exit code),
|
If this script exits with an error (non-zero exit code),
|
||||||
.Xr apk 8
|
|
||||||
will mark the package as broken. The
|
|
||||||
.Li apk fix
|
|
||||||
command will attempt to re-run the post-install script if this occurs.
|
|
||||||
|
|
||||||
.It Ic $pkgname.pre-upgrade
|
|
||||||
Executed before the package is upgraded. If this script exits with an error
|
|
||||||
(non-zero exit code),
|
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
will mark the package as broken.
|
will mark the package as broken.
|
||||||
|
The
|
||||||
.It Ic $pkgname.post-upgrade
|
.Li apk fix
|
||||||
Executed after the package is upgraded. If this script exits with an error
|
command will attempt to re-run the post-install script if this occurs.
|
||||||
(non-zero exit code),
|
.It Ic $pkgname.pre-upgrade
|
||||||
|
Executed before the package is upgraded.
|
||||||
|
If this script exits with an error (non-zero exit code),
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
will mark the package as broken. The
|
will mark the package as broken.
|
||||||
|
.It Ic $pkgname.post-upgrade
|
||||||
|
Executed after the package is upgraded.
|
||||||
|
If this script exits with an error (non-zero exit code),
|
||||||
|
.Xr apk 8
|
||||||
|
will mark the package as broken.
|
||||||
|
The
|
||||||
.Li apk fix
|
.Li apk fix
|
||||||
command will attempt to re-run the post-upgrade script if this occurs.
|
command will attempt to re-run the post-upgrade script if this occurs.
|
||||||
|
|
||||||
.It Ic $pkgname.pre-deinstall
|
.It Ic $pkgname.pre-deinstall
|
||||||
Executed before the package is removed from the system. If this script exits
|
Executed before the package is removed from the system.
|
||||||
with an error (non-zero exit code),
|
If this script exits with an error (non-zero exit code),
|
||||||
.Xr apk 8
|
.Xr apk 8
|
||||||
will not remove the package from the system.
|
will not remove the package from the system.
|
||||||
|
|
||||||
.It Ic $pkgname.post-deinstall
|
.It Ic $pkgname.post-deinstall
|
||||||
Executed after the package is removed from the system. Exiting with an error
|
Executed after the package is removed from the system.
|
||||||
will have no effect.
|
Exiting with an error will have no effect.
|
||||||
|
|
||||||
.El
|
.El
|
||||||
|
|
||||||
|
|
||||||
.Sh IMPLEMENTATION NOTES
|
.Sh IMPLEMENTATION NOTES
|
||||||
Currently,
|
Currently,
|
||||||
.Nm
|
.Nm
|
||||||
files are sourced as normal shell scripts. This may change at a later date.
|
files are sourced as normal shell scripts. This may change at a later date.
|
||||||
|
|
||||||
|
|
||||||
.Sh COMPATIBILITY
|
.Sh COMPATIBILITY
|
||||||
The
|
The
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
utility as distributed by Alpine uses the BusyBox Almquist shell, a part of
|
utility as distributed by Alpine uses the BusyBox Almquist shell, a part of
|
||||||
.Xr busybox 1
|
.Xr busybox 1
|
||||||
that is currently undocumented. It is mostly compliant with
|
that is currently undocumented.
|
||||||
|
It is mostly compliant with
|
||||||
.St -p1003.2 ,
|
.St -p1003.2 ,
|
||||||
with some bash-like extensions. The
|
with some bash-like extensions.
|
||||||
|
The
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
utility as distributed by Adélie uses the user's preferred /bin/sh, which is
|
utility as distributed by Adélie uses the user's preferred /bin/sh, which is
|
||||||
typically
|
typically
|
||||||
.Xr bash 1 .
|
.Xr bash 1 .
|
||||||
|
|
||||||
|
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
|
||||||
SPDX license reference (on the Web at <https://spdx.org/licenses/>),
|
SPDX license reference (on the Web at <https://spdx.org/licenses/>),
|
||||||
.Xr abuild 1 ,
|
.Xr abuild 1 ,
|
||||||
.Xr newapkbuild 1 ,
|
.Xr newapkbuild 1 ,
|
||||||
.Xr apk 8 .
|
.Xr apk 8 .
|
||||||
|
|
||||||
|
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
format and
|
format and
|
||||||
.Xr abuild 1
|
.Xr abuild 1
|
||||||
utility first appeared in Alpine Linux 1.9.
|
utility first appeared in Alpine Linux 1.9.
|
||||||
|
|
||||||
|
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An Timo Teräs Aq Mt timo.teras@iki.fi
|
.An Timo Teräs Aq Mt timo.teras@iki.fi
|
||||||
.An Natanael Copa Aq Mt ncopa@alpinelinux.org
|
.An Natanael Copa Aq Mt ncopa@alpinelinux.org
|
||||||
|
.Pp
|
||||||
Documentation:
|
Documentation:
|
||||||
.An A. Wilcox Aq Mt awilfox@adelielinux.org
|
.An A. Wilcox Aq Mt awilfox@adelielinux.org
|
||||||
|
|
||||||
|
|
||||||
.\" .Sh BUGS
|
.\" .Sh BUGS
|
||||||
.\" if we end up finding bugs that should be documented, put them here.
|
.\" if we end up finding bugs that should be documented, put them here.
|
||||||
|
|
Loading…
Reference in New Issue