mokoeightball: fix hardcoded paths and QA issues
authorMartin Jansa <Martin.Jansa@gmail.com>
Wed, 16 Feb 2011 15:31:04 +0000 (16:31 +0100)
committerMartin Jansa <Martin.Jansa@gmail.com>
Wed, 16 Feb 2011 16:55:29 +0000 (17:55 +0100)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
recipes/mokoeightball/mokoeightball/fixpath.patch [moved from recipes/mokoeightball/files/fixpath.patch with 85% similarity]
recipes/mokoeightball/mokoeightball_svn.bb

@@ -1,7 +1,7 @@
-Index: ./python/src/eightball.py
+Index: ./src/eightball.py
 ===================================================================
---- ./python/src/eightball.py  (revision 45)
-+++ ./python/src/eightball.py  (working copy)
+--- ./src/eightball.py (revision 45)
++++ ./src/eightball.py (working copy)
 @@ -47,12 +47,6 @@
        shakeTimer = None
  
@@ -29,10 +29,10 @@ Index: ./python/src/eightball.py
                self.ee.title = "Moko Eightball"
                self.ee.name_class = ( "MOKO_EIGHTBALL", "MOKO_EIGHTBALL" )
  #             self.ee.fullscreen = True
-Index: ./python/src/Accelerometer/__init__.py
+Index: ./src/Accelerometer/__init__.py
 ===================================================================
---- ./python/src/Accelerometer/__init__.py     (revision 45)
-+++ ./python/src/Accelerometer/__init__.py     (working copy)
+--- ./src/Accelerometer/__init__.py    (revision 45)
++++ ./src/Accelerometer/__init__.py    (working copy)
 @@ -30,7 +30,7 @@
  
  class EventManager(object):
index 63cf813..66c7d1a 100644 (file)
@@ -4,31 +4,35 @@ AUTHOR = "Jakob Westhoff"
 LICENSE = "GPLv2"
 SECTION = "x11/game"
 SRCREV = "45"
+DEPENDS = "edje-native"
 PV = "0.2+svnr${SRCPV}"
-PR = "r0"
-S = "${WORKDIR}/"
-FILES_${PN} += /usr/share/moko_eightball/Accelerometer/__init__.py
-FILES_${PN} += /usr/share/moko_eightball/themes/eightball.edj
+PR = "r1"
+FILES_${PN} += ${datadir}/moko_eightball/Accelerometer/__init__.py
+FILES_${PN} += ${datadir}/moko_eightball/themes/eightball.edj
 
-SRC_URI = "svn://svn.pureenergy.cc/moko_eightball;module=.;proto=svn \
-          file://files/fixpath.patch"
+SRC_URI = "svn://svn.pureenergy.cc/moko_eightball;module=python;proto=svn \
+          file://fixpath.patch"
+S = "${WORKDIR}/python"
 
 do_compile() {
-       cd python/src/data/themes
-       ./maketheme.sh
+        ${STAGING_BINDIR_NATIVE}/edje_cc -v -id src/data/images -fd src/data/fonts src/data/themes/eightball.edc -o eightball.edj
+       # fix hardcoded path
+       sed -i "s#/usr/share/moko_eightball#${datadir}/moko_eightball#g" src/eightball.py
+       sed -i "s#/usr/bin/env#env#g" src/eightball.py
+       # fix QA issues
+       sed -i "/^Encoding/d; /^SingleInstance/d; s/Name=Moko Eightball/Name=Eightball/g; s/Categories=GTK;Application;Games;Fun;/Categories=Game;/g" ipk/usr/share/applications/eightball.desktop
 }
 
 do_install() {
-       cd python
-       install -d 0755 ${D}/usr/share/moko_eightball
-       install -d 0755 ${D}/usr/share/moko_eightball/Accelerometer
-       install -d 0755 ${D}/usr/share/moko_eightball/themes
-       install -d 0755 ${D}/usr/share/applications
-       install -d 0755 ${D}/usr/share/pixmaps
-       install -d 0755 ${D}/usr/bin
-       install -m 0755 src/eightball.py ${D}/usr/bin/eightball
-       install -m 0644 src/Accelerometer/__init__.py ${D}/usr/share/moko_eightball/Accelerometer/
-       install -m 0644 src/data/themes/eightball.edj ${D}/usr/share/moko_eightball/themes/eightball.edj
-       install -m 0644 ipk/usr/share/applications/eightball.desktop ${D}/usr/share/applications/eightball.desktop
-       install -m 0644 ipk/usr/share/pixmaps/eightball.png ${D}/usr/share/pixmaps/eightball.png
+       install -d 0755 ${D}${datadir}/moko_eightball
+       install -d 0755 ${D}${datadir}/moko_eightball/Accelerometer
+       install -d 0755 ${D}${datadir}/moko_eightball/themes
+       install -d 0755 ${D}${datadir}/applications
+       install -d 0755 ${D}${datadir}/pixmaps
+       install -d 0755 ${D}${bindir}
+       install -m 0755 src/eightball.py ${D}${bindir}/eightball
+       install -m 0644 src/Accelerometer/__init__.py ${D}${datadir}/moko_eightball/Accelerometer/
+       install -m 0644 eightball.edj ${D}${datadir}/moko_eightball/themes/eightball.edj
+       install -m 0644 ipk/usr/share/applications/eightball.desktop ${D}${datadir}/applications/eightball.desktop
+       install -m 0644 ipk/usr/share/pixmaps/eightball.png ${D}${datadir}/pixmaps/eightball.png
 }