[game-data-packager] 01/02: move quake2-music.control.in in yaml, enhance package.data_type

Alexandre Detiste detiste-guest at moszumanska.debian.org
Wed May 11 08:28:31 UTC 2016


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 2c9bde0fd588dcb9f646b03ce865bcdc348bc20f
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Wed May 11 10:03:31 2016 +0200

    move quake2-music.control.in in yaml, enhance package.data_type
    
    avoid to repeat in automatic boilerplate what was
    already stated in package.description blurb.
---
 data/quake2-music.control.in   | 12 ------------
 data/quake2.yaml               | 11 +++++++++++
 game_data_packager/__init__.py |  7 ++++++-
 game_data_packager/build.py    | 12 ++++++++----
 4 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/data/quake2-music.control.in b/data/quake2-music.control.in
deleted file mode 100644
index 719672a..0000000
--- a/data/quake2-music.control.in
+++ /dev/null
@@ -1,12 +0,0 @@
-Description: Quake II soundtrack
- This package contains the Quake II soundtrack by Sonic Mayhem, Jer Sypult
- and Bill Brown, copied from the CD-ROM and encoded in Ogg Vorbis.
- Many modified Quake II engines can play this version of the soundtrack
- during gameplay without requiring the CD-ROM to be present.
- The original game would play these tracks from the CD, but many modern
- machines either do not have the necessary analogue pass-through cable
- from the CD drive to the sound card, or do not have an optical drive
- at all.
- .
- This package was generated using the "game-data-packager" program
- from the Debian package of the same name.
diff --git a/data/quake2.yaml b/data/quake2.yaml
index a6d7339..d165ca6 100644
--- a/data/quake2.yaml
+++ b/data/quake2.yaml
@@ -87,6 +87,17 @@ packages:
     copyright_notice: |
       This package contains the Quake II soundtrack by Sonic Mayhem, Jer Sypult
       and Bill Brown, copied from the CD-ROM and encoded in Ogg Vorbis.
+    description: |
+      This package contains the Quake II soundtrack by Sonic Mayhem, Jer Sypult
+      and Bill Brown, copied from the CD-ROM and encoded in Ogg Vorbis.
+      .
+      Many modified Quake II engines can play this version of the soundtrack
+      during gameplay without requiring the CD-ROM to be present.
+      .
+      The original game would play these tracks from the CD, but many modern
+      machines either do not have the necessary analogue pass-through cable
+      from the CD drive to the sound card, or do not have an optical drive
+      at all.
     rip_cd:
       encoding: vorbis
       filename_format: "baseq2/music/%02d.ogg"
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index d110df9..5b31b0d 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -78,7 +78,7 @@ class GameDataPackage(object):
         self.longname = None
 
         # This word is used to build package description
-        # 'data' / 'PWAD' / 'IWAD' / 'binaries'
+        # 'data' / 'music' / 'documentation' / 'PWAD' / 'IWAD' / 'binaries'
         self.data_type = 'data'
 
         # if not None, override the description completely
@@ -817,6 +817,11 @@ class GameData(object):
         if 'version' in d:
             package.version = d['version'] + '+' + GAME_PACKAGE_VERSION
 
+        if 'rip_cd' in d:
+            package.data_type = 'music'
+        elif package.section == 'doc':
+            package.data_type = 'documentation'
+
     def _populate_files(self, d, **kwargs):
         if d is None:
             return
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 894ed9b..7d991cc 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1767,19 +1767,23 @@ class PackagingTask(object):
         elif package.expansion_for and package.expansion_for in self.game.packages:
             game_name = (self.game.packages[package.expansion_for].longname
                          or self.game.longname)
-            long_desc += ' Game: ' + game_name + '\n'
-            long_desc += ' Expansion: ' + longname + '\n'
+            if game_name not in long_desc:
+                long_desc += ' Game: ' + game_name + '\n'
+            if longname != game_name:
+                long_desc += ' Expansion: ' + longname + '\n'
         else:
             long_desc += ' Game: ' + longname + '\n'
 
         copyright = package.copyright or self.game.copyright
-        long_desc += ' Published by: ' + copyright.split(' ', 2)[2]
+        copyright = copyright.split(' ', 2)[2]
+        if copyright not in long_desc:
+            long_desc += ' Published by: ' + copyright
 
         engine = self.packaging.substitute(
                 package.engine or self.game.engine,
                 package.name)
 
-        if engine and package.section == 'games':
+        if engine and package.data_type not in ('music', 'documentation'):
             long_desc += '\n.\n'
             if '|' in engine:
                 virtual = engine.split('|')[-1].strip()

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