systemd: remove automounting
[AGL/meta-agl.git] / meta-app-framework / classes / aglwgt.bbclass
index 734e979..afe9a55 100644 (file)
@@ -26,12 +26,36 @@ do_aglwgt_package()  {
                         )
 }
 
+python () {
+    d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1')
+}
+
+
+POST_INSTALL_LEVEL ?= "10"
+POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh"
+
+EXTRA_WGT_POSTINSTALL ?= ""
+
 do_aglwgt_deploy() {
-        install -d ${D}/usr/AGL/apps
-        install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/
+    install -d ${D}/usr/AGL/apps
+    install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/
+    APP_FILES=""
+    for file in ${D}/usr/AGL/apps/*.wgt;do
+        APP_FILES="${APP_FILES} $(basename $file)";
+    done
+    install -d ${D}/${sysconfdir}/agl-postinsts
+    cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF
+#!/bin/sh -e
+for file in ${APP_FILES}; do
+    /usr/bin/afm-install install /usr/AGL/apps/\$file
+done
+sync
+${EXTRA_WGT_POSTINSTALL}
+EOF
+    chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}
 }
 
-FILES_${PN} += "/usr/AGL/apps/*.wgt"
+FILES_${PN} += "/usr/AGL/apps/*.wgt ${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}"
 
-addtask aglwgt_package before do_build after do_compile
-addtask aglwgt_deploy  before do_build after do_install
\ No newline at end of file
+addtask aglwgt_deploy  before do_package after do_install
+addtask aglwgt_package before do_aglwgt_deploy after do_compile