[oe-commits] Martin Jansa : mokoeightball: fix hardcoded paths and QA issues
git version control
git at git.openembedded.org
Wed Feb 16 16:56:14 UTC 2011
Module: openembedded.git
Branch: master
Commit: 97240c982e03a8161ebf0b24a51d07d57fdd04d7
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=97240c982e03a8161ebf0b24a51d07d57fdd04d7
Author: Martin Jansa <Martin.Jansa at gmail.com>
Date: Wed Feb 16 16:31:04 2011 +0100
mokoeightball: fix hardcoded paths and QA issues
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
.../{files => mokoeightball}/fixpath.patch | 12 +++---
recipes/mokoeightball/mokoeightball_svn.bb | 44 +++++++++++---------
2 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/recipes/mokoeightball/files/fixpath.patch b/recipes/mokoeightball/mokoeightball/fixpath.patch
similarity index 85%
rename from recipes/mokoeightball/files/fixpath.patch
rename to recipes/mokoeightball/mokoeightball/fixpath.patch
index 8fd82cf..7748514 100644
--- a/recipes/mokoeightball/files/fixpath.patch
+++ b/recipes/mokoeightball/mokoeightball/fixpath.patch
@@ -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):
diff --git a/recipes/mokoeightball/mokoeightball_svn.bb b/recipes/mokoeightball/mokoeightball_svn.bb
index 63cf813..66c7d1a 100644
--- a/recipes/mokoeightball/mokoeightball_svn.bb
+++ b/recipes/mokoeightball/mokoeightball_svn.bb
@@ -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
}
More information about the Openembedded-commits
mailing list