Merge branch 'org.openembedded.dev' of ssh+git://git@git.openembedded.net/openembedde...
[openembedded.git] / classes / sdl.bbclass
index d458a14..dc4cd8f 100644 (file)
@@ -4,37 +4,43 @@
 
 DEPENDS += "virtual/libsdl libsdl-mixer libsdl-image"
 
-APPDESKTOP ?= "${PN}.desktop"
+APPDESKTOP ?= "${WORKDIR}/${PN}.desktop"
 APPNAME ?= "${PN}"
-APPIMAGE ?= "${PN}.png"
+APPIMAGE ?= "${WORKDIR}/${PN}.png"
+
+export SDL_CONFIG = "${STAGING_BINDIR_CROSS}/sdl-config"
 
 sdl_do_sdl_install() {
-       install -d ${D}${palmtopdir}/bin
-       install -d ${D}${palmtopdir}/pics
-       install -d ${D}${palmtopdir}/apps/Games
-       ln -sf ${bindir}/${APPNAME} ${D}${palmtopdir}/bin/${APPNAME}
-       install -m 0644 ${APPIMAGE} ${D}${palmtopdir}/pics/${APPIMAGE}
+       install -d ${D}${datadir}/applications
+       install -d ${D}${datadir}/pixmaps
+
+       install -m 0644 ${APPIMAGE} ${D}${datadir}/pixmaps/${PN}.png
 
        if [ -e "${APPDESKTOP}" ]
        then
-               install -m 0644 ${APPDESKTOP} ${D}${palmtopdir}/Games/${APPDESKTOP}
+               echo ${APPDESKTOP} present, using it...
+               install -m 0644 ${APPDESKTOP} ${D}${datadir}/applications/
        else
                echo ${APPDESKTOP} not present, creating one on-the-fly...
-               cat >${D}${palmtopdir}/apps/Games/${PN}.desktop <<EOF
+               cat >${D}${datadir}/applications/${PN}.desktop <<EOF
 [Desktop Entry]
-Note=Auto Generated... this may be not what you want
+Name=${PN}
 Comment=${DESCRIPTION}
+Note=Auto Generated by OE SDL bbclass
 Exec=${APPNAME}
-Icon=${APPIMAGE}
+Icon=${PN}.png
 Type=Application
-Name=${PN}
+Categories=Games
 EOF
        fi
 }
 
 EXPORT_FUNCTIONS do_sdl_install
-addtask sdl_install after do_compile before do_populate_staging
+addtask sdl_install after do_install before do_package
+
+#SECTION = "x11/games"
+#SECTION_${PN}-opie = "opie/games"
 
-PACKAGES += "${PN}-opie"
-RDEPENDS_${PN}-opie += "${PN}"
-FILES_${PN}-opie = "${palmtopdir}"
+#PACKAGES += "${PN}-opie"
+#RDEPENDS_${PN}-opie += "${PN}"
+#FILES_${PN}-opie = "${palmtopdir}"