Skip to content

Commit

Permalink
step 1: template deb
Browse files Browse the repository at this point in the history
  • Loading branch information
jmtd committed Jan 23, 2011
1 parent e6ce0db commit 68af7e5
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ default: $(DIRS)
LONG="Final Doom: The Plutonia Experiment" VERSION=$(VERSION)
make -f quake3.mk LONG="Quake III Arena" VERSION=$(VERSION)
make -f rott.mk VERSION=$(VERSION)
make -f doom-common.mk IWAD=heretic VERSION=$(VERSION) \
CONTROLIN=heretic/DEBIAN/control.in \
LONG="Heretic: Shadow of the Serpent Riders" GAME=heretic

$(DIRS):
mkdir -p $@
Expand All @@ -25,6 +28,9 @@ clean:
LONG="Final Doom: The Plutonia Experiment" VERSION=$(VERSION) clean
make -f quake3.mk LONG="Quake III Arena" VERSION=$(VERSION) clean
make -f rott.mk VERSION=$(VERSION) clean
make -f doom-common.mk IWAD=heretic VERSION=$(VERSION) \
CONTROLIN=heretic/DEBIAN/control.in \
LONG="Heretic: Shadow of the Serpent Riders" GAME=heretic clean
for d in $(DIRS); do [ ! -d "$$d" ] || rmdir "$$d"; done

.PHONY: default clean
14 changes: 9 additions & 5 deletions doom-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ $(IWAD)DEB=out/$(IWAD)-wad_$(VERSION)_all.deb

$(IWAD)TARGETS := $(addprefix build/, $(IWAD)DIRS $(IWAD)-wad/DEBIAN/control $(IWAD)-wad/usr/share/doc/$(IWAD)-wad/changelog.gz $(IWAD)-wad/usr/share/pixmaps/$(IWAD).xpm $(IWAD)-wad/DEBIAN/preinst $(IWAD)-wad/usr/share/applications/$(IWAD)-wad.desktop $(IWAD)-wad/usr/share/doc/$(IWAD)-wad/README.Debian $(IWAD)-wad/usr/share/doc/$(IWAD)-wad/copyright $(IWAD)-wad/DEBIAN/md5sums)

# defined as a variable so it can be overriden by the caller, e.g. heretic
GAME = doom
CONTROLIN = doom-common/DEBIAN/control.in

DIRS := \
$(IWAD)-wad/DEBIAN \
$(IWAD)-wad/usr/share/pixmaps \
$(IWAD)-wad/usr/share/applications \
$(IWAD)-wad/usr/share/doc/$(IWAD)-wad \
$(IWAD)-wad/usr/share/doc \
$(IWAD)-wad/usr/share/games/game-data-packager \
$(IWAD)-wad/usr/share/games/doom \
$(IWAD)-wad/usr/share/games/$(GAME) \
$(IWAD)-wad/usr/share/games \
$(IWAD)-wad/usr/share \
$(IWAD)-wad/usr \
Expand All @@ -38,17 +42,17 @@ build/$(IWAD)-wad/usr/share/doc/$(IWAD)-wad/README.Debian:
> $@

build/$(IWAD)-wad/usr/share/applications/$(IWAD)-wad.desktop:
m4 -DGAME=$(IWAD) -DLONG="$(LONG)" \
m4 -DGAME=$(IWAD) -DLONG="$(LONG)" -DENGINE=$(GAME) \
doom-common/usr/share/applications/doom-common.desktop.in \
> $@
> $@

build/$(IWAD)-wad/DEBIAN/preinst:
m4 -DIWAD=$(IWAD).wad \
doom-common/DEBIAN/preinst.in > $@

build/$(IWAD)-wad/DEBIAN/control: doom-common/DEBIAN/control.in
build/$(IWAD)-wad/DEBIAN/control: $(CONTROLIN)
m4 -DPACKAGE=$(IWAD)-wad -DGAME=$(IWAD) -DVERSION=$(VERSION) \
doom-common/DEBIAN/control.in > $@
-DENGINE=$(GAME) $(CONTROLIN) > $@

build/$(IWAD)-wad/usr/share/doc/$(IWAD)-wad/changelog.gz:
gzip -c9 debian/changelog > $@
Expand Down
2 changes: 1 addition & 1 deletion doom-common/DEBIAN/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Installed-Size: 56
Conflicts: freedoom (<< 0.6.4-4), freedm (<< 0.6.4-4)
Version: VERSION
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Description: IWAD from ID Software's GAME computer game
Description: IWAD from ID Software's $(LONG) computer game
Doom requires both a doom-engine and a doom-wad to play. This package
contains the IWAD from ID Software's game "GAME"
and was generated using the "game-data-packager" program.
4 changes: 2 additions & 2 deletions doom-common/usr/share/applications/doom-common.desktop.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[Desktop Entry]
Name=LONG
GenericName=First Person Shooter Game
TryExec=doom
Exec=doom -iwad /usr/share/games/doom/GAME.wad
TryExec=ENGINE
Exec=ENGINE -iwad /usr/share/games/ENGINE/GAME.wad
Icon=GAME.xpm
Terminal=false
Type=Application
Expand Down
13 changes: 13 additions & 0 deletions heretic/DEBIAN/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: PACKAGE
Section: non-free/games
Priority: optional
Architecture: all
Recommends: heretic-engine
Provides: heretic-wad
Installed-Size: 56
Version: VERSION
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Description: IWAD from Raven Software's heretic computer game
Heretic requires both a heretic-engine and a heretic-wad to play. This package
contains the IWAD from ID Software's game "GAME"
and was generated using the "game-data-packager" program.

0 comments on commit 68af7e5

Please sign in to comment.