[game-data-packager] 05/24: this add the debian/engine field in yaml and add it to recommends
Simon McVittie
smcv at debian.org
Sat Jan 17 23:28:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit ba0096a45c481e3a3717f23e698657f78567435a
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sat Jan 17 21:31:19 2015 +0100
this add the debian/engine field in yaml and add it to recommends
the Recommends fields could also hold other things,
like a level editor, so an other yaml field debian/recommends
could be usefull. debian/engine will also be used to build
the long description
---
data/spear-of-destiny-data.control.in | 9 ---------
data/spear-of-destiny-mission2-data.control.in | 1 -
data/spear-of-destiny.yaml | 4 ++++
lib/game_data_packager/__init__.py | 20 +++++++++++++++-----
4 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/data/spear-of-destiny-data.control.in b/data/spear-of-destiny-data.control.in
index 3878e81..0d04206 100644
--- a/data/spear-of-destiny-data.control.in
+++ b/data/spear-of-destiny-data.control.in
@@ -1,13 +1,4 @@
-Package: spear-of-destiny-data
-Provides: wolf3d-data
-Section: non-free/games
-Priority: optional
-Architecture: all
-Multi-Arch: foreign
-Recommends: wolf4sdl
-Installed-Size: 56
Version: VERSION
-Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Description: Game data for Wolfenstein 3D sequel: Spear Of Destiny
wolf4sdl requires game data to play. This package contains
the commercial game data from Spear Of Destiny,
diff --git a/data/spear-of-destiny-mission2-data.control.in b/data/spear-of-destiny-mission2-data.control.in
index 8493824..89feaa5 100644
--- a/data/spear-of-destiny-mission2-data.control.in
+++ b/data/spear-of-destiny-mission2-data.control.in
@@ -1,4 +1,3 @@
-Recommends: wolf4sdl
Version: VERSION
Description: Spear of Destiny - Mission 2: Return to Danger
This package contains extra levels for Spear Of Destiny,
diff --git a/data/spear-of-destiny.yaml b/data/spear-of-destiny.yaml
index 26155b0..7a53e69 100644
--- a/data/spear-of-destiny.yaml
+++ b/data/spear-of-destiny.yaml
@@ -26,6 +26,8 @@ packages:
spear-of-destiny-demo-data:
longname: "Spear of Destiny (shareware)"
demo_for: spear-of-destiny-data
+ debian:
+ engine: wolf4sdl
install_to: usr/share/games/wolf3d
install_files_from_cksums: |
1612205268 1072 audiohed.sdm
@@ -41,6 +43,8 @@ packages:
spear-of-destiny-data:
longname: "Spear of Destiny (registered version, mission 1)"
+ debian:
+ engine: wolf4sdl
install_to: usr/share/games/wolf3d
install_files_from_cksums: |
3311987448 1072 audiohed.sod
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 8ca9b0e..e64be8d 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -335,6 +335,9 @@ class GameDataPackage(object):
# Steam ID and path
self.steam = {}
+ # depedency information needed to build the debian/control file
+ self.debian = {}
+
# set of names of WantedFile instances to be installed
self._install = set()
@@ -651,7 +654,7 @@ class GameData(object):
def _populate_package(self, package, d):
for k in ('demo_for', 'expansion_for', 'longname', 'symlinks', 'install_to',
- 'install_to_docdir', 'install_contents_of', 'steam'):
+ 'install_to_docdir', 'install_contents_of', 'steam', 'debian'):
if k in d:
setattr(package, k, d[k])
@@ -1491,24 +1494,31 @@ class GameData(object):
control['Multi-Arch'] = 'foreign'
depends = set()
+ recommends = set()
suggests = set()
if 'Depends' in control:
for depend in control['Depends'].split(','):
- depend = depend.strip()
- depends.add(depend)
+ depends.add(depend.strip())
+ if 'Recommends' in control:
+ for recommend in control['Recommends'].split(','):
+ recommends.add(recommend.strip())
if 'Suggests' in control:
for suggest in control['Suggests'].split(','):
- suggest = suggest.strip()
- suggests.add(suggest)
+ suggests.add(suggest.strip())
if package.expansion_for:
depends.add(package.expansion_for)
+ engine = package.debian.get('engine')
+ if engine:
+ recommends.add(engine)
for other_package in self.packages.values():
if other_package.expansion_for == package.name:
suggests.add(other_package.name)
if depends:
control['Depends'] = ', '.join(depends)
+ if recommends:
+ control['Recommends'] = ', '.join(recommends)
if suggests:
control['Suggests'] = ', '.join(suggests)
--
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