scummvm-0.9.1: update packaging, make default, openmoko integration
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sun, 19 Aug 2007 11:23:57 +0000 (11:23 +0000)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Sun, 19 Aug 2007 11:23:57 +0000 (11:23 +0000)
* remove DEFAULT_PREFERENCE="-1"
* don't strip executable during install, we do that while packaging
* add openmoko-scummvm script for fic-gta01 and scummvm.desktop file.
* package the modern theme by default - maybe this should go
  into a separate scummvm-theme package, RRECOMMENDED by scummvm

packages/scummvm/files/fic-gta01/.mtn2git_empty [new file with mode: 0644]
packages/scummvm/files/fic-gta01/openmoko-scummvm [new file with mode: 0755]
packages/scummvm/files/makefile-nostrip.patch [new file with mode: 0644]
packages/scummvm/files/scummvm.desktop [new file with mode: 0644]
packages/scummvm/scummvm_0.9.1.bb

diff --git a/packages/scummvm/files/fic-gta01/.mtn2git_empty b/packages/scummvm/files/fic-gta01/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/scummvm/files/fic-gta01/openmoko-scummvm b/packages/scummvm/files/fic-gta01/openmoko-scummvm
new file mode 100755 (executable)
index 0000000..e8c5cb3
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Save current AUX Key mapping
+SAVE_KEY="$(xmodmap -pke | grep 'keycode   8')"
+
+# Map AUX Key to F5
+xmodmap -e "keycode 8 = F5"
+
+# Turn LCD feft
+xrandr -o left
+
+# Start the scummvm in fullscreen mode
+scummvm --fullscreen --themepath=/usr/share/scummvm/
+
+# Turn LCD normal
+xrandr -o normal
+
+# Restore the AUX Key mapping
+xmodmap -e "$SAVE_KEY"
diff --git a/packages/scummvm/files/makefile-nostrip.patch b/packages/scummvm/files/makefile-nostrip.patch
new file mode 100644 (file)
index 0000000..7f9c8b4
--- /dev/null
@@ -0,0 +1,13 @@
+Index: scummvm-0.9.1/Makefile
+===================================================================
+--- scummvm-0.9.1.orig/Makefile        2007-08-18 13:02:07.000000000 +0200
++++ scummvm-0.9.1/Makefile     2007-08-18 13:02:24.000000000 +0200
+@@ -45,7 +45,7 @@
+ install: all
+       $(INSTALL) -d "$(DESTDIR)$(BINDIR)"
+-      $(INSTALL) -c -s -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(DESTDIR)$(BINDIR)/scummvm$(EXEEXT)"
++      $(INSTALL) -c -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(DESTDIR)$(BINDIR)/scummvm$(EXEEXT)"
+       $(INSTALL) -d "$(DESTDIR)$(MANDIR)/man6/"
+       $(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
+       $(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/pixmaps/"
diff --git a/packages/scummvm/files/scummvm.desktop b/packages/scummvm/files/scummvm.desktop
new file mode 100644 (file)
index 0000000..96c0250
--- /dev/null
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=ScummVM
+Name[pl]=ScummVM
+Comment=Interpreter for several adventure games
+Comment[pl]=Interpreter graficznych gier przygodowych
+Exec=openmoko-scummvm
+Icon=scummvm.xpm
+Terminal=false
+Type=Application
+Categories=Application;Game;AdventureGame;
+StartupNotify=false
index 5d1e2c1..41c7832 100644 (file)
@@ -1,8 +1,12 @@
-DEFAULT_PREFERENCE = "-1"
-
 require scummvm.inc
 DEPENDS = "virtual/libsdl libmad libvorbis libogg zlib mpeg2dec"
 
+SRC_URI += "file://makefile-nostrip.patch;patch=1"
+SRC_URI_append_openmoko = " file://openmoko-scummvm \
+                           file://scummvm.desktop"
+
+SRC_URI_OVERRIDES_PACKAGE_ARCH = "1"
+
 EXTRA_OECONF += "--enable-lure \
                 --enable-agi \
                 --enable-cine \
@@ -10,7 +14,20 @@ EXTRA_OECONF += "--enable-lure \
 
 do_compile() {
        oe_runmake CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS} -lmpeg2" \
-                   DEFINES="-DUNIX -DSCUMM_NEED_ALIGNMENT  -DUSE_MAD -DUSE_VORBIS -DUSE_ZLIB -DUSE_MPEG2"
+                  DEFINES="-DUNIX -DSCUMM_NEED_ALIGNMENT -DUSE_MAD -DUSE_VORBIS -DUSE_ZLIB -DUSE_MPEG2"
 }
 
 
+do_install_append() {
+       if [ -f ${WORKDIR}/openmoko-scummvm ]; then
+               install -d ${D}${bindir}
+               install -m 0755 ${WORKDIR}/openmoko-scummvm ${D}${bindir}/openmoko-scummvm
+       fi
+       if  [ -f ${WORKDIR}/scummvm.desktop ]; then
+               install -d ${D}${datadir}/applications
+               install -m 0644 ${WORKDIR}/scummvm.desktop ${D}${datadir}/applications
+       fi
+       install -d ${D}${datadir}/scummvm
+       install -m 0644 gui/themes/modern.ini ${D}${datadir}/scummvm/ 
+       install -m 0644 gui/themes/modern.zip ${D}${datadir}/scummvm/
+}