|
| 1 | +# PKGBUILD |
| 2 | + |
| 3 | +PKGBUILD is the Arch Linux package build description file, which we inherit by |
| 4 | +using pacman. See https://man.archlinux.org/man/PKGBUILD.5 for details on the |
| 5 | +format. |
| 6 | + |
| 7 | +We have some minor extensions to the format, which are documented here. |
| 8 | + |
| 9 | +## Extra Metadata |
| 10 | + |
| 11 | +Variables starting with `msys2_` and `mingw_` can be used to add additional metadata to a package, which will be read and used by our tools. The following datatypes are supported: |
| 12 | + |
| 13 | +* Strings: `msys2_myvar="example"` 🠆 `{"myvar": "example"}` |
| 14 | +* Arrays of strings: `msys2_myvar=("example1" "example2")` 🠆 `{"myvar": ["example1", "example2"]}` |
| 15 | +* Mappings of strings to an optional string, separated by `":"`, values are |
| 16 | + stripped: `msys2_myvar=("example1: value1" "example2")` 🠆 `{"myvar": {"example1": "value1", "example2": null}}` |
| 17 | +* Booleans (either `true` or `false`): `msys2_myvar=true` 🠆 `{"myvar": true}` |
| 18 | + |
| 19 | +The following variables are recognized: |
| 20 | + |
| 21 | +* `mingw_arch` - array - a list of MSYS2 environments the package is built |
| 22 | + for. Defaults to an empty list. |
| 23 | +* `msys2_internal` - boolean - whether the package is an internal or meta |
| 24 | + package, and shouldn't be linked to external sources. Defaults to `false`. |
| 25 | +* `msys2_references` - mapping - maps the package to external resources, for |
| 26 | + example other package repositories. Defining a key without a value means there |
| 27 | + is no mapping. The following keys exist: |
| 28 | + * `archlinux` - the Arch Linux package name: https://archlinux.org/packages/ |
| 29 | + * `aur` - the AUR package name: https://aur.archlinux.org/packages |
| 30 | + * `cygwin` - the cygwin package name: https://cygwin.com/packages/src_package_list.html |
| 31 | + * `cygwin-mingw64` - |
| 32 | + the cygwin package name for all packages starting with "mingw64-x86_64-", |
| 33 | + minus that prefix: https://cygwin.com/packages/src_package_list.html |
| 34 | + * `pypi` - the PyPI project name: https://pypi.org/search/ |
| 35 | +* `changelog_url` - string - NEWS file in git or the github releases page. In |
| 36 | + case there are multiple, the one that is more useful for packagers |
| 37 | +* `documentation_url` - string - Documentation for the API, tools, etc. provided, |
| 38 | + in case it's a different website than the homepage. |
| 39 | +* `repository_url` - string - Web view of the repository, e.g. on github or gitlab |
| 40 | +* `issue_tracker_url` - string - The bug tracker, mailing list, etc. |
| 41 | +* `pgp_keys_url` - string - A website containing which keys are used to sign releases |
0 commit comments