4 # Jan-Simon Moeller, jsmoeller@linuxfoundation.org
6 # This class expects a "make package" target in the makefile
7 # which creates the wgt files in the package/ subfolder.
8 # The makefile needs to use wgtpkg-pack.
12 # 'wgtpkg-pack' in af-main-native is required.
13 DEPENDS_append = " af-main-native"
15 # for bindings af-binder is required.
16 DEPENDS_append = " af-binder"
18 # for hal bindings genskel is required.
19 DEPENDS_append = " af-binder-devtools-native"
23 ${S}/conf.d/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B}/package VERBOSE=TRUE || \
25 ( bbwarn "Your makefile must support the 'make package' target" ; \
26 bbwarn "and generate a .wgt file using wgtpack in the"; \
27 bbwarn "subfolder ./package/ !" ; \
28 bbwarn "Fix your package as it will not work within the SDK" ; \
29 bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes" \
34 d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1')
38 POST_INSTALL_LEVEL ?= "10"
39 POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh"
41 EXTRA_WGT_POSTINSTALL ?= ""
44 if [ "${AGLWGT_AUTOINSTALL_${PN}}" = "0" ]
46 install -d ${D}/usr/AGL/apps/manualinstall
47 install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/manualinstall
49 install -d ${D}/usr/AGL/apps/autoinstall
50 install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/autoinstall
54 for file in ${D}/usr/AGL/apps/autoinstall/*.wgt;do
55 APP_FILES="${APP_FILES} $(basename $file)";
57 install -d ${D}/${sysconfdir}/agl-postinsts
58 cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF
60 for file in ${APP_FILES}; do
61 /usr/bin/afm-install install /usr/AGL/apps/autoinstall/\$file
64 ${EXTRA_WGT_POSTINSTALL}
66 chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}
69 FILES_${PN} += "/usr/AGL/apps/autoinstall/*.wgt \
70 /usr/AGL/apps/manualinstall/*.wgt \
71 ${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} \
77 addtask aglwgt_deploy before do_package after do_install
78 addtask aglwgt_package before do_aglwgt_deploy after do_compile