Managing package copyright files
Software to be packaged is usually under some license which should be included in the package. A license is searched from inside the distributed source in WORKSRC for all modulations, in DISTFILES or defined inline in the Makefile. The license is stored in a package by convention in
/opt/csw/share/doc/<pkg-catalogname>/license
Using a licensefile 'COPYING' from the source
The simplest case is just taking the license file from the distributed source. If it is called COPYING you have to do... nothing, as this is the default.
Using a licensefile from the source with a different name
To choose another filename use
LICENSE = README.license
Starting with r19709 is it possible to specify multiple licenses which are concatenated in the license file:
LICENSE += COPYING LICENSE += COPYING.GPL LICENSE += COPYING.LGPL
Using a licensefile distributed separately
To add a custom license to a package you simply make sure you have a file COPYING in files/:
DISTFILES += COPYING
This is copied to WORKDIR and again automatically picked up from there.
Using different licensefiles for separate packages
When building multiple packages out of a single Makefile it is also possible to define a separate license for each package:
LICENSE_CSWmypkg1 = COPY-ME LICENSE_CSWmypkg2 = README.license
Directly define a license
If the package uses a simple license you can also add this license directly into the build recipe with
LICENSE_TEXT = This package is distributed under the beer license
This is of course also possible for different packages:
LICENSE_TEXT_CSWfoo = Foo-stuff license LICENSE_TEXT_CSWbar = Distribution under the bar license is permitted
Using no license at all
First let me say that this is against the OpenCSW standard and raises a checkpkg error. Now that you now this you can avoid including a license with
LICENSE =
If you are using the default 'COPYING' and it is not found there is also no license included.
Printing the full license on pkgadd
Usually only a hint is printed on pkgadd where to find the license. You can alternatively print this license fully on pkgadd (e. g. when the license demands this). To do so, put this in your Makefile;
LICENSE_FULL_CSW<pkgname> = COPYING
Regardless of the license being printed it is put in the license directory at /opt/csw/share/doc/<catalogname>/license. It is an error to specify both LICENSE and LICENSE_FULL for a package.
