Mercurial > forge
changeset 11192:175994a0a275 octave-forge
copyright_fix: add X11, ISC, Expat and Apache2. Specify GPLs version on option
author | carandraug |
---|---|
date | Tue, 30 Oct 2012 01:21:56 +0000 |
parents | f7ec301121a9 |
children | 447c978c7b34 |
files | admin/copyright_fix.pl |
diffstat | 1 files changed, 92 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/admin/copyright_fix.pl Mon Oct 29 17:58:42 2012 +0000 +++ b/admin/copyright_fix.pl Tue Oct 30 01:21:56 2012 +0000 @@ -28,9 +28,9 @@ ## --files Extension of files to edit. Defaults to 'm'. Can also be 'cc' ## and 'h'. See also the '--comment' option. ## -## --license License to use. Defaults to "GPL". Valid options are "GPL", -## "LGPL", "AGPL", "modified BSD", "FreeBSD", "simplified BSD" and -## "public domain". +## --license License to use. Defaults to "GPLv3+". Valid options are "GPLv3+", +## "LGPLv3+", "AGPLv3+", "modified BSD", "FreeBSD", "simplified BSD", +## "public domain", "X11", "Expat", "Apache2" and "ISC". ## ## --replace Replace existing copyright notice on the files for the new one. ## A copyright notice is identified as the first block of comments @@ -70,7 +70,7 @@ my %authors; my $comment; my $files = "m"; -my $license = "GPL"; +my $license = "GPLv3+"; my $replace; my $verbose; @@ -146,7 +146,7 @@ ); given ($license) { - when (/GPL/i) { + when (/GPLv3+/i) { @text = ( @copyR_line, "", @@ -164,7 +164,7 @@ "this program; if not, see <http://www.gnu.org/licenses/>.", ); } - when (/LGPL/i) { + when (/LGPLv3+/i) { @text = ( @copyR_line, "", @@ -182,7 +182,7 @@ "along with this program; if not, see <http://www.gnu.org/licenses/>.", ); } - when (/AGPL/i) { + when (/AGPLv3+/i) { @text = ( @copyR_line, "", @@ -200,6 +200,91 @@ "along with this program; if not, see <http://www.gnu.org/licenses/>.", ); } + when (/Apache2/i) { + @text = ( + @copyR_line, + "You should have received a copy of the GNU Affero General Public License", + "Licensed under the Apache License, Version 2.0 (the \"License\");", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + " http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an \"AS IS\" BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License.", + ); + } + when (/Expat/i) { + @text = ( + @copyR_line, + "Permission is hereby granted, free of charge, to any person obtaining", + "a copy of this software and associated documentation files (the", + "\"Software\"), to deal in the Software without restriction, including", + "without limitation the rights to use, copy, modify, merge, publish,", + "distribute, sublicense, and/or sell copies of the Software, and to", + "permit persons to whom the Software is furnished to do so, subject to", + "the following conditions:", + "", + "The above copyright notice and this permission notice shall be included", + "in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,", + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", + "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.", + "IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY", + "CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,", + "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE", + "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + ); + } + when (/ISC/i) { + @text = ( + @copyR_line, + "Permission to use, copy, modify, and/or distribute this software for", + "any purpose with or without fee is hereby granted, provided that the", + "above copyright notice and this permission notice appear in all", + "copies.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\" AND ISC DISCLAIMS ALL WARRANTIES WITH", + "REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF", + "MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY", + "SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES", + "WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN", + "ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT", + "OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.", + ); + } + when (/X11/i) { + @text = ( + @copyR_line, + "Permission is hereby granted, free of charge, to any person obtaining" + "a copy of this software and associated documentation files (the" + "\"Software\"), to deal in the Software without restriction, including" + "without limitation the rights to use, copy, modify, merge, publish," + "distribute, sublicense, and/or sell copies of the Software, and to" + "permit persons to whom the Software is furnished to do so, subject to" + "the following conditions:" + "" + "The above copyright notice and this permission notice shall be" + "included in all copies or substantial portions of the Software." + "" + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND," + "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF" + "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND" + "NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY" + "CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT," + "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE" + "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + "" + "Except as contained in this notice, the name of the authors shall" + "not be used in advertising or otherwise to promote the sale, use or" + "other dealings in this Software without prior written authorization" + "from the authors." + ); + } when (/modified BSD/i) { @text = (@BSD_header, @{$BSD_clauses[0]}, @{$BSD_clauses[1]}, @{$BSD_clauses[2]}, @BSD_disclaimer); } when (/simplified BSD/i) { @text = (@BSD_header, @{$BSD_clauses[0]}, @{$BSD_clauses[1]}, @BSD_disclaimer); } when (/FreeBSD/i) { @text = (@BSD_header, @{$BSD_clauses[0]}, @{$BSD_clauses[1]}, @BSD_disclaimer,