doom-wad: split out and fix installation of Doom shareware wad file
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Wed, 24 Sep 2008 12:53:45 +0000 (12:53 -0000)
committerHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Wed, 24 Sep 2008 12:53:45 +0000 (12:53 -0000)
This patch splits the installation of the shareware WAD file into a separate
package. The wad file will also be installed into /usr/share/games/doom
directory, since the client will search this directory when starting.

The Makefile rule has also been altered to use tools defined by Buildroot to
extract and install the wad file. The package is also multiple project safe
now.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
package/games/Config.in
package/games/doom-wad/Config.in [new file with mode: 0644]
package/games/doom-wad/doom-wads.mk [new file with mode: 0644]
package/games/lxdoom/Config.in
package/games/lxdoom/lxdoom-wad.mk [deleted file]

index 45d3c82661bed0ae3c3f5e4dd77a7dae2e7ee3f4..3ed5393f6e649aec742d4262c6caec8a0ddb3187 100644 (file)
@@ -6,6 +6,7 @@ menuconfig BR2_GAMES
 
 if BR2_GAMES
 source "package/games/ace_of_penguins/Config.in"
+source "package/games/doom-wad/Config.in"
 source "package/games/gnuchess/Config.in"
 source "package/games/lxdoom/Config.in"
 source "package/games/magiccube4d/Config.in"
diff --git a/package/games/doom-wad/Config.in b/package/games/doom-wad/Config.in
new file mode 100644 (file)
index 0000000..14d144d
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_DOOM_WAD
+       bool "shareware Doom WAD file"
+       depends on BR2_PACKAGE_LXDOOM
+       help
+          This will install the shareware wad data file for the doom game.
+
+          The wad file will be placed in the /usr/share/games/doom directory.
diff --git a/package/games/doom-wad/doom-wads.mk b/package/games/doom-wad/doom-wads.mk
new file mode 100644 (file)
index 0000000..d5ea01d
--- /dev/null
@@ -0,0 +1,35 @@
+#############################################################
+#
+# doom-wad
+#
+#############################################################
+
+DOOM_WAD_VERSION = 1.8
+DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz
+DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom/
+DOOM_WAD_DIR=$(BUILD_DIR)/doom-wad-$(DOOM_WAD_VERSION)
+
+$(DL_DIR)/$(DOOM_WAD_SOURCE):
+        $(WGET) -P $(DL_DIR) $(DOOM_WAD_SITE)/$(DOOM_WAD_SOURCE)
+
+doom-wad-source: $(DL_DIR)/$(DOOM_WAD_SOURCE)
+
+$(DOOM_WAD_DIR)/.unpacked: $(DL_DIR)/$(DOOM_WAD_SOURCE)
+       $(INSTALL) -D $(DL_DIR)/$(DOOM_WAD_SOURCE) $(DOOM_WAD_DIR)/$(DOOM_WAD_SOURCE)
+       $(ZCAT) $(DOOM_WAD_DIR)/$(DOOM_WAD_SOURCE) > \
+               $(DOOM_WAD_DIR)/doom-$(DOOM_WAD_VERSION).wad
+       touch $@
+
+$(TARGET_DIR)/usr/share/games/doom/doom1.wad: $(DOOM_WAD_DIR)/.unpacked
+       $(INSTALL) -D $(DOOM_WAD_DIR)/doom-$(DOOM_WAD_VERSION).wad $@
+
+doom-wad: $(TARGET_DIR)/usr/share/games/doom/doom1.wad
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_DOOM_WAD)),y)
+TARGETS+=doom-wad
+endif
index 892e45c8fcb78f2e628cab9f84782c1adc2bc14e..a8fdde8517ccf3b1bfef7cfc6cb177a3ee7a6ef4 100644 (file)
@@ -2,8 +2,3 @@ config BR2_PACKAGE_LXDOOM
        bool "lxdoom"
        help
          This is the linux version of the popular doom game.
-config BR2_PACKAGE_LXDOOM_WAD
-       bool "lxdoom-wad"
-       depends on BR2_PACKAGE_LXDOOM
-       help
-         This is the shareware wad data files for the doom game.
diff --git a/package/games/lxdoom/lxdoom-wad.mk b/package/games/lxdoom/lxdoom-wad.mk
deleted file mode 100644 (file)
index 0f7d799..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#############################################################
-#
-# lxdoom-wad
-#
-#############################################################
-
-LXDOOM_WAD_VERSION = 1.8
-LXDOOM_WAD_SOURCE = doom-$(LXDOOM_WAD_VERSION).wad.gz
-LXDOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom/
-LXDOOM_WAD_DIR=$(BUILD_DIR)/lxdoom-$(LXDOOM_WAD_VERSION)-wad
-
-$(DL_DIR)/$(LXDOOM_WAD_SOURCE):
-        $(WGET) -P $(DL_DIR) $(LXDOOM_WAD_SITE)/$(LXDOOM_WAD_SOURCE)
-
-$(LXDOOM_WAD_DIR)/.unpacked: $(DL_DIR)/$(LXDOOM_WAD_SOURCE)
-       mkdir -p $(LXDOOM_WAD_DIR)
-       cp -f $(DL_DIR)/$(LXDOOM_WAD_SOURCE) $(LXDOOM_WAD_DIR)
-       gunzip -d $(LXDOOM_WAD_DIR)/$(LXDOOM_WAD_SOURCE)
-       touch $@
-
-$(LXDOOM_WAD_DIR)/.installed: $(LXDOOM_WAD_DIR)/.unpacked
-       cp -f $(LXDOOM_WAD_DIR)/* $(TARGET_DIR)/usr/games
-       touch $@
-
-lxdoom-wad: lxdoom $(LXDOOM_WAD_DIR)/.installed
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_LXDOOM_WAD)),y)
-TARGETS+=lxdoom-wad
-endif
-