[game-data-packager] 01/01: add tag "expansion_for_ext:"

Alexandre Detiste detiste-guest at moszumanska.debian.org
Sun May 31 07:20:19 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 964da499cf46d3cd9cedc422b6b92f321dac2f5c
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Sun May 31 09:17:47 2015 +0200

    add tag "expansion_for_ext:"
    
    this is needed to allow to ship in GDP expansions
    for package outside of GDP scope,
    for example a dubbing pack for a DFSG game;
    a non-redistributable mod for a merely 'non-free' game;
    this can be also used for loose connection between yaml files.
---
 data/compet_n.yaml                      | 4 ++++
 doc/tags.txt                            | 1 +
 game_data_packager/__init__.py          | 7 +++++--
 game_data_packager/games/doom_common.py | 3 ++-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/data/compet_n.yaml b/data/compet_n.yaml
index fcf64f6..8c4b524 100644
--- a/data/compet_n.yaml
+++ b/data/compet_n.yaml
@@ -2,6 +2,10 @@
 copyright: © XXXX Various
 packages:
   doom-compet-n-data:
+    # mostly, for 5 of 6 PWADS
+    expansion_for_ext: doom2-wad
+    debian:
+      recommends: doom2-wad | freedoom, doom-wad | freedoom
     install_to: usr/share/games/doom
     install:
     - av.deh
diff --git a/doc/tags.txt b/doc/tags.txt
index 98f130b..17645dd 100644
--- a/doc/tags.txt
+++ b/doc/tags.txt
@@ -22,6 +22,7 @@ packages:
     engine: string
     demo_for: list
     expansion_for: string
+    expansion_for_ext: string
     lang: string
     debian:
       breaks:
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index ca5bd3d..fb481d3 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -335,6 +335,9 @@ class GameDataPackage(object):
         self.demo_for = set()
         self.better_version = None
         self.expansion_for = None
+        # expansion for a package outside of this yaml file;
+        # may be another GDP package or a package not made by GDP
+        self.expansion_for_ext = None
 
         # The optional marketing name of this version
         self.longname = None
@@ -441,7 +444,7 @@ class GameDataPackage(object):
         """
         if self.demo_for:
             return 'demo'
-        if self.expansion_for:
+        if self.expansion_for or self.expansion_for_ext:
             return 'expansion'
         return 'full'
 
@@ -797,7 +800,7 @@ class GameData(object):
         }
 
     def _populate_package(self, package, d):
-        for k in ('expansion_for', 'longname', 'symlinks', 'install_to',
+        for k in ('expansion_for', 'expansion_for_ext', 'longname', 'symlinks', 'install_to',
                 'install_to_docdir', 'install_contents_of', 'steam', 'debian',
                 'rip_cd', 'architecture', 'aliases', 'better_version',
                 'copyright', 'engine', 'gog', 'origin', 'lang', 'component', 'section'):
diff --git a/game_data_packager/games/doom_common.py b/game_data_packager/games/doom_common.py
index bc4dd29..ea98df5 100644
--- a/game_data_packager/games/doom_common.py
+++ b/game_data_packager/games/doom_common.py
@@ -94,7 +94,8 @@ class DoomGameData(GameData):
             package.program = package_map.get(engine, engine)
             package.create_desktop_file = self.data['packages'][package.name].get(
                     'create_desktop_file', True)
-            package.data_type = 'PWAD' if package.expansion_for else 'IWAD'
+            package.data_type = 'PWAD' if (package.expansion_for
+                                or package.expansion_for_ext) else 'IWAD'
 
     def construct_package(self, binary):
         return WadPackage(binary)

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