[devscripts] 01/01: licensecheck: detect LGPL in files handled by Dist::Zilla
dod at debian.org
dod at debian.org
Sun Jan 31 16:16:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository devscripts.
commit c477ad1d5d2e376bbb37de30e4379d04c9c70d1d
Author: Dominique Dumont <dod at debian.org>
Date: Sun Jan 31 17:15:21 2016 +0100
licensecheck: detect LGPL in files handled by Dist::Zilla
---
debian/changelog | 4 ++++
scripts/licensecheck.pl | 7 +++++++
test/test_licensecheck | 1 +
3 files changed, 12 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6379b61..868cd21 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,10 @@ devscripts (2.16.1) UNRELEASED; urgency=medium
- Keep the original compressed file when decompressing it for the
signature verification. (Closes: #812860)
+ [ Dominique Dumont ]
+ * licensecheck:
+ + detect LGPL license in Perl files handled by Dist::Zilla
+
-- Antonio Terceiro <terceiro at debian.org> Tue, 05 Jan 2016 13:01:05 -0200
devscripts (2.15.10) unstable; urgency=low
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index eb65ee8..9e59ebf 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -644,6 +644,11 @@ sub parselicense {
$license = "LGPL$gplver$extrainfo $license";
}
+ # For Perl modules handled by Dist::Zilla
+ if ($licensetext =~ /this is free software,? licensed under:? (?:the )?(?:GNU (?:Library |Lesser )General Public License|LGPL),? version ([\d\.]+)/i) {
+ $license = "LGPL (v$1) $license";
+ }
+
if ($licensetext =~ /is free software.? you can redistribute (it|them) and(?:\/|\s+)or modify (it|them) under the terms of the (GNU Affero General Public License|AGPL)/i) {
$license = "AGPL$gplver$extrainfo $license";
}
@@ -652,6 +657,8 @@ sub parselicense {
$license = "GPL$gplver$extrainfo $license";
}
+
+
if ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
and length $gplver) {
$license = "GPL$gplver$extrainfo $license";
diff --git a/test/test_licensecheck b/test/test_licensecheck
index 0547545..67e97aa 100755
--- a/test/test_licensecheck
+++ b/test/test_licensecheck
@@ -85,6 +85,7 @@ testLGPL() {
license "lgpl-no-version.h" "LGPL (unversioned/unknown version)"
license2 "-m --copyright" "lgpl-big-blue.h" "LGPL (v2.1) 2000, 2010 IBM Corporation and others. All rights reserved"
license2 "-m --copyright" "lgpl-digia.c" "LGPL (v2.1 or v3) 2014 Digia Plc and/or its subsidiary(-ies)"
+ license2 "-m --copyright" "lgpl-by-dist-zilla.pl" "LGPL (v2.1) 2016 Dominique Dumont"
}
# Lisp Lesser General Public License (BTS #806424)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list