[Spice-devel] [PATCH] Be explicit about spice-common license
Jonathon Jongsma
jjongsma at redhat.com
Tue Oct 22 17:40:33 CEST 2013
Use same license as spice-gtk and spice modules (LGPL 2.1) since those licenses
applied to the spice-common submodule in the past. This makes it more clear
that if you use spice-common separately, the license is still LGPL. Also
mention license and copyright in generated files.
---
spice_codegen.py | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/spice_codegen.py b/spice_codegen.py
index 1cf1697..d35d949 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -80,8 +80,6 @@ def write_enums(writer, describe=False):
writer.writeln("#ifndef _H_SPICE_ENUMS")
writer.writeln("#define _H_SPICE_ENUMS")
writer.newline()
- writer.comment("Generated from %s, don't edit" % writer.options["source"]).newline()
- writer.newline()
# Define enums
for t in ptypes.get_named_types():
@@ -173,10 +171,31 @@ writer = codegen.CodeWriter()
writer.header = codegen.CodeWriter()
writer.set_option("source", os.path.basename(proto_file))
+license = """/*
+ Copyright (C) 2013 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+"""
+
writer.public_prefix = options.prefix
writer.writeln("/* this is a file autogenerated by spice_codegen.py */")
+writer.write(license)
writer.header.writeln("/* this is a file autogenerated by spice_codegen.py */")
+writer.header.write(license)
if not options.header and not options.generate_enums:
writer.writeln("#ifdef HAVE_CONFIG_H")
writer.writeln("#include <config.h>")
--
1.8.3.1
More information about the Spice-devel
mailing list