Manual: add 80 column line break suggestion.

Also:
- rework most of the language in the Introduction
- move note about special characters in pkgname or version
- note restrictions to version field are caused partly by xbps-checkvers
- fix indentation of 'maintainer' item
This commit is contained in:
Érico Nogueira 2021-03-31 00:19:13 -03:00 committed by Érico Nogueira Rolim
parent 7eeb51af4c
commit 2f232340db

View file

@ -76,17 +76,19 @@ packages for XBPS, the `Void Linux` native packaging system.
<a id="Introduction"></a> <a id="Introduction"></a>
## Introduction ## Introduction
The `void-packages` repository contains all `source` packages that are the The `void-packages` repository contains all the
recipes to download, compile and build binary packages for `Void`. recipes to download, compile and build binary packages for Void Linux.
Those `source` package files are called `templates`. These `source` package files are called `templates`.
The `template files` are `GNU bash` shell scripts that must define some required/optional The `template` files are shell scripts that define `variables` and `functions`
`variables` and `functions` that are processed by `xbps-src` (the package builder) to be processed by `xbps-src`, the package builder, to generate binary packages.
to generate the resulting binary packages. The shell used by `xbps-src` is GNU bash; `xbps-src` doesn't aim to be
compatible with POSIX `sh`.
By convention, all templates start with a comment briefly explaining what they By convention, all templates start with a comment saying that it is a
are. In addition, pkgname and version can't have any characters in them that `template file` for a certain package. Most of the lines should be kept under 80
would require them to be quoted, so they are not quoted. columns; variables that list many values can be split into new lines, with the
continuation in the next line indented by one space.
A simple `template` example is as follows: A simple `template` example is as follows:
@ -447,10 +449,9 @@ Multiple licenses should be separated by commas, Example: `GPL-3.0-or-later, cus
Note: `MIT`, `BSD`, `ISC` and custom licenses Note: `MIT`, `BSD`, `ISC` and custom licenses
require the license file to be supplied with the binary package. require the license file to be supplied with the binary package.
- `maintainer` A string in the form of `name <user@domain>`. The - `maintainer` A string in the form of `name <user@domain>`. The email for this field
email for this field must be a valid email that you can be reached must be a valid email that you can be reached at. Packages using
at. Packages using `users.noreply.github.com` emails will not be `users.noreply.github.com` emails will not be accepted.
accepted.
- `pkgname` A string with the package name, matching `srcpkgs/<pkgname>`. - `pkgname` A string with the package name, matching `srcpkgs/<pkgname>`.
@ -461,7 +462,12 @@ the generated `binary packages` have been modified.
- `short_desc` A string with a brief description for this package. Max 72 chars. - `short_desc` A string with a brief description for this package. Max 72 chars.
- `version` A string with the package version. Must not contain dashes or underscore - `version` A string with the package version. Must not contain dashes or underscore
and at least one digit is required. Shell's variable substition usage is not allowed. and at least one digit is required. Using bash's pattern substitution and prefix and
suffix matching isn't supported, since this field needs to be parsed by
`xbps-checkvers(1)`. Using variables in this field should be avoided.
Neither `pkgname` or `version` should contain special characters which make it
necessary to quote them, so they shouldn't be quoted in the template.
<a id="optional_vars"></a> <a id="optional_vars"></a>
#### Optional variables #### Optional variables