On Fri, Oct 21, 2011 at 04:13:56PM -0500, Ryan Schmidt wrote: > It's tedious to determine what license a project is under. It would be nice > if I could run a script and it would figure it out for me. Do we already have > one? My thoughts for how this could be done, for simple cases anyway, is to > locate the license file in the tarball looking for several common filenames, > normalize the formatting of its contents, and compare it with known license > texts to see which one it's most similar to.
fossology (http://www.fossology.org/) claims to be such a thing, although I've never tried it and it looks pretty complicated. One thing that thwarts the simplest analysis you might think of doing is that the COPYING file, if one exists, will not usually give you all the information you need. It's pretty common to just stick a verbatim copy of some version of the GPL in COPYING, without indicating whether they mean that specific version, any later version, or any version at all. It's not even particularly uncommon for packages to include a copy of the GPL in COPYING even though the software is under the LGPL or some other license or combination of licenses. So you really ought to look at the copyright header in the source files. Another approach might be to make a script that digs up the license information from the corresponding Debian or Fedora package. I've done this manually plenty of times. Of course, that assumes both that we can find the corresponding package (it might be named differently) and that they're equivalent (we might have a different version). Dan -- Dan R. K. Ports MIT CSAIL http://drkp.net/ _______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev