User:Davezerave/PKGBUILD license

From ArchWiki


The license(s) under which a project is distributed. Since RFC 0016 Arch Linux uses SPDX license identifiers to specifically identify each license (see the list of SPDX identifiers). All targeted licenses must have a corresponding file below /usr/share/licenses/.

Note: The package tooling supports more complex SPDX license expressions (e.g. 'GPL-2.0-or-later OR LGPL-2.1-or-later' or 'Apache-2.0 WITH LLVM-exception'). However, as a special exception to the understood license expressions, Arch Linux considers each entry in the license array to be AND concatenated as otherwise some license expressions would become too unwieldy.

Arch Linux distinguishes between different types of licenses: Those known to SPDX that carry no unique licensor information, those known to SPDX that carry unique licensor information, and those not known to SPDX.

The license files for the first group are provided by the licenses package (dependency of the base meta package) in /usr/share/licenses/spdx/ and /usr/share/licenses/spdx/exceptions/. Packages exclusively making use of one or more of these licenses do not have to ship their own license files.

Packages distributed under one or more of the licenses in the second group of licenses (e.g. `BSD-3-Clause` or `MIT`) must provide the respective license file for any of those licenses below /usr/share/licenses/pkgname/.

Custom license identifiers, which fall in the third group of licenses must be prefixed with a LicenseRef- (following the definition for user-defined SPDX license expressions). License files for them must also be provided below /usr/share/licenses/pkgname/.

Unique or custom licenses usually have to be installed manually, for which the following code snippet may be used in the package() function:

install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/

See also Nonfree applications package guidelines.

Additional information and perspectives on free and open source software licenses may be found on the following pages: