[game-data-packager] 11/24: hexen: add support for demo, remove boilerplate
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 64cde735565ab896d463a432fe5a6c849e7cc279
Author: Simon McVittie <smcv at debian.org>
Date: Sat Jan 17 22:19:55 2015 +0000
hexen: add support for demo, remove boilerplate
---
data/hexen-deathkings-data.control.in | 10 -------
data/hexen-demo-data.control.in | 5 ++++
data/hexen.control.in | 9 ------
data/hexen.yaml | 43 +++++++++++++++--------------
lib/game_data_packager/games/doom_common.py | 12 ++++++--
5 files changed, 37 insertions(+), 42 deletions(-)
diff --git a/data/hexen-deathkings-data.control.in b/data/hexen-deathkings-data.control.in
index 33acb9d..e7172b6 100644
--- a/data/hexen-deathkings-data.control.in
+++ b/data/hexen-deathkings-data.control.in
@@ -1,14 +1,4 @@
-Package: PACKAGE
-Section: non-free/games
-Priority: optional
-Architecture: all
-Multi-Arch: foreign
-Recommends: chocolate-doom | hexen-engine
-Depends: hexen-wad
Breaks: chocolate-doom (<< 2)
-Installed-Size: 56
-Version: VERSION
-Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Description: Hexen: Deathkings of the Dark Citadel PWAD
Hexen requires both a hexen-engine and data files to play. This package
contains the data files from the Hexen expansion "Deathkings of the
diff --git a/data/hexen-demo-data.control.in b/data/hexen-demo-data.control.in
new file mode 100644
index 0000000..02fb251
--- /dev/null
+++ b/data/hexen-demo-data.control.in
@@ -0,0 +1,5 @@
+Provides: hexen-wad
+Description: IWAD from Raven Software's Hexen computer game
+ Hexen requires both a hexen-engine and a hexen-wad to play. This package
+ contains the IWAD from the demo version of Raven Software's game Hexen
+ and was generated using the "game-data-packager" program.
diff --git a/data/hexen.control.in b/data/hexen.control.in
index 1dad43c..c7015a3 100644
--- a/data/hexen.control.in
+++ b/data/hexen.control.in
@@ -1,14 +1,5 @@
-Package: PACKAGE
-Section: non-free/games
-Priority: optional
-Architecture: all
-Multi-Arch: foreign
-Recommends: chocolate-doom | hexen-engine
Breaks: chocolate-doom (<< 2)
Provides: hexen-wad
-Installed-Size: 56
-Version: VERSION
-Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Description: IWAD from Raven Software's hexen computer game
Hexen requires both a hexen-engine and a hexen-wad to play. This package
contains the IWAD from Raven Software's game "GAME"
diff --git a/data/hexen.yaml b/data/hexen.yaml
index a0720b4..0b15542 100644
--- a/data/hexen.yaml
+++ b/data/hexen.yaml
@@ -16,9 +16,9 @@ help_text: |
The demo version of hexen is not currently supported.
-# hexen-demo-data requires HEXEN.WAD from the Hexen demo v1.2, which
-# will be downloaded automatically if necessary. It will be renamed to
-# hexendemo.wad to avoid colliding with the full version of Hexen.
+ hexen-demo-data requires HEXEN.WAD from the Hexen demo v1.0, which
+ will be downloaded automatically if necessary. It will be renamed to
+ hexendemo.wad to avoid colliding with the full version of Hexen.
plugin: doom_common
doom_engine: hexen
@@ -28,6 +28,8 @@ packages:
install_to: usr/share/games/doom
install:
- hexen.wad
+ debian:
+ engine: "chocolate-doom | hexen-engine"
hexen-deathkings-data:
longname: "Hexen: Deathkings of the Dark Citadel"
@@ -35,14 +37,18 @@ packages:
expansion_for: hexen-wad
install:
- hexdd.wad
+ debian:
+ engine: "chocolate-doom | hexen-engine"
- # Disabled, doesn't seem to work
- #hexen-demo-data:
- # longname: "Hexen: Beyond Heretic (demo)"
- # install_to: usr/share/games/doom
- # demo_for: hexen-wad
- # install:
- # - hexendemo.wad
+ hexen-demo-data:
+ longname: "Hexen: Beyond Heretic (demo)"
+ install_to: usr/share/games/doom
+ demo_for: hexen-wad
+ install:
+ - hexendemo.wad
+ doom_engine: doomsday-compat
+ debian:
+ engine: doomsday
files:
@@ -56,18 +62,13 @@ files:
- hexdd.wad_1.0
hexendemo.wad:
- alternatives:
- - hexen.wad_demo_1.0
-
- hexen.wad_demo_1.0:
size: 10644136
- look_for: [hexen.wad]
- unsuitable: Hexen 1.1 (registered) is required
+ look_for: [hexen.wad, hexendemo.wad]
hexen.wad_demo_beta:
size: 10615976
- look_for: [hexen.wad]
- unsuitable: Hexen 1.1 (registered) is required
+ look_for: [hexen.wad, hexendemo.wad]
+ unsuitable: Hexen 1.0 (demo) is required
hexdd.wad_1.1:
size: 4440584
@@ -99,13 +100,13 @@ files:
sha1: 02c3a8ac4417e17a3519524d96696111fe1c278c
sha256: 469ee3a254959d2fca624aec7391292fbd1ac3ebd9074b65f05cbc74de3c4572
size: 5664734
- provides: [hexen.wad_demo_1.0]
+ provides: [hexendemo.wad]
unpack:
format: zip
md5sums: |
9178a32a496ff5befebfe6c47dac106c hexen.wad_demo_beta
- 876a5a44c7b68f04b3bb9bc7a5bd69d6 hexen.wad_demo_1.0
+ 876a5a44c7b68f04b3bb9bc7a5bd69d6 hexendemo.wad
c88a2bb3d783e2ad7b599a8e301e099e hexen.wad_beta
b2543a03521365261d0a0f74d5dd90f0 hexen.wad_1.0
abb033caf81e26f12a2103e1fa25453f hexen.wad_1.1
@@ -113,7 +114,7 @@ md5sums: |
78d5898e99e220e4de64edaa0e479593 hexdd.wad_1.1
sha1sums: |
- fa89a2475855e43c7f7e3198d6e4c4bee23bfab9 hexen.wad_demo_1.0
+ fa89a2475855e43c7f7e3198d6e4c4bee23bfab9 hexendemo.wad
4b53832f0733c1e29e5f1de2428e5475e891af29 hexen.wad_1.1
c3065527d62b05a930fe75fe8181a64fb1982976 hexdd.wad_1.0
081f6a2024643b54ef4a436a85508539b6d20a1e hexdd.wad_1.1
diff --git a/lib/game_data_packager/games/doom_common.py b/lib/game_data_packager/games/doom_common.py
index b3173d5..2d16d05 100644
--- a/lib/game_data_packager/games/doom_common.py
+++ b/lib/game_data_packager/games/doom_common.py
@@ -35,6 +35,11 @@ def subst(from_, to, **kwargs):
to.write(line)
class WadPackage(GameDataPackage):
+ def __init__(self, name):
+ super(WadPackage, self).__init__(name)
+
+ self.engine = None
+
@property
def main_wad(self):
for f in self.install:
@@ -81,6 +86,9 @@ class DoomGameData(GameData):
for package in self.packages.values():
assert package.main_wad is not None
+ package.engine = self.yaml['packages'][package.name].get(
+ 'doom_engine')
+
def construct_package(self, binary):
return WadPackage(binary)
@@ -99,7 +107,7 @@ class DoomGameData(GameData):
wad_base = os.path.splitext(package.main_wad)[0]
desc = control['Description']
- desc = desc.replace('ENGINE', self.engine)
+ desc = desc.replace('ENGINE', (package.engine or self.engine))
desc = desc.replace('GAME', wad_base)
desc = desc.replace('LONG', (package.longname or self.longname))
control['Description'] = desc
@@ -145,7 +153,7 @@ class DoomGameData(GameData):
'w'),
GAME=wad_base,
LONG=(package.longname or self.longname),
- ENGINE=self.engine)
+ ENGINE=(package.engine or self.engine))
break
else:
raise AssertionError('doom-common.desktop.in should have existed')
--
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