diff --git a/_licenses/bsd-2-clause.txt b/_licenses/bsd-2-clause.txt index 58c219c..247559e 100644 --- a/_licenses/bsd-2-clause.txt +++ b/_licenses/bsd-2-clause.txt @@ -26,7 +26,7 @@ limitations: --- -Copyright (c) All rights reserved. +Copyright (c) [year] [fullname] All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this diff --git a/_licenses/bsd-3-clause-clear.txt b/_licenses/bsd-3-clause-clear.txt index 2d19bbe..6ed7c25 100644 --- a/_licenses/bsd-3-clause-clear.txt +++ b/_licenses/bsd-3-clause-clear.txt @@ -26,7 +26,7 @@ limitations: --- The Clear BSD License -Copyright (c) [xxxx]-[xxxx] [Owner Organization] +Copyright (c) [year] [fullname] All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer @@ -36,9 +36,9 @@ below) provided that the following conditions are met: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of [Owner Organization] nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. + * Neither the name of [fullname] nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/_licenses/bsd-3-clause.txt b/_licenses/bsd-3-clause.txt index 7ce6baa..416e159 100644 --- a/_licenses/bsd-3-clause.txt +++ b/_licenses/bsd-3-clause.txt @@ -25,7 +25,7 @@ limitations: --- -Copyright (c) . All rights reserved. +Copyright (c) [year] [fullname]. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this diff --git a/_licenses/isc.txt b/_licenses/isc.txt index 9f363a8..a213047 100644 --- a/_licenses/isc.txt +++ b/_licenses/isc.txt @@ -28,8 +28,7 @@ limitations: --- ISC License: -Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-2003 by Internet Software Consortium +Copyright (c) [year], [fullname] 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. diff --git a/_licenses/mit.txt b/_licenses/mit.txt index 97516ee..d434798 100644 --- a/_licenses/mit.txt +++ b/_licenses/mit.txt @@ -30,7 +30,7 @@ limitations: --- MIT License -Copyright (c) +Copyright (c) [year] [fullname] 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 diff --git a/_licenses/ncsa.txt b/_licenses/ncsa.txt index 090ba56..f8d55e8 100644 --- a/_licenses/ncsa.txt +++ b/_licenses/ncsa.txt @@ -29,9 +29,8 @@ limitations: --- University of Illinois/NCSA Open Source License -Copyright (c) . All rights reserved. -Developed by: +Copyright (c) [year] [fullname]. All rights reserved. +Developed by: [fullname] [project] [project_url] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights @@ -43,10 +42,9 @@ furnished to do so, subject to the following conditions: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. - * Neither the names of , - nor the names of its contributors may be used to endorse or promote - products derived from this Software without specific prior written - permission. + * Neither the names of [fullname], [project], nor the names of its + contributors may be used to endorse or promote products derived from this + Software without specific prior written permission. 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 diff --git a/script/vendor-license-text b/script/vendor-license-text index 272d97a..1fb0828 100755 --- a/script/vendor-license-text +++ b/script/vendor-license-text @@ -17,6 +17,29 @@ site.collections['licenses'].docs.each do |license| puts "Updating the #{license.data['title']}..." text_file = File.join(text_dir, "#{license.data['spdx-id']}.txt") spdx_text = File.read(text_file).gsub(/\s+\n/, "\n") + + license_key = license.data['spdx-id'].downcase + + if ['bsd-2-clause', 'bsd-3-clause'].include? license_key + spdx_text = spdx_text.gsub(//, '[year]') + spdx_text = spdx_text.gsub(//, '[fullname]') + elsif license_key == 'bsd-3-clause-clear' + spdx_text = spdx_text.gsub(/\[xxxx\]-\[xxxx\]/, '[year]') + spdx_text = spdx_text.gsub(/\[Owner Organization\]/, '[fullname]') + elsif license_key == 'isc' + spdx_text = spdx_text.gsub(/Copyright.*Consortium/m, 'Copyright (c) [year], [fullname]') + elsif license_key == 'mit' + spdx_text = spdx_text.gsub(//, '[year]') + spdx_text = spdx_text.gsub(//, '[fullname]') + elsif license_key == 'ncsa' + spdx_text = spdx_text.gsub(//, '[year]') + spdx_text = spdx_text.gsub(//, '[fullname]') + spdx_text = spdx_text.gsub(//, '[fullname]') + spdx_text = spdx_text.gsub(//, '[project]') + spdx_text = spdx_text.gsub(%r{}, '[project_url]') + spdx_text = spdx_text.gsub(//, '[fullname], [project]') + end + license_text = '' spdx_text.lines.each do |line|