5.8.许可证
每一个 port 都必须记录它所使用的许可证。如果它不是 OSI 批准的许可证, 也必须记录对再分发的任何限制。
5.8.1. 许可证
如果适用一个以上的许可证,一个或多个许可证的短名称。
如果是预定义许可证列表中列出的许可证之一,只能设置 LICENSE_FILE
和 LICENSE_DISTFILES
变量。
如果这是一个没有在 ports 框架中定义的许可证 (参见 预定义许可证列表), 则必须设置 LICENSE_PERMS
和 LICENSE_NAME
, 以及 LICENSE_FILE
或 LICENSE_TEXT
。LICENSE_DISTFILES
和 LICENSE_GROUPS
也可以被设置, 但不是必须的。
预定义的许可证显示在 Predefined License List 中。当前的列表总是在 Mk/bsd.licenses.db.mk 中可用。
例32. 最简单的用法,预定义的许可证
当某些软件的 README 说 "本软件采用自由软件基金会发布的 GNU Lesser General Public License 的条款;或者是 2.1 版本的 License,或者(由你选择)任何更高的版本。"但没有提供许可证文件,使用这个:
当软件提供许可证文件时,使用这个:
对于预定义的许可证,默认权限是 dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
。
表7. 预定义许可证列表
Short Name | Name | Group | Permissions |
---|---|---|---|
| GNU Affero General Public License version 3 |
| (default) |
| GNU Affero General Public License version 3 (or later) |
| (default) |
| Apache License 1.0 |
| (default) |
| Apache License 1.1 |
| (default) |
| Apache License 2.0 |
| (default) |
| Artistic License version 1.0 |
| (default) |
| Artistic License version 2.0 |
| (default) |
| Artistic License (perl) version 1.0 |
| (default) |
| BSD license Generic Version (deprecated) |
| (default) |
| BSD 2-clause "Simplified" License |
| (default) |
| BSD 3-clause "New" or "Revised" License |
| (default) |
| BSD 4-clause "Original" or "Old" License |
| (default) |
| Boost Software License |
| (default) |
| Creative Commons Attribution 1.0 | (default) | |
| Creative Commons Attribution 2.0 | (default) | |
| Creative Commons Attribution 2.5 | (default) | |
| Creative Commons Attribution 3.0 | (default) | |
| Creative Commons Attribution 4.0 | (default) | |
| Creative Commons Attribution Non Commercial 1.0 |
| |
| Creative Commons Attribution Non Commercial 2.0 |
| |
| Creative Commons Attribution Non Commercial 2.5 |
| |
| Creative Commons Attribution Non Commercial 3.0 |
| |
| Creative Commons Attribution Non Commercial 4.0 |
| |
| Creative Commons Attribution Non Commercial No Derivatives 1.0 |
| |
| Creative Commons Attribution Non Commercial No Derivatives 2.0 |
| |
| Creative Commons Attribution Non Commercial No Derivatives 2.5 |
| |
| Creative Commons Attribution Non Commercial No Derivatives 3.0 |
| |
| Creative Commons Attribution Non Commercial No Derivatives 4.0 |
| |
| Creative Commons Attribution Non Commercial Share Alike 1.0 |
| |
| Creative Commons Attribution Non Commercial Share Alike 2.0 |
| |
| Creative Commons Attribution Non Commercial Share Alike 2.5 |
| |
| Creative Commons Attribution Non Commercial Share Alike 3.0 |
| |
| Creative Commons Attribution Non Commercial Share Alike 4.0 |
| |
| Creative Commons Attribution No Derivatives 1.0 | (default) | |
| Creative Commons Attribution No Derivatives 2.0 | (default) | |
| Creative Commons Attribution No Derivatives 2.5 | (default) | |
| Creative Commons Attribution No Derivatives 3.0 | (default) | |
| Creative Commons Attribution No Derivatives 4.0 | (default) | |
| Creative Commons Attribution Share Alike 1.0 | (default) | |
| Creative Commons Attribution Share Alike 2.0 | (default) | |
| Creative Commons Attribution Share Alike 2.5 | (default) | |
| Creative Commons Attribution Share Alike 3.0 | (default) | |
| Creative Commons Attribution Share Alike 4.0 | (default) | |
| Creative Commons Zero v1.0 Universal |
| (default) |
| Common Development and Distribution License |
| (default) |
| Common Public Attribution License |
| (default) |
| Clarified Artistic License |
| (default) |
| Eclipse Public License |
| (default) |
| GNU Free Documentation License |
| (default) |
| GNAT Modified General Public License |
| (default) |
| GNU General Public License version 1 |
| (default) |
| GNU General Public License version 1 (or later) |
| (default) |
| GNU General Public License version 2 |
| (default) |
| GNU General Public License version 2 (or later) |
| (default) |
| GNU General Public License version 3 |
| (default) |
| GNU General Public License version 3 (or later) |
| (default) |
| GNU GPL version 3 Runtime Library Exception |
| (default) |
| GNU GPL version 3 Runtime Library Exception (or later) |
| (default) |
| Internet Systems Consortium License |
| (default) |
| GNU Library General Public License version 2.0 |
| (default) |
| GNU Library General Public License version 2.0 (or later) |
| (default) |
| GNU Lesser General Public License version 2.1 |
| (default) |
| GNU Lesser General Public License version 2.1 (or later) |
| (default) |
| GNU Lesser General Public License version 3 |
| (default) |
| GNU Lesser General Public License version 3 (or later) |
| (default) |
| LaTeX Project Public License version 1.0 |
|
|
| LaTeX Project Public License version 1.1 |
|
|
| LaTeX Project Public License version 1.2 |
|
|
| LaTeX Project Public License version 1.3 |
|
|
| LaTeX Project Public License version 1.3a |
|
|
| LaTeX Project Public License version 1.3b |
|
|
| LaTeX Project Public License version 1.3c |
|
|
| MIT license / X11 license |
| (default) |
| Mozilla Public License version 1.0 |
| (default) |
| Mozilla Public License version 1.1 |
| (default) |
| Mozilla Public License version 2.0 |
| (default) |
| University of Illinois/NCSA Open Source License |
| (default) |
| No license specified |
| |
| SIL Open Font License version 1.0 (https://scripts.sil.org/OFL/) |
| (default) |
| SIL Open Font License version 1.1 (https://scripts.sil.org/OFL/) |
| (default) |
| Open Works License (owl.apotheon.org) |
| (default) |
| OpenSSL License |
| (default) |
| Public Domain |
| (default) |
| PHP License version 2.02 |
| (default) |
| PHP License version 3.0 |
| (default) |
| PHP License version 3.01 |
| (default) |
| Python Software Foundation License |
| (default) |
| PostgreSQL License |
| (default) |
| Ruby License |
| (default) |
| The Unlicense |
| (default) |
| Do What the Fuck You Want To Public License version 2 |
| (default) |
| Do What the Fuck You Want To Public License version 1 |
| (default) |
| zlib License |
| (default) |
| Zope Public License version 2.1 |
| (default) |
5.8.2. LICENSE_PERMS
和 LICENSE_PERMS_NAME_
。
LICENSE_PERMS
和 LICENSE_PERMS_NAME_
。权限。如果为空,则使用无。
许可证权限列表
dist-mirror
发布文件的再分发是允许的。发布的文件将被添加到 FreeBSD
MASTER_SITE_BACKUP
CDN。
no-dist-mirror
禁止重新分发发行文件。这等同于设置
RESTRICTED
。发布的文件将不会被加入 FreeBSDMASTER_SITE_BACKUP CDN
。
dist-sell
允许出售分发文件。分发文件将出现在安装程序的图像上。
no-dist-sell
禁止出售发行文件。这等同于设置
NO_CDROM
。
pkg-mirror
允许对软件包进行免费的再分发。该软件包将在 FreeBSD 软件包 CDN 上发布 https://pkg.freebsd.org/。
no-pkg-mirror
禁止免费重新分发软件包。相当于设置 NO_PACKAGE。这个软件包将不会从 FreeBSD 软件包 CDN https://pkg.freebsd.org/ 上发布。
pkg-sell
出售软件包是允许的。该软件包将出现在安装程序的图像上。
no-pkg-sell
禁止出售软件包。这等同于设置 NO_CDROM 。该软件包将不会出现在安装程序的镜像上。
auto-accept
默认接受许可证。除非用户定义了 LICENSES_ASK,否则不显示接受许可证的提示。除非许可证规定用户必须接受许可证的条款,否则使用这个。
no-auto-accept
许可证在默认情况下是不被接受的。用户将始终被要求确认接受该许可证。如果许可证规定用户必须接受其条款,则必须使用该选项。
当权限和无权限同时存在时,无权限将取消权限。
警告
一些缺失的权限会使一个 Port (以及所有依赖于它的 Port ) 不能被软件包用户使用:
没有自动接受权限的 Port 将永远不会被建立, 所有依赖于它的 Port 都将被忽略。
没有
pkg-mirror
权限的 port 会在联编后被删除, 以及所有依赖它的 port, 它们最终都会被分发。
例33. 非标准的许可证
阅读许可证的条款,并使用可用的权限来翻译这些条款。
例34. 标准和非标准的许可证
阅读许可证的条款, 并使用可用的权限来表达这些条款。如果有疑问, 请在 FreeBSD ports 邮件列表 中寻求指导。
当 GPLv2 和 UNKNOWN 许可证的权限混合在一起时, 这个 port 最终会变成 dist-mirror dist-sell pkg-mirror pkg-sell auto-accept dist-mirror no-dist-sell pkg-mirror no-pkg-sell automatic-accept。no-permissions取消了这些权限。由此产生的权限列表是 dist-mirror pkg-mirror auto-accept。分发文件和软件包将不能在安装程序镜像上使用。
5.8.3. LICENSE_GROUPS 和 LICENSE_GROUPS_NAME
许可证所属组别。
预定义许可证组列表
FSF
自由软件基金会批准,请参见FSF许可与合规团队。
GPL
与 GPL 兼容
OSI
OSI批准的,请看开放源码倡议的开放源码许可证页面。
COPYFREE
符合 Copyfree 标准定义,见 Copyfree 许可证页面。
FONTS
字体许可证
5.8.4. LICENSE_NAME 和 LICENSE_NAME_NAME
许可证的全名。
例35. LICENSE_NAME
5.8.5. LICENSE_FILE 和 LICENSE_FILE_NAME
包含许可证文本的文件的完整路径, 通常是 ${WRKSRC}/some/file。如果该文件不在 distfile 中, 而且其内容太长而无法放入 LICENSE_TEXT
, 则应将其放入 ${FILESDIR} 中的一个新文件。
例36. LICENSE_FILE
5.8.6. LICENSE_TEXT 和 LICENSE_TEXT_NAME
用来作为许可证的文本。当许可证不在发行文件中,且文本较短时很有用。
例37. LICENSE_TEXT
5.8.7. LICENSE_DISTFILES 和 LICENSE_DISTFILES_NAME
许可证所适用的分发文件。默认为所有的分发文件。
例38. license_distfiles
当发行文件不是都有相同的许可证时使用。例如,一个有代码许可证,而另一个有一些不能再分发的艺术品:
5.8.8. LICENSE_COMB
如果所有许可证都适用,则设置为多许可证。如果适用任何许可证,则设置为双倍。默认为单一。
例39. 双重许可证
当一个 port 说 "这个软件可以在 GNU General Public License 或 Artistic License 下发布 "时, 它意味着可以使用任何一种许可证。使用这个:
如果提供了许可证文件,请使用这个:
例40. 多个许可证
当一个 Port 的一部分有一个许可证,而另一部分有一个不同的许可证时,请使用 multi:
最后更新于