1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
--- /usr/bin/licensecheck 2009-11-22 19:26:47.000000000 +0100
+++ licensecheck 2009-11-29 23:57:18.000000000 +0100
@@ -270,6 +270,7 @@
my $file = shift @files;
my $content = '';
my $copyright_match;
+ my $copyright_matched = '';
my $copyright = '';
my $license = '';
my %copyrights;
@@ -278,9 +279,12 @@
while (<F>) {
last if ($. > $opt_lines);
$content .= $_;
- $copyright_match = parse_copyright($_);
+ $copyright_matched++ if ($copyright_match);
+ $copyright_match = parse_copyright $copyright_matched;
if ($copyright_match) {
$copyrights{lc("$copyright_match")} = "$copyright_match";
+ } else {
+ $copyright_matched = '';
}
}
close(F);
@@ -307,6 +311,7 @@
}
sub parse_copyright($) {
+ my $matched = shift;
my $copyright = '';
my $match;
@@ -323,6 +328,10 @@
|and|or # Part of a sentence
)\b';
+ if (($matched) and (/^\s*\d+/)) {
+ $_ = 'copyright' . $_;
+ }
+
if (m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%ix) {
$match = $1;
@@ -334,6 +343,27 @@
$match =~ s/^\s+//;
$match =~ s/\s{2,}/ /g;
$match =~ s/\\@/@/g;
+
+ $match =~ s/(MoinMoin:)?Alexander ?Schremmer( [<(][^>)]*[>)])?/Alexander Schremmer <alex\@alexanderweb.de>/gi;
+ $match =~ s/(MoinMoin:)?Dmitri..? ?Mili?aj?evs?( [<(][^>)]*[>)])?/Dmitrijs Milajevs <dimazest\@gmail.com>/gi;
+ $match =~ s/(MoinMoin:)?Eugene ?Syromyatnikov( [<(][^>)]*[>)])?/Eugene Syromyatnikov <evgsyr\@gmail.com>/gi;
+ $match =~ s/(MoinMoin:)?Florian ?Festi( [<(][^>)]*[>)])?/Florian Festi <florian\@festi.info>/gi;
+ $match =~ s/(MoinMoin:)?Florian ?Krupicka( [<(][^>)]*[>)])?/Florian Krupicka <florian.krupicka\@googlemail.com>/gi;
+ $match =~ s/(MoinMoin:)?Forrest ?Voight( [<(][^>)]*[>)])?/Forrest Voight <voights\@gmail.com>/gi;
+ $match =~ s/(MoinMoin:)?Franz ?Pletz( [<(][^>)]*[>)])?/Franz Pletz <fpletz\@franz-pletz.org>/gi;
+ $match =~ s/(MoinMoin:)?Johannes ?Berg( [<(][^>)]*[>)])?/Johannes Berg <johannes\@sipsolutions.net>/gi;
+ $match =~ s/(MoinMoin:)?J.?.?rgen ?Hermann( [<(][^>)]*[>)])?/Juergen Hermann <jh\@web.de>/gi;
+ $match =~ s/(MoinMoin:)?Karol ?Nowak( [<(][^>)]*[>)])?/Karol Nowak <grywacz\@gmail.com>/gi;
+ $match =~ s/(MoinMoin:)?Melita ?Mihaljevic( [<(][^>)]*[>)])?/Melita Mihaljevic <melita.mihaljevic\@gmail.com>/gi;
+ $match =~ s/(MoinMoin:)?Nir ?Soffer( [<(][^>)]*[>)])?/Nir Soffer <nirs\@freeshell.org>/gi;
+ $match =~ s/(MoinMoin:)?Petr ?Pytelka( [<(][^>)]*[>)])?/Petr Pytelka <pyta\@lightcomp.com>/gi;
+ $match =~ s/(MoinMoin:)?Radomir ?Dopieralski( [<(][^>)]*[>)])?/Radomir Dopieralski <moinmoin\@sheep.art.pl>/gi;
+ $match =~ s/(MoinMoin:)?Reimar ?Bauer( [<(][^>)]*[>)])?/Reimar Bauer <rb.proj\@googlemail.com>/gi;
+ $match =~ s/(MoinMoin:)?Richard ?Liao( [<(][^>)]*[>)])?/Richard Liao <richard.liao.i\@gmail.com>/gi;
+ $match =~ s/(MoinMoin:)?Thomas ?Pfaff/Thomas Pfaff/gi;
+ $match =~ s/(MoinMoin:)?Thomas ?Waldmann( [<(][^>)]*[>)])?/Thomas Waldmann <tw-public\@gmx.de>/gi;
+ $match =~ s/(\d+ )by /$1/g;
+
$copyright = $match;
}
}
@@ -432,6 +462,14 @@
$license = "GPL (unversioned/unknown version) $license";
}
+ if ($licensetext =~ /GPL, see COPYING/) {
+# $license = "GPL (unversioned/unknown version) $license";
+ $license = "GPL-2+ $license";
+ }
+ if ($licensetext =~ /GNU GENERAL PUBLIC LICENSE Version ([^ ]+)\./) {
+ $license = "GPL (v$1) $license";
+ }
+
if ($licensetext =~ /This file is part of the .*Qt GUI Toolkit. This file may be distributed under the terms of the Q Public License as defined/) {
$license = "QPL (part of Qt) $license";
} elsif ($licensetext =~ /may be distributed under the terms of the Q Public License as defined/) {
|