This package is intended to set up a unified way of designating different
types of licenses (in general, not only OSI-approved, but actually there
are no other licenses atm in it). The main use is obviously the License tag
in spec files.

Some notes on using macros follow.

%gpl2plus, %gpl3plus, %lgpl2plus, %lgpl3plus
These are most often used licenses. Note that if COPYING file of your
package says (e.g.) "GNU General Public License Version 2" in its first
lines, and there are no explicit clauses that specify that only version
2 of GNU GPL is acceptable, then it most likely means that the package is
distributed under the terms of GNU GPL v.2 or later, therefore %gpl2plus
macro should be used.

%gpl2only, %gpl3only, %lgpl2only, %lgpl3only
This is a (not very often) case when the author of some program restricts
the version of the used license.

%bsd and %bsd_orig
%bsd_orig is a non-copyleft BSD license with an advertising clause. Do not
use this macro to mention "BSD-style" licenses that mention another person
or organization instead of the University of California, use %bsdstyle
instead (and read the page the next section refers to). %bsd is a revised
BSD license without an advertising clause that is used by the University of
California since 1999.

%bsdstyle
The problem of "BSD-style" licenses is described here:
http://www.gnu.org/philosophy/bsd.html - and boils down to the problem of
the BSD advertising clause that was altered by developers and companies in
favor of their own. If you encounter a package with such a license, please
approach its author and ask him to consider changing the license.

%mpl (MPL)
This stands for Mozilla Public License.

%perl_license
Perl has its own license macro, although the license is actually a choice
between GNU GPL (%gpl2plus) and Artistic (%artistic_license) license. If
you know of other sterotype cases when two licenses are combined, please
tell.

%ccby25, %ccby30, %ccbysa25, %ccbysa30
These are Creative Commons licenses. As for the moment, all free
(OSI-approved) CC licenses (Attribution and Attribution Share Alike,
versions 2.5 and 3.0) are covered with respective macros.

%distributable
This is a generic macro for any license that is not approved by OSI, but
still allows public packaging (e.g. the older Java's CDDI license, or
some abstract license that only permits non-commercial usage and
distribution). It's assumed that a user has to look at COPYING/LICENSE file
when he/she sees 'Distributable' as a license of the package. This is
a catch-all for those cases when you don't know how to describe the license
briefly enough - if you do know, please put a more specific clause in the
package license tag. More common non-free license macros may be added in
the future, proposals are welcome.

%gpllgpl2only, %gpllgpl3only, %gpllgpl2plus, %gpllgpl3plus
These macros are used when a package contains files distributed under
different licenses (e.g., '%gpllgpl2only' expands to '%gpl2only,
%lgpl2only'). There are actually very few packages that need such
a combination, see the following warning.
WARNING: If you are going to use one of these macros:
1. Ensure you are not putting a library and a program into one package (a
   common error of beginning packagers).
2. If you are sure it is not a library-program case, double-check that you
   don't mistake 'GPL, LGPL' (different files under different licenses) for
   'GPL or LGPL' (the whole tree under several licenses, at the user's
   choice).

Questions & Answers:
Q1: What if a package contains parts under different licenses?
A: Consider splitting the package into subpackages. If it is not feasible for
some reason, mention both licenses, separating them with a comma, e.g.:
%gpl2plus, %lgpl2plus

Q2: What if a package can be distributed under several licenses?
A: Mention the applicable licenses, separating them with a pipe sign or 'or'
word (NOT with a slash), e.g.:
%mpl|%gpl2plus|lgpl2plus (Firefox license)
%gpl2plus or %artistic_license (Perl license; better use %perl_license)

Q3: Why shouldn't I use a slash to separate licenses?
A: Because of an ambiguity. Consider "GPL/LGPL v.2" that usually means
"GPLv2+, LGPLv2+" (as in FAQ1) and "GPL/Artistic" (Perl license that means
"Either GPL or Artistic". The initial proposal was here:
http://lists.altlinux.org/pipermail/devel/2007-August/049382.html (in
Russian).

Q4: There are several versions of Artistic/Apache/FDL license and there's
only one macro. What should I do?
A: Append the specific version of the license after a hyphen, e.g.:
%asl-2.0 (Apache Software License, version 2.0).
DON'T do these things with GPL and LGPL licenses, use appropriate macros
instead.

In conclusion: don't forget to check not only COPYING, but COPYING.* files
if they exist as well as COPYRIGHT and LICENSE. Sometimes there are no
files with a license in the tarball; then you should look into the source
code files (.h, .cpp, .py etc.), they usually mention their license at
their beginning.

The contents of this package are distributed under the terms of GNU General
Public License version 2 or later. This package is also an example for
maintainers of using common-licenses package as the central library of most
often used licenses (see how COPYING file is installed and packaged).

Alexey Rusakov <ktirf@altlinux.org>
