[SCM] Git repository for devscripts branch, master, updated. v2.11.7-55-gac65b80

Benjamin Drung bdrung at debian.org
Thu May 31 15:33:45 UTC 2012


The following commit has been merged in the master branch:
commit ac65b80843748d97ff392ffd7cd7478c5f2a45a4
Author: Ivan Borzenkov <ivan1986 at list.ru>
Date:   Thu May 31 17:33:16 2012 +0200

    licensecheck: Add detection code for Beerware license.
    
    Closes: #597463
    Signed-off-by: Benjamin Drung <bdrung at debian.org>

diff --git a/debian/changelog b/debian/changelog
index c2365ba..7775b44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -73,6 +73,9 @@ devscripts (2.11.8) UNRELEASED; urgency=low
   * licensecheck: Check licenses in .m (Octave/Matlab), .tex (LaTeX),
     and .pyx (Python's pyrex) files (Closes: #604529)
 
+  [ Ivan Borzenkov ]
+  * licensecheck: Add detection code for Beerware license. (Closes: #597463)
+
  -- Benjamin Drung <bdrung at debian.org>  Mon, 28 May 2012 17:14:12 +0200
 
 devscripts (2.11.7) unstable; urgency=low
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index d40bc36..343b7f2 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -481,6 +481,10 @@ sub parselicense($) {
 	$license = "Apache (v$1) $license";
     }
 
+    if ($licensetext =~ /(THE BEER-WARE LICENSE)/i) {
+	$license = "Beerware $license";
+    }
+
     if ($licensetext =~ /This source file is subject to version ([^ ]+) of the PHP license/) {
 	$license = "PHP (v$1) $license";
     }
diff --git a/test/licensecheck/beerware.cpp b/test/licensecheck/beerware.cpp
new file mode 100644
index 0000000..7484e63
--- /dev/null
+++ b/test/licensecheck/beerware.cpp
@@ -0,0 +1,8 @@
+/*
+ * Copyright (c) 2012 Devscripts developers
+ *
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * Benjamin Drung wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return.
+ */
diff --git a/test/test_licensecheck b/test/test_licensecheck
index 68af1ba..cbd6acd 100755
--- a/test/test_licensecheck
+++ b/test/test_licensecheck
@@ -24,6 +24,10 @@ license() {
     runCommand "licensecheck/$1" "licensecheck/$1: $2 " "" 0
 }
 
+testBeerware() {
+    license "beerware.cpp" "Beerware"
+}
+
 testLGPL() {
     license "lgpl-2.1.c" "LGPL (v2.1)"
     license "lgpl-2.1.h" "LGPL (v2.1)"

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list