From 52e478a263fda2ce76800e230770c1985722c1cb Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 15 Sep 2017 10:04:15 +0100 Subject: [PATCH] skelrc: Refactor and expand the GPL machinery. --- skelrc | 140 +++++++++++++++++++++++++++++------------------------------------ 1 file changed, 63 insertions(+), 77 deletions(-) diff --git a/skelrc b/skelrc index 67ffd1a..fae5c44 100644 --- a/skelrc +++ b/skelrc @@ -124,68 +124,23 @@ the PREFIX is removed." \[[cont-comment]]\n" "")) -(setq skelrc-gpl (skelrc-prefix-lines "[[cont-comment]] " -"[[Program-name]] is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -\(at your option) any later version. - -\[[Program-name]] is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with [[program-name]]; if not, write to the Free Software Foundation, -Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.")) - -(setq skelrc-wide-gpl (skelrc-prefix-lines "[[cont-comment]] " -;;Version for wide program names -"[[Program-name]] is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -\(at your option) any later version. - -\[[Program-name]] is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with [[program-name]]; if not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA.")) - -(setq skelrc-lgpl (skelrc-prefix-lines "[[cont-comment]] " -"[[Library-name]] is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -\[[Library-name]] is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with [[library-name]]; if not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -MA 02111-1307, USA.")) - -(setq skelrc-agpl (skelrc-prefix-lines "[[cont-comment]] " -"[[Program-name]] is free software; you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as -published by the Free Software Foundation; either version 3 of the -License, or (at your option) any later version. - -\[[Program-name]] is distributed in the hope that it will be useful, +(defun skelrc-generic-gpl (&rest params) + (setq skel-alist (append params skel-alist)) + (skelrc-prefix-and-reflow "[[cont-comment]] " +"[[Short-name]] is free software: you can redistribute it and/or +modify it under the terms of the GNU \[[gpl-qualifiers]]General +Public License as published by the Free Software Foundation; +either version [[gpl-version]] of the License, or (at your +option) any later version. + +\[[Short-name]] is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +\[[gpl-qualifiers]]General Public License for more details. -You should have received a copy of the GNU Affero General Public -License along with [[program-name]]; if not, see -.")) +You should have received a copy of the GNU +\[[gpl-qualifiers]]General Public License along with +\[[short-name]]. If not, [[gpl-find-licence]]")) (setq skelrc-bsd (skelrc-prefix-lines "[[cont-comment]] " "Copyright (c) [[year]] [[author]] @@ -241,23 +196,54 @@ option) any later version.")) (licence-banner . (skelrc-banner "Licensing notice" t)) (component . (skelrc-component)) (licence-text . "[[gpl]]") - (Program-name . (or (skelrc-assq 'Program skel-alist) - (skelrc-assq 'program skel-alist) - "This program")) - (program-name . (or (skelrc-assq 'program skel-alist) - "this program")) - (Library-name . (or (skelrc-assq 'Library skel-alist) - (skelrc-assq 'library skel-alist) - (skelrc-assq 'Program skel-alist) - (skelrc-assq 'program skel-alist) - "This library")) - (library-name . (or (skelrc-assq 'library skel-alist) - (skelrc-assq 'program skel-alist) - "this library")) - (gpl . skelrc-gpl) - (wide-gpl . skelrc-wide-gpl) - (lgpl . skelrc-lgpl) - (agpl . skelrc-agpl) + (fill-column . "72") + (Short-name . (or (skelrc-assq 'Library skel-alist) + (skelrc-assq 'library skel-alist) + (skelrc-assq 'Program skel-alist) + (skelrc-assq 'program skel-alist) + "This [[thing]]")) + (short-name . (or (skelrc-assq 'library skel-alist) + (skelrc-assq 'program skel-alist) + "this [[thing]]")) + (generic-gpl . (skelrc-generic-gpl)) + (gnu-temple-place . (concat "write to the Free Software Foundation," + "Inc., 59 Temple Place - Suite 330, " + "Boston, MA 02111-1307, USA.")) + (gnu-website . "see .") + (gpl-2 . (skelrc-generic-gpl '(gpl-version . "2") + '(gpl-qualifiers . "") + '(gpl-find-licence + . "[[gnu-temple-place]]") + '(thing . "program"))) + (gpl-3 . (skelrc-generic-gpl '(gpl-version . "3") + '(gpl-qualifiers . "") + '(gpl-find-licence + . "[[gnu-website]]") + '(thing . "program"))) + (lgpl-2 . (skelrc-generic-gpl '(gpl-version . "2") + '(gpl-qualifiers . "Library ") + '(gpl-find-licence + . "[[gnu-temple-place]]") + '(thing . "library"))) + (lgpl-2.1 . (skelrc-generic-gpl '(gpl-version . "2.1") + '(gpl-qualifiers . "Lesser ") + '(gpl-find-licence + . "[[gnu-temple-place]]") + '(thing . "library"))) + (lgpl-3 . (skelrc-generic-gpl '(gpl-version . "3") + '(gpl-qualifiers . "Lesser ") + '(gpl-find-licence + . "[[gnu-website]]") + '(thing . "library"))) + (agpl-3 . (skelrc-generic-gpl '(gpl-version . "3") + '(gpl-qualifiers . "Affero ") + '(gpl-find-licence + . "[[gnu-website]]") + '(thing . "program"))) + (gpl . "[[gpl-2]]") + (wide-gpl . "[[gpl-2]]") + (lgpl . "[[lgpl-2]]") + (agpl . "[[agpl-3]]") (bsd . skelrc-bsd) (revisions . ,(concat "[[revision-banner]]\n" "[[cont-comment]]\n" -- 2.11.0