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 bindings that use the cmake-apps-module
19 DEPENDS_append = " cmake-apps-module-native"
21 # for hal bindings genskel is required.
22 DEPENDS_append = " af-binder-devtools-native"
24 EXTRA_OECMAKE_append_agl-ptest = " -DBUILD_TEST_WGT=TRUE"
26 # FIXME: Remove once CMake+ninja issues are resolved
27 OECMAKE_GENERATOR = "Unix Makefiles"
31 ${S}/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B} VERBOSE=TRUE || \
32 ( ${S}/conf.d/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B}/package VERBOSE=TRUE && \
33 ( bbwarn "OBSOLETE: Your autobuild script should be located in :" ; \
34 bbwarn "autobuild/agl/ from the project root source folder"; \
35 bbwarn "and generate a .wgt file using wgtpack in the build"; \
36 bbwarn "root folder calling:" ; \
37 bbwarn "./autobuild/agl/autobuild package DEST=<BUILDDIR>" ; \
38 bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes" \
41 ( bbwarn "OBSOLETE: You must have an autobuild script located in:" ; \
42 bbwarn "autobuild/agl/ from the project root source folder"; \
43 bbwarn "with filename autobuild which should generate"; \
44 bbwarn "a .wgt file using wgtpack in the build"; \
45 bbwarn "root folder calling:" ; \
46 bbwarn "./autobuild/agl/autobuild package DEST=<BUILDDIR>" ; \
47 bbwarn "Fix your package as it will not work within the SDK" ; \
48 bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes"; \
53 d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1')
57 POST_INSTALL_LEVEL ?= "10"
58 POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh"
60 EXTRA_WGT_POSTINSTALL ?= ""
64 if [ "${AGLWGT_AUTOINSTALL_${PN}}" = "0" ]
66 install -d ${D}/usr/AGL/apps/manualinstall
67 install -m 0644 ${B}/*.wgt ${D}/usr/AGL/apps/manualinstall || \
68 install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/manualinstall
70 install -d ${D}/usr/AGL/apps/autoinstall
71 install -m 0644 ${B}/*.wgt ${D}/usr/AGL/apps/autoinstall || \
72 install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/autoinstall
74 if [ "$(find ${D}/usr/AGL/apps/autoinstall -name ${TEST_WGT})" ]
76 install -d ${D}/usr/AGL/apps/testwgt
77 mv ${D}/usr/AGL/apps/autoinstall/*-test.wgt ${D}/usr/AGL/apps/testwgt
82 for file in ${D}/usr/AGL/apps/autoinstall/*.wgt;do
83 APP_FILES="${APP_FILES} $(basename $file)";
85 install -d ${D}/${sysconfdir}/agl-postinsts
86 cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF
88 for file in ${APP_FILES}; do
89 /usr/bin/afm-install install /usr/AGL/apps/autoinstall/\$file
92 ${EXTRA_WGT_POSTINSTALL}
94 chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}
97 FILES_${PN} += "/usr/AGL/apps/autoinstall/*.wgt \
98 /usr/AGL/apps/manualinstall/*.wgt \
99 /usr/AGL/apps/testwgt/*.wgt \
100 ${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} \
106 addtask aglwgt_deploy before do_package after do_install
107 addtask aglwgt_package before do_aglwgt_deploy after do_compile