[game-data-packager] 01/01: copyright file generator: point to provided license files

Alexandre Detiste detiste-guest at moszumanska.debian.org
Mon Mar 2 19:05:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit e477a45c96077b32eb4ef3a9ed4af17927cd257e
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Mon Mar 2 20:04:31 2015 +0100

    copyright file generator: point to provided license files
---
 data/rott-data.copyright            | 20 --------------------
 data/rott-registered-data.copyright | 20 --------------------
 data/rott.yaml                      |  2 ++
 data/wolf3d-demo-data.copyright     | 20 --------------------
 data/wolf3d.copyright               | 20 --------------------
 data/wolf3d.yaml                    |  2 ++
 game_data_packager/__init__.py      | 19 +++++++++++++++----
 7 files changed, 19 insertions(+), 84 deletions(-)

diff --git a/data/rott-data.copyright b/data/rott-data.copyright
deleted file mode 100644
index 75aa924..0000000
--- a/data/rott-data.copyright
+++ /dev/null
@@ -1,20 +0,0 @@
-The rott-data package was generated using game-data-packager.
-Copyright © 2008-2015 Jonathan Dowland <jmtd at debian.org>
-
-The files within "/usr/share/games/rott" are subject to the copyright
-described in /usr/share/doc/rott-data/VENDOR.DOC.
-
-The remainder of this package is covered by the following
-Licence:
-
-This program 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; version 2 of the License.
-
-This program 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.
-
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL-2.
diff --git a/data/rott-registered-data.copyright b/data/rott-registered-data.copyright
deleted file mode 100644
index b6fc965..0000000
--- a/data/rott-registered-data.copyright
+++ /dev/null
@@ -1,20 +0,0 @@
-The rott-registered-data package was generated using game-data-packager.
-Copyright © 2008-2015 Jonathan Dowland <jmtd at debian.org>
-
-The files within "/usr/share/games/rott" are subject to the copyright
-described in /usr/share/doc/rott-registered-data/LICENSE.TXT.
-
-The remainder of this package is covered by the following
-Licence:
-
-This program 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; version 2 of the License.
-
-This program 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.
-
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL-2.
diff --git a/data/rott.yaml b/data/rott.yaml
index c982c19..bee608e 100644
--- a/data/rott.yaml
+++ b/data/rott.yaml
@@ -64,6 +64,7 @@ files:
 
   LICENSE.TXT:
     install_to: $docdir
+    license: true
 
   1rott13.zip:
     size: 3668139
@@ -100,6 +101,7 @@ files:
 
   VENDOR.DOC:
     install_to: $docdir
+    license: true
 
   DEMO1_3.DMO:
     distinctive_name: false
diff --git a/data/wolf3d-demo-data.copyright b/data/wolf3d-demo-data.copyright
deleted file mode 100644
index 2fcd8fb..0000000
--- a/data/wolf3d-demo-data.copyright
+++ /dev/null
@@ -1,20 +0,0 @@
-The wolf3d-data package was generated using game-data-packager.
-Copyright © 2008-2013 Jonathan Dowland <jmtd at debian.org>.
-
-The files within "/usr/share/games/wolf3d" are subject to the copyright
-described in /usr/share/doc/wolf3d-demo-data/vendor.doc.
-
-The remainder of this package is covered by the following
-Licence:
-
-This program 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; version 2 of the License.
-
-This program 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.
-
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL-2.
diff --git a/data/wolf3d.copyright b/data/wolf3d.copyright
deleted file mode 100644
index fb94c77..0000000
--- a/data/wolf3d.copyright
+++ /dev/null
@@ -1,20 +0,0 @@
-The wolf3d-data package was generated using game-data-packager.
-Copyright © 2008-2013 Jonathan Dowland <jmtd at debian.org>.
-
-The files within "/usr/share/games/wolf3d" 
-are licensed by Apogee.
-
-The remainder of this package is covered by the following
-Licence:
-
-This program 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; version 2 of the License.
-
-This program 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.
-
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL-2.
diff --git a/data/wolf3d.yaml b/data/wolf3d.yaml
index 8c1aefc..da042f9 100644
--- a/data/wolf3d.yaml
+++ b/data/wolf3d.yaml
@@ -102,6 +102,7 @@ files:
 
   vendor.doc:
     install_to: $docdir
+    license: true
 
   # full version v1.2
   w6patc12.zip:
@@ -213,6 +214,7 @@ files:
   LICENSE.DOC_wl6a:
     install_as: LICENSE.DOC
     install_to: $docdir
+    license: true
 
   # older demos
   AUDIOHED.WL1_1.0:
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index f21f66c..32810a9 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -260,6 +260,7 @@ class WantedFile(HashedFile):
         self.download = None
         self.install_as = name
         self.install_to = None
+        self.license = False
         self._look_for = []
         self._provides = set()
         self._size = None
@@ -302,6 +303,7 @@ class WantedFile(HashedFile):
             'download': self.download,
             'install_as': self.install_as,
             'install_to': self.install_to,
+            'license': self.license,
             'look_for': list(self.look_for),
             'name': self.name,
             'provides': list(self.provides),
@@ -795,6 +797,7 @@ class GameData(object):
                     'download',
                     'install_as',
                     'install_to',
+                    'license',
                     'look_for',
                     'md5',
                     'provides',
@@ -1553,10 +1556,18 @@ class GameData(object):
             o.write('are user-supplied files with copyright\n')
             o.write(package.copyright or self.copyright)
             o.write(', with all rights reserved.\n')
-            # this may either be a real file or a symlink (rott-extreme-data)
-            #
-            #The full license appears in /usr/share/doc/PACKAGE/<somefile>,
-            #/usr/share/doc/PACKAGE/<some-other-file>
+
+            licenses = set()
+            for f in package.install | package.optional:
+                 if self.file_status[f] is FillResult.IMPOSSIBLE:
+                     continue
+                 if self.files[f].license:
+                     licenses.add("/usr/share/doc/%s/%s" % (package.name, self.files[f].name))
+            if licenses:
+                o.write('\nThe full license appears in ')
+                o.write(',\n'.join(licenses))
+                o.write('\n')
+
             for line in i.readlines():
                 if line.startswith('#'):
                     continue

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list