[game-data-packager] 01/01: implement per-package copyright_notice

Alexandre Detiste detiste-guest at moszumanska.debian.org
Mon Nov 2 11:49:55 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 55cf0bcaf826a07b907a858af5e5f015af313b68
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Mon Nov 2 12:49:28 2015 +0100

    implement per-package copyright_notice
---
 data/descent1-demo-data.copyright | 31 -------------------------------
 data/descent1.yaml                | 11 +++++++++++
 game_data_packager/__init__.py    |  5 ++++-
 game_data_packager/build.py       |  5 +++--
 4 files changed, 18 insertions(+), 34 deletions(-)

diff --git a/data/descent1-demo-data.copyright b/data/descent1-demo-data.copyright
deleted file mode 100644
index 6f45ed1..0000000
--- a/data/descent1-demo-data.copyright
+++ /dev/null
@@ -1,31 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Files: *
- © 1994 Parallax Software Corporation
-License:
- DESCENT is a trademark of Interplay Productions, Inc.
- .
- GIVE SHAREWARE DESCENT TO EVERYONE YOU KNOW!
- .
- THIS GAME MAY BE FREELY DISTRIBUTED
- .
- Shareware Descent is freely distributable to anyone and everyone so
- long as it is distributed in UNMODIFIED FORM and no fees are charged.
- .
- This data was packaged with game-data-packager.
-
-Files: /usr/share/doc/descent1-demo/data/changelog.gz
- © 2008-2014 Jonathan Dowland <jmtd at debian.org>.
- © 2014-2015 Simon McVittie
- © 2015 Alexandre Detiste
-License: GPL-2
- 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; either version 2
- of the License, or (at your option) any later version.
- .
- 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.
- .
- You can find the GPL license text on a Debian system under
- /usr/share/common-licenses/GPL-2.
diff --git a/data/descent1.yaml b/data/descent1.yaml
index dd08f95..a7b2e2a 100644
--- a/data/descent1.yaml
+++ b/data/descent1.yaml
@@ -11,6 +11,17 @@ packages:
     debian:
       conflicts: [descent1-full-data, descent1-data]
     install_to: usr/share/games/d1x-rebirth/
+    copyright_notice: |
+      DESCENT is a trademark of Interplay Productions, Inc.
+      .
+      GIVE SHAREWARE DESCENT TO EVERYONE YOU KNOW!
+      .
+      THIS GAME MAY BE FREELY DISTRIBUTED
+      .
+      Shareware Descent is freely distributable to anyone and everyone so
+      long as it is distributed in UNMODIFIED FORM and no fees are charged.
+      .
+      (Package's note: so this means this repacked game is not distributable)
     install:
     - descent.hog?demo
     - descent.pig?demo
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 40c8695..8a6513e 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -180,6 +180,9 @@ class GameDataPackage(object):
         # This optional value will overide the game global copyright
         self.copyright = None
 
+        # A blurb of text that is used to build debian/copyright
+        self.copyright_notice = None
+
         # Languages, list of ISO-639 codes
         self.langs = ['en']
 
@@ -718,7 +721,7 @@ class GameData(object):
                 'install_to_docdir', 'install_contents_of', 'debian', 'description',
                 'rip_cd', 'architecture', 'aliases', 'better_version', 'langs',
                 'copyright', 'engine', 'lang', 'component', 'section', 'disks',
-                'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki'):
+                'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki', 'copyright_notice'):
             if k in d:
                 setattr(package, k, d[k])
 
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index c01031e..8612727 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1357,9 +1357,10 @@ class PackagingTask(object):
                 o.write(',\n'.join(licenses) + '.\n\n')
 
 
-            if self.game.copyright_notice:
+            notice = package.copyright_notice or self.game.copyright_notice
+            if notice:
                  o.write('-' * 70)
-                 o.write('\n\n' + self.game.copyright_notice + '\n')
+                 o.write('\n\n' + notice + '\n')
                  o.write('-' * 70 + '\n\n')
 
             count_usr = 0

-- 
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