PKGBUILD - Arch. Wiki. This article discusses variables definable by the maintainer in a PKGBUILD. For information on the PKGBUILD functions and creating packages in general, refer to Creating packages. Also read man PKGBUILD. When makepkg is run, it searches for a PKGBUILD file in the current directory and follows the instructions therein to either compile or otherwise acquire the files to build a package archive (pkgname. The resulting package contains binary files and installation instructions, readily installable with pacman.
However, this is not mandatory, as long as correct Bash syntax is used. If not specified, the first element in the pkgname array is used. The variable is not allowed to begin with a hyphen. All values for split packages default to the global ones given in the PKGBUILD. Everything, except #makedepends, #Sources, and #Integrity variables can be overridden within each split package's package() function. This should consist of lowercase alphanumerics and any of the following characters: @, ., . Names are not allowed to start with hyphens. For the sake of consistency, pkgname should match the name of the source tarball of the software: for instance, if the software is in foobar- 2. The name of the directory containing the PKGBUILD should also match the pkgname. This should be the same as the version released by the author of the package. It can contain letters, numbers, periods and underscores, but not a hyphen (- ). If the author of the software uses one, replace it with an underscore (. If the pkgver variable is used later in the PKGBUILD, then the underscore can easily be substituted for a hyphen, e. ISO 8. 60. 1 format). Otherwise it will not appear as a newer version. I have updated the PKGBUILD file for it. With the following simple patch, 0.9.0 seems to work well.--- PKGBUILD 2016-07-30 14:46:01.240103642 +0900. PKGBUILD # Maintainer: OK100 <ok100 at lavabit dot com> # Previous Maintainer: Val What exactly is PKGBUILD and should I edit it when installing packages? The release number. This is usually a positive integer number that allows to differentiate between consecutive builds of the same version of a package. As fixes and additional features are added to the PKGBUILD that influence the resulting package, the pkgrel should be incremented by 1. When a new version of the software is released, this value must be reset to 1. In exceptional cases other formats can be found in use, such as major. This value is required to be a positive integer; the default is 0. It is used when the version numbering scheme of a package changes (or is alphanumeric), breaking normal version comparison logic. For example. epoch=1. See pacman(8) for more information on version comparisons. This is recommended to be 8. For example, use pkgdesc=. Arch officially supports only i. Please note that, as this is intended for packages that can be built once and used on any architecture, it will cause the package to be labeled - any as opposed to - i. The licenses package contains many commonly used licenses, which are installed to /usr/share/licenses/common. If a package is licensed under one of these licenses, the value should be set to the directory name, e. If the appropriate license is not included, several things must be done. Add custom to the license array. Optionally, you can replace custom with custom: name of license. Once a license is used in two or more packages in an official repository (including . Install the license in: /usr/share/licenses/pkgname/, e. If the license is only found in a website, then you need to separately include it in the package. The BSD, MIT, zlib/png and Python licenses are special cases and could not be included in the licenses package. For the sake of the license array, it is treated as a common license (license=('BSD'), license=('MIT'), license=('ZLIB') and license=('Python')), but technically each one is a custom license, because each one has its own copyright line. Any packages licensed under these four should have its own unique license stored in /usr/share/licenses/pkgname. Some packages may not be covered by a single license. In these cases, multiple entries may be made in the license array, e. For (L)GPL software, the convention is. L)GPL . However, upstream should be contacted about the conditions under which the software is (and is not) available. Tip: Some software authors do not provide separate license file and describe distribution rules in section of common Read. Me. txt. This information can be extracted to a separate file during build() with something like sed - n '/This software/,/ thereof./p' Read. Me. txt > LICENSEgroups. The group the package belongs in. For instance, when installing the kdebase package, it installs all packages belonging in that group. Version restrictions can be specified with comparison operators, e. For instance, if a package foo depends on both bar and baz, and the bar package depends in turn on baz too, baz does not need to be included in foo's depends array. This may imply that not all executables provided by a package will function without the respective optdepends. The minimum dependency version can be specified in the same format as in the depends array. The packages in the depends array are implicitly required to build the package, they should not be duplicated here. Members of this group should not be included in makedepends array. An array of packages that the software depends on to run its test suite, but are not needed at runtime. Packages in this list follow the same format as depends. These dependencies are only considered when the check() function is present and is to be run by makepkg. Members of this group should not be included in checkdepends array. Package relations Note: Additional architecture- specific arrays can be added by appending an underscore and the architecture name, e. Packages providing the same item can be installed side- by- side, unless at least one of them uses a conflicts array. For instance, a modified qt package version 3. Do not add pkgname to the provides array, as it is done automatically. An array of packages that conflict with, or cause problems with the package, if installed. All these packages and packages providing this item will need to be removed. The version properties of the conflicting packages can also be specified in the same format as the depends array. When syncing, pacman will immediately replace an installed package upon encountering another package with the matching replaces in the repositories. If providing an alternate version of an already existing package or uploading to the AUR, use the conflicts and provides arrays, which are only evaluated when actually installing the conflicting package. Similarly, when the package is removed, user- modified files will be preserved as file. Rn command. To set an option, include the name in the array. To reverse the default behavior, place an ! This should be the same as pkgname. The script contains the following functions which run at different times. One argument is passed: new package version. One argument is passed: new package version. Two arguments are passed in the following order: new package version, old package version. Two arguments are passed in the following order: new package version, old package version. One argument is passed: old package version. One argument is passed: old package version. Each function is run chrooted inside the pacman install directory. This would prevent the contained functions from executing. The name of the package changelog. To view changelogs for installed packages (that have this file). Qc pkgname. Sourcessource Note: Additional architecture- specific arrays can be added by appending an underscore and the architecture name, e. There must be a corresponding integrity array with checksums, e. It must contain the location of the software source, which in most cases is a full HTTP or FTP URL. The previously set variables pkgname and pkgver can be used effectively here (e. These paths are resolved relative to the directory of the PKGBUILD. Before the actual build process is started, all of the files referenced in this array will be downloaded or checked for existence, and makepkg will not proceed, if any are missing. Files in the source array with extensions . PGP signatures and will be automatically used to verify the integrity of the corresponding source file. This can be ensured by specifying an alternative source name with the syntax source=('filename: :fileuri'), where the chosen filename should be related to the package name. This can be used with archives that cannot be handled by /usr/bin/bsdtar or those that need to be installed as- is. If an alternative unarchiving tool is used (e. If used, makepkg will only accept signatures from the keys listed here and will ignore the trust values from the keyring. If the source file was signed with a subkey, makepkg will still use the primary key for comparison. They must be uppercase and must not contain whitespace characters. You can also insert SKIP for a particular file, and its checksum will not be tested. If possible, however, always test the authenticity of the files by adding their signatures to the source array: in this case you will also be able to safely skip their checksum verification altogether, as described above. The updpkgsums command is able to update the variables wherever they are in the PKGBUILD. Both tools will use the variable that is already set in the PKGBUILD, or fall back to md. These are less common alternatives to sha.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |