Template: License

From LibrePlanet
Jump to: navigation, search
(wikify link)
(Add OTHER keyword for complex licensing schemes)
Line 17: Line 17:
 
! Keyword
 
! Keyword
 
! License Name
 
! License Name
 +
|-
 +
| OTHER
 +
| This is a special keyword (see below)
 
|-
 
|-
 
| GPLv2
 
| GPLv2
Line 37: Line 40:
 
|-
 
|-
 
|  
 
|  
 +
|}
 +
 +
=== OTHER licensing scheme ===
 +
 +
Some projects include code from various sources and combine several software licenses.  In this case it's easier to link to the code repository's license file, or some other equivalent source.  The '''OTHER''' keyword can be used for this.  It takes a second argument which is the URL to link to, and an optional third argument which is the anchor:
 +
 +
{|
 +
! Usage
 +
! Description
 +
|-
 +
| <nowiki>{{License|OTHER|https://gitweb.torproject.org/tor.git/tree/LICENSE}}</nowiki>
 +
| will show: [https://gitweb.torproject.org/tor.git/tree/LICENSE Speficic licensing scheme]
 +
|-
 +
| <nowiki>{{License|OTHER|https://gitweb.torproject.org/tor.git/tree/LICENSE|Tor-specific free software license}}</nowiki>
 +
| will show: [https://gitweb.torproject.org/tor.git/tree/LICENSE Tor-specific free software license}}</nowiki>
 
|}
 
|}
  
Line 42: Line 60:
 
<includeonly>
 
<includeonly>
 
<span class="license">
 
<span class="license">
[http://www.gnu.org/licenses/license-list.html#{{#switch: {{{1|}}}
+
{{#switch: {{{1|}}}
| GPLv2  = GPLv2 GNU <abbr title="General Public License">GPL</abbr> version 2
+
| GPLv2  = [https://gnu.org/licenses/license-list.html#GPLv2 GNU <abbr title="General Public License">GPL</abbr> version 2]
| GPLv2+  = GPLv2 GNU <abbr title="General Public License">GPL</abbr> version 2 or later
+
| GPLv2+  = [https://gnu.org/licenses/license-list.html#GPLv2 GNU <abbr title="General Public License">GPL</abbr> version 2 or later]
| GPLv3+  = GNUGPL GNU <abbr title="General Public License">GPL</abbr> version 3 or later
+
| GPLv3+  = [https://gnu.org/licenses/license-list.html#GNUGPL GNU <abbr title="General Public License">GPL</abbr> version 3 or later]
| GPL    = GNUGPL GNU <abbr title="General Public License">GPL</abbr> version 3 or later
+
| GPL    = [https://gnu.org/licenses/license-list.html#GNUGPL GNU <abbr title="General Public License">GPL</abbr> version 3 or later]
| AGPL    = AGPL GNU <abbr title="Affero General Public License">AGPL</abbr> version 3 or later
+
| AGPL    = [https://gnu.org/licenses/license-list.html#AGPL GNU <abbr title="Affero General Public License">AGPL</abbr> version 3 or later]
| Apache2 = apache2">Apache License, version 2.0
+
| Apache2 = [https://gnu.org/licenses/license-list.html#apache2 Apache License, version 2.0]
|#default = SoftwareLicenses">{{{1|not specified}}}
+
| apache2 = [https://gnu.org/licenses/license-list.html#apache2 Apache License, version 2.0]
}}]
+
| OTHER  = [{{{2}}} {{{3|Specific licensing scheme}}}
 +
|#default = [https://gnu.org/licenses/license-list.html#SoftwareLicenses">{{{1|not specified}}}]
 +
}}
 
</span>
 
</span>
 
</includeonly>
 
</includeonly>

Revision as of 11:42, 24 October 2015

This is a template to display software license information and link to the original license text.

Usage

Simply pass the type of license you need as the template argument.

Example: {{License|GPL}}

Available Licenses

Note: keywords are case-sensitive.

Any anchor on the GNU licenses page can be used as a keyword.

Keyword License Name
OTHER This is a special keyword (see below)
GPLv2 GNU General Public License version 2 (only)
GPLv2+ GNU General Public License version 2 or later
GPLv3+ GNU General Public License version 3 or later
GPL GNU General Public License (ultimate version, eq. GPLv3+)
AGPL GNU Affero General Public License
Apache2 Apache License version 2.0

OTHER licensing scheme

Some projects include code from various sources and combine several software licenses. In this case it's easier to link to the code repository's license file, or some other equivalent source. The OTHER keyword can be used for this. It takes a second argument which is the URL to link to, and an optional third argument which is the anchor:

Usage Description
{{License|OTHER|https://gitweb.torproject.org/tor.git/tree/LICENSE}} will show: Speficic licensing scheme
{{License|OTHER|https://gitweb.torproject.org/tor.git/tree/LICENSE|Tor-specific free software license}} will show: [https://gitweb.torproject.org/tor.git/tree/LICENSE Tor-specific free software license}}</nowiki>