From fec754b28acaf4d4dbecb4ae12f8a5855eeb7b67 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Jun 2016 00:57:02 -0400 Subject: [PATCH] Add bsd2/3 license file templates = snippify other licenses --- private/templates/text-mode/__license-apache | 5 ++- private/templates/text-mode/__license-bsd2 | 36 +++++++++++++++++ private/templates/text-mode/__license-bsd3 | 41 ++++++++++++++++++++ private/templates/text-mode/__license-gpl3 | 3 ++ private/templates/text-mode/__license-mit | 3 ++ 5 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 private/templates/text-mode/__license-bsd2 create mode 100644 private/templates/text-mode/__license-bsd3 diff --git a/private/templates/text-mode/__license-apache b/private/templates/text-mode/__license-apache index 3d012e88b..93184c002 100644 --- a/private/templates/text-mode/__license-apache +++ b/private/templates/text-mode/__license-apache @@ -1,3 +1,6 @@ +# -*- mode: snippet -*- +# name: Apache 2.0 License +# -- Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +189,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright `(format-time-string "%Y")` `user-full-name` + Copyright `(format-time-string "%Y")` ${1:`user-full-name`} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/private/templates/text-mode/__license-bsd2 b/private/templates/text-mode/__license-bsd2 new file mode 100644 index 000000000..a1a0d0094 --- /dev/null +++ b/private/templates/text-mode/__license-bsd2 @@ -0,0 +1,36 @@ +# -*- mode: snippet -*- +# name: BSD 2-clause License +# -- +${1:} +${2:} + +In the original BSD license, the occurrence of "copyright holder" in the 3rd +clause read "ORGANIZATION", placeholder for "University of California". In the +original BSD license, both occurrences of the phrase "COPYRIGHT HOLDERS AND +CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS". + +Here is the license template: + +Copyright (c) $2, $1 +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 +list of conditions and the following disclaimer. + +2. 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/private/templates/text-mode/__license-bsd3 b/private/templates/text-mode/__license-bsd3 new file mode 100644 index 000000000..8cfd0b1ea --- /dev/null +++ b/private/templates/text-mode/__license-bsd3 @@ -0,0 +1,41 @@ +# -*- mode: snippet -*- +# name: BSD 3-clause License +# -- +${1:} +${2:} +${3:} + +In the original BSD license, the occurrence of "copyright holder" in the 3rd +clause read "ORGANIZATION", placeholder for "University of California". In the +original BSD license, both occurrences of the phrase "COPYRIGHT HOLDERS AND +CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS". + +Here is the license template: + +Copyright (c) $3, $1 +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 +list of conditions and the following disclaimer. + +2. 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. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/private/templates/text-mode/__license-gpl3 b/private/templates/text-mode/__license-gpl3 index 02899641d..98a61181a 100644 --- a/private/templates/text-mode/__license-gpl3 +++ b/private/templates/text-mode/__license-gpl3 @@ -1,3 +1,6 @@ +# -*- mode: snippet -*- +# name: GPL 3.0 License +# -- ${1:Software Headline} Copyright (C) `(format-time-string "%Y")` `user-full-name` diff --git a/private/templates/text-mode/__license-mit b/private/templates/text-mode/__license-mit index 68a92b849..3807c0730 100644 --- a/private/templates/text-mode/__license-mit +++ b/private/templates/text-mode/__license-mit @@ -1,3 +1,6 @@ +# -*- mode: snippet -*- +# name: MIT License +# -- The MIT License (MIT) Copyright (c) `(format-time-string "%Y")` `user-full-name`.