haskell/cabal — pull request #970 by mboes (2012-07-09 04:38:11+00:00)
Title: New optional field: extra-license-files

Hi,

some licenses cannot be presented as self contained single files. This is the case of the LGPL for example, or for code that is dual licensed. In such situations, some packages list one of the license files in the license-file field, and the rest in extra-source-files. But this additional license material isn't really a source file, just like any other, and should be installed in exactly the same location as the file listed in the license-file field.

The LGPL is a license that modifies the GPL. Therefore to distribute code under the LGPL, one should include the GPL license file, in say COPYING, and the LGPL license file, in say COPYING.LESSER (see [[1]] and [[2]]). This series of patches allows one to have an "extra-license-files" field in a package description. This allows one to list COPYING.LESSER as the license of project, if it is under LGPL, and list COPYING in "extra-license-files", for reference. Dual licensed code could reference a LICENSE file in the license-file field, which would contain pointers to the files for each of the licenses that the code can be distributed under, and these files would be listed in "extra-license-files".

I think it is important that all license related files be distinguished semantically from other source files of the package and treated accordingly. Accordingly, I hope that you will consider merging this patch series into mainline.

Regards,

-- Mathieu

[1]: http://www.gnu.org/licenses/gpl-howto.html "How to use GNU licenses for your own software"
[2]: http://www.gnu.org/prep/standards/html_node/Releases.html "GNU Coding Standards"