5.7. Licenses

Each port must document the license under which it is available. If it is not an OSI approved license it must also document any restrictions on redistribution.

5.7.1. LICENSE

A short name for the license or licenses if more than one license apply.

If it is one of the licenses listed in Table 5.7, “Predefined License List”, only LICENSE_FILE and LICENSE_DISTFILES variables can be set.

If this is a license that has not been defined in the ports framework (see Table 5.7, “Predefined License List”), the LICENSE_PERMS and LICENSE_NAME must be set, along with either LICENSE_FILE or LICENSE_TEXT. LICENSE_DISTFILES and LICENSE_GROUPS can also be set, but are not required.

The predefined licenses are shown in Table 5.7, “Predefined License List”. The current list is always available in Mk/bsd.licenses.db.mk.

Example 5.28. Simplest Usage, Predefined Licenses

When the README of some software says This software is under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. but does not provide the license file, use this:

LICENSE=	LGPL21+

When the software provides the license file, use this:

LICENSE=	LGPL21+
LICENSE_FILE=	${WRKSRC}/COPYING

For the predefined licenses, the default permissions are dist-mirror dist-sell pkg-mirror pkg-sell auto-accept.

Table 5.7. Predefined License List
Short NameNameGroupPermissions
AGPLv3GNU Affero General Public License version 3FSF GPL OSI(default)
AGPLv3+GNU Affero General Public License version 3 (or later)FSF GPL OSI(default)
APACHE10Apache License 1.0FSF(default)
APACHE11Apache License 1.1FSF OSI(default)
APACHE20Apache License 2.0FSF OSI(default)
ART10Artistic License version 1.0OSI(default)
ART20Artistic License version 2.0FSF GPL OSI(default)
ARTPERL10Artistic License (perl) version 1.0OSI(default)
BSDBSD license Generic Version (deprecated)FSF OSI COPYFREE(default)
BSD2CLAUSEBSD 2-clause "Simplified" LicenseFSF OSI COPYFREE(default)
BSD3CLAUSEBSD 3-clause "New" or "Revised" LicenseFSF OSI COPYFREE(default)
BSD4CLAUSEBSD 4-clause "Original" or "Old" LicenseFSF(default)
BSLBoost Software LicenseFSF OSI COPYFREE(default)
CC-BY-1.0Creative Commons Attribution 1.0 (default)
CC-BY-2.0Creative Commons Attribution 2.0 (default)
CC-BY-2.5Creative Commons Attribution 2.5 (default)
CC-BY-3.0Creative Commons Attribution 3.0 (default)
CC-BY-4.0Creative Commons Attribution 4.0 (default)
CC-BY-NC-1.0Creative Commons Attribution Non Commercial 1.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-2.0Creative Commons Attribution Non Commercial 2.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-2.5Creative Commons Attribution Non Commercial 2.5 dist-mirror pkg-mirror auto-accept
CC-BY-NC-3.0Creative Commons Attribution Non Commercial 3.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-4.0Creative Commons Attribution Non Commercial 4.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-ND-1.0Creative Commons Attribution Non Commercial No Derivatives 1.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-ND-2.0Creative Commons Attribution Non Commercial No Derivatives 2.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-ND-2.5Creative Commons Attribution Non Commercial No Derivatives 2.5 dist-mirror pkg-mirror auto-accept
CC-BY-NC-ND-3.0Creative Commons Attribution Non Commercial No Derivatives 3.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-ND-4.0Creative Commons Attribution Non Commercial No Derivatives 4.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-SA-1.0Creative Commons Attribution Non Commercial Share Alike 1.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-SA-2.0Creative Commons Attribution Non Commercial Share Alike 2.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-SA-2.5Creative Commons Attribution Non Commercial Share Alike 2.5 dist-mirror pkg-mirror auto-accept
CC-BY-NC-SA-3.0Creative Commons Attribution Non Commercial Share Alike 3.0 dist-mirror pkg-mirror auto-accept
CC-BY-NC-SA-4.0Creative Commons Attribution Non Commercial Share Alike 4.0 dist-mirror pkg-mirror auto-accept
CC-BY-ND-1.0Creative Commons Attribution No Derivatives 1.0 (default)
CC-BY-ND-2.0Creative Commons Attribution No Derivatives 2.0 (default)
CC-BY-ND-2.5Creative Commons Attribution No Derivatives 2.5 (default)
CC-BY-ND-3.0Creative Commons Attribution No Derivatives 3.0 (default)
CC-BY-ND-4.0Creative Commons Attribution No Derivatives 4.0 (default)
CC-BY-SA-1.0Creative Commons Attribution Share Alike 1.0 (default)
CC-BY-SA-2.0Creative Commons Attribution Share Alike 2.0 (default)
CC-BY-SA-2.5Creative Commons Attribution Share Alike 2.5 (default)
CC-BY-SA-3.0Creative Commons Attribution Share Alike 3.0 (default)
CC-BY-SA-4.0Creative Commons Attribution Share Alike 4.0 (default)
CC0-1.0Creative Commons Zero v1.0 UniversalFSF GPL COPYFREE(default)
CDDLCommon Development and Distribution LicenseFSF OSI(default)
CPAL-1.0Common Public Attribution LicenseFSF OSI(default)
ClArtisticClarified Artistic LicenseFSF GPL OSI(default)
EPLEclipse Public LicenseFSF OSI(default)
GFDLGNU Free Documentation LicenseFSF(default)
GMGPLGNAT Modified General Public LicenseFSF GPL OSI(default)
GPLv1GNU General Public License version 1FSF GPL OSI(default)
GPLv1+GNU General Public License version 1 (or later)FSF GPL OSI(default)
GPLv2GNU General Public License version 2FSF GPL OSI(default)
GPLv2+GNU General Public License version 2 (or later)FSF GPL OSI(default)
GPLv3GNU General Public License version 3FSF GPL OSI(default)
GPLv3+GNU General Public License version 3 (or later)FSF GPL OSI(default)
GPLv3RLEGNU GPL version 3 Runtime Library ExceptionFSF GPL OSI(default)
GPLv3RLE+GNU GPL version 3 Runtime Library Exception (or later)FSF GPL OSI(default)
ISCLInternet Systems Consortium LicenseFSF GPL OSI COPYFREE(default)
LGPL20GNU Library General Public License version 2.0FSF GPL OSI(default)
LGPL20+GNU Library General Public License version 2.0 (or later)FSF GPL OSI(default)
LGPL21GNU Lesser General Public License version 2.1FSF GPL OSI(default)
LGPL21+GNU Lesser General Public License version 2.1 (or later)FSF GPL OSI(default)
LGPL3GNU Lesser General Public License version 3FSF GPL OSI(default)
LGPL3+GNU Lesser General Public License version 3 (or later)FSF GPL OSI(default)
LPPL10LaTeX Project Public License version 1.0FSF OSIdist-mirror dist-sell
LPPL11LaTeX Project Public License version 1.1FSF OSIdist-mirror dist-sell
LPPL12LaTeX Project Public License version 1.2FSF OSIdist-mirror dist-sell
LPPL13LaTeX Project Public License version 1.3FSF OSIdist-mirror dist-sell
LPPL13aLaTeX Project Public License version 1.3aFSF OSIdist-mirror dist-sell
LPPL13bLaTeX Project Public License version 1.3bFSF OSIdist-mirror dist-sell
LPPL13cLaTeX Project Public License version 1.3cFSF OSIdist-mirror dist-sell
MITMIT license / X11 licenseCOPYFREE FSF GPL OSI(default)
MPL10Mozilla Public License version 1.0FSF OSI(default)
MPL11Mozilla Public License version 1.1FSF OSI(default)
MPL20Mozilla Public License version 2.0FSF OSI(default)
NCSAUniversity of Illinois/NCSA Open Source LicenseCOPYFREE FSF GPL OSI(default)
NONENo license specified none
OFL10SIL Open Font License version 1.0 (http://scripts.sil.org/OFL)FONTS(default)
OFL11SIL Open Font License version 1.1 (http://scripts.sil.org/OFL)FONTS(default)
OWLOpen Works License (owl.apotheon.org)COPYFREE(default)
OpenSSLOpenSSL LicenseFSF(default)
PDPublic DomainGPL COPYFREE(default)
PHP202PHP License version 2.02FSF OSI(default)
PHP30PHP License version 3.0FSF OSI(default)
PHP301PHP License version 3.01FSF OSI(default)
PSFLPython Software Foundation LicenseFSF GPL OSI(default)
PostgreSQLPostgreSQL LicenseFSF GPL OSI COPYFREE(default)
RUBYRuby LicenseFSF(default)
UNLICENSEThe UnlicenseCOPYFREE FSF GPL(default)
WTFPLDo What the Fuck You Want To Public License version 2GPL FSF COPYFREE(default)
WTFPL1Do What the Fuck You Want To Public License version 1GPL FSF COPYFREE(default)
ZLIBzlib LicenseGPL FSF OSI(default)
ZPL21Zope Public License version 2.1GPL OSI(default)

5.7.2. LICENSE_PERMS and LICENSE_PERMS_NAME

Permissions. use none if empty.

License Permissions List
dist-mirror

Redistribution of the distribution files is permitted. The distribution files will be added to the FreeBSD MASTER_SITE_BACKUP CDN.

no-dist-mirror

Redistribution of the distribution files is prohibited. This is equivalent to setting RESTRICTED. The distribution files will not be added to the FreeBSD MASTER_SITE_BACKUP CDN.

dist-sell

Selling of distribution files is permitted. The distribution files will be present on the installer images.

no-dist-sell

Selling of distribution files is prohibited. This is equivalent to setting NO_CDROM.

pkg-mirror

Free redistribution of package is permitted. The package will be distributed on the FreeBSD package CDN https://pkg.freebsd.org/.

no-pkg-mirror

Free redistribution of package is prohibited. Equivalent to setting NO_PACKAGE. The package will not be distributed from the FreeBSD package CDN https://pkg.freebsd.org/.

pkg-sell

Selling of package is permitted. The package will be present on the installer images.

no-pkg-sell

Selling of package is prohibited. This is equivalent to setting NO_CDROM. The package will not be present on the installer images.

auto-accept

License is accepted by default. Prompts to accept a license are not displayed unless the user has defined LICENSES_ASK. Use this unless the license states the user must accept the terms of the license.

no-auto-accept

License is not accepted by default. The user will always be asked to confirm the acceptance of this license. This must be used if the license states that the user must accept its terms.

When both permission and no-permission is present the no-permission will cancel permission.

When permission is not present, it is considered to be a no-permission.

Warning:

Some missing permissions will prevent a port (and all ports depending on it) from being usable by package users:

A port without the auto-accept permission will never be be built and all the ports depending on it will be ignored.

A port without the pkg-mirror permission will be removed, as well as all the ports depending on it, after the build and they will ever end up being distributed.

Example 5.29. Nonstandard License

Read the terms of the license and translate those using the available permissions.

LICENSE=        UNKNOWN
LICENSE_NAME=   unknown
LICENSE_TEXT=   This program is NOT in public domain.\
                It can be freely distributed for non-commercial purposes only.
LICENSE_PERMS=  dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept

Example 5.30. Standard and Nonstandard Licenses

Read the terms of the license and express those using the available permissions. In case of doubt, please ask for guidance on the FreeBSD ports mailing list.

LICENSE=        WARSOW GPLv2
LICENSE_COMB=   multi
LICENSE_NAME_WARSOW=    Warsow Content License
LICENSE_FILE_WARSOW=    ${WRKSRC}/docs/license.txt
LICENSE_PERMS_WARSOW=   dist-mirror pkg-mirror auto-accept

When the permissions of the GPLv2 and the UNKNOWN licenses are mixed, the port ends up with dist-mirror dist-sell pkg-mirror pkg-sell auto-accept dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept. The no-permissions cancel the permissions. The resulting list of permissions are dist-mirror pkg-mirror auto-accept. The distribution files and the packages will not be available on the installer images.


5.7.3. LICENSE_GROUPS and LICENSE_GROUPS_NAME

Groups the license belongs.

Predefined License Groups List
FSF

Free Software Foundation Approved, see the FSF Licensing & Compliance Team.

GPL

GPL Compatible

OSI

OSI Approved, see the Open Source Initiative Open Source Licenses page.

COPYFREE

Comply with Copyfree Standard Definition, see the Copyfree Licenses page.

FONTS

Font licenses

5.7.4. LICENSE_NAME and LICENSE_NAME_NAME

Full name of the license.

Example 5.31. LICENSE_NAME
LICENSE=        UNRAR
LICENSE_NAME=   UnRAR License
LICENSE_FILE=   ${WRKSRC}/license.txt
LICENSE_PERMS=  dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

5.7.5. LICENSE_FILE and LICENSE_FILE_NAME

Full path to the file containing the license text, usually ${WRKSRC}/some/file. If the file is not in the distfile, and its content is too long to be put in LICENSE_TEXT, put it in a new file in ${FILESDIR}.

Example 5.32. LICENSE_FILE
LICENSE=	GPLv3+
LICENSE_FILE=	${WRKSRC}/COPYING

5.7.6. LICENSE_TEXT and LICENSE_TEXT_NAME

Text to use as a license. Useful when the license is not in the distribution files and its text is short.

Example 5.33. LICENSE_TEXT
LICENSE=        UNKNOWN
LICENSE_NAME=   unknown
LICENSE_TEXT=   This program is NOT in public domain.\
                It can be freely distributed for non-commercial purposes only,\
                and THERE IS NO WARRANTY FOR THIS PROGRAM.
LICENSE_PERMS=  dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept

5.7.7. LICENSE_DISTFILES and LICENSE_DISTFILES_NAME

The distribution files to which the licenses apply. Defaults to all the distribution files.

Example 5.34. LICENSE_DISTFILES

Used when the distribution files do not all have the same license. For example, one has a code license, and another has some artwork that cannot be redistributed:

MASTER_SITES=   SF/some-game
DISTFILES=      ${DISTNAME}${EXTRACT_SUFX} artwork.zip

LICENSE=        BSD3CLAUSE ARTWORK
LICENSE_COMB=   dual
LICENSE_NAME_ARTWORK=      The game artwork license
LICENSE_TEXT_ARTWORK=      The README says that the files cannot be redistributed
LICENSE_PERMS_ARTWORK=     pkg-mirror pkg-sell auto-accept
LICENSE_DISTFILES_BSD3CLAUSE=   ${DISTNAME}${EXTRACT_SUFX}
LICENSE_DISTFILES_ARTWORK= artwork.zip

5.7.8. LICENSE_COMB

Set to multi if all licenses apply. Set to dual if any license applies. Defaults to single.

Example 5.35. Dual Licenses

When a port says This software may be distributed under the GNU General Public License or the Artistic License, it means that either license can be used. Use this:

LICENSE=	ART10 GPLv1
LICENSE_COMB=   dual

If license files are provided, use this:

LICENSE=	ART10 GPLv1
LICENSE_COMB=   dual
LICENSE_FILE_ART10=     ${WRKSRC}/Artistic
LICENSE_FILE_GPLv1=     ${WRKSRC}/Copying

Example 5.36. Multiple Licenses

When part of a port has one license, and another part has a different license, use multi:

LICENSE=	GPLv2 LGPL21+
LICENSE_COMB=	multi

All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.