Fixed an issue that libhomescreen can not be used
[AGL/meta-agl-demo.git] / recipes-demo-hmi / homescreen / homescreen_git.bb
index 890d60c..7bef3a2 100644 (file)
@@ -1,11 +1,13 @@
 SUMMARY     = "AGL Home Screen Application"
-DESCRIPTION = "AGL Home Screen Application + SampleAppTimeDate + HomeScreenAppFrameworkBinderAGL + WindowManager + InputEventManager + two sample apps (QML and Qtwidget)"
+DESCRIPTION = "AGL Home Screen Application + SampleAppTimeDate + HomeScreenAppFrameworkBinderAGL + WindowManager + InputEventManager"
 HOMEPAGE    = "https://wiki.automotivelinux.org/homescreen"
 LICENSE     = "Apache-2.0"
 SECTION     = "apps"
 S           = "${WORKDIR}/git/"
 
-inherit qmake5 systemd
+BBCLASSEXTEND = " nativesdk"
+
+inherit qmake5 systemd pkgconfig
 DEPENDS = " qtbase "
 
 # for HomeScreenAppFrameworkBinderTizen:
@@ -19,6 +21,9 @@ DEPENDS += " qtdeclarative qtquickcontrols2 "
 
 LIC_FILES_CHKSUM = "file://HomeScreen/LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
 SRCREV  = "${AUTOREV}"
+# PV needs to be modified with SRCPV to work AUTOREV correctly
+PV = "0.0+git${SRCPV}"
+
 SRC_URI = "git://gerrit.automotivelinux.org/gerrit/p/staging/HomeScreen.git;protocol=http"
 
 PATH_prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:"
@@ -26,22 +31,27 @@ PATH_prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:"
 do_install() {
     install -d ${D}/usr/AGL/${PN}
     install -m 0755 ${B}/HomeScreen/HomeScreen ${D}/usr/AGL/${PN}/
-    install -d ${D}/usr/AGL/${PN}/colorschemes
-    cp -r ${B}/HomeScreen/colorschemes/* ${D}/usr/AGL/${PN}/colorschemes/
     install -m 0755 ${B}/SampleAppTimeDate/SampleAppTimeDate ${D}/usr/AGL/${PN}/
     install -m 0755 ${B}/SampleHomeScreenInterfaceApp/SampleHomeScreenInterfaceApp ${D}/usr/AGL/${PN}/
     install -m 0755 ${B}/HomeScreenAppFrameworkBinderAGL/HomeScreenAppFrameworkBinderAGL ${D}/usr/AGL/${PN}/
     install -m 0755 ${B}/WindowManager/WindowManager ${D}/usr/AGL/${PN}/
     install -m 0755 ${B}/InputEventManager/InputEventManager ${D}/usr/AGL/${PN}/
-    install -m 0755 ${B}/SampleNavigationApp/SampleNavigationApp ${D}/usr/AGL/${PN}/
-    install -m 0755 ${B}/SampleMediaApp/SampleMediaApp ${D}/usr/AGL/${PN}/
     
     install -d ${D}${libdir}
     install -m 0644 ${B}/libhomescreen/libhomescreen.so.1.0.0 ${D}${libdir}/
-    ln -sf ${libdir}/libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so
-    ln -sf ${libdir}/libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1
-    ln -sf ${libdir}/libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1.0
+    ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so
+    ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1
+    ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1.0
+
+# kooltux: still some problem with paths inside .pc file
+# error at build time:
+# ERROR: homescreen-git-r0 do_populate_sysroot: QA Issue: homescreen.pc failed sanity test (tmpdir) in path /xdt/build/tmp/work/cortexa15hf-neon-agl-linux-gnueabi/homescreen/git-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig]
+#
+#    install -d ${D}${libdir}/pkgconfig
+#    install -m 0644 ${B}/libhomescreen/pkgconfig/homescreen.pc ${D}${libdir}/pkgconfig/
 
+       install -d ${D}${includedir}
+       install -m 0644 ${S}/libhomescreen/include/libhomescreen.hpp ${D}${includedir}/
 
     install -d ${D}${systemd_user_unitdir}
     install -m 0644 ${S}/HomeScreen/conf/HomeScreen.service ${D}${systemd_user_unitdir}
@@ -54,33 +64,24 @@ do_install() {
     ln -sf ${systemd_user_unitdir}/HomeScreen.service ${D}${sysconfdir}/systemd/user/default.target.wants
 }
 
-FILES_${PN} += "/usr/AGL/${PN}/ /usr/AGL/${PN}/colorschemes ${libdir} ${systemd_user_unitdir}"
+FILES_${PN} += "/usr/AGL/${PN}/ ${libdir} ${systemd_user_unitdir}"
 FILES_${PN}-dbg += "/usr/AGL/${PN}/.debug"
 
-#SYSTEMD_PACKAGES - no separate packages
-#SYSTEMD_SERVICE += "WindowManager.service"
-#SYSTEMD_SERVICE += "HomeScreen.service"
-#SYSTEMD_SERVICE += "InputEventManager.service"
-#SYSTEMD_SERVICE += "HomeScreenAppFrameworkBinderAGL.service"
 
+PACKAGES =+ "libhomescreen libhomescreen-dev libhomescreen-dbg"
 
-#############################################
-# this has to be set up later...
-#############################################
-#PACKAGES =+ "libhomescreen libhomescreen-dev libhomescreen-dbg"
-#
-#FILES_libhomescreen = "\
-#      ${libdir}/libhomescreen.so.* \
-#"
-#FILES_libhomescreen-dev = "\
-#      ${includedir}/libhomescreen.hpp \
-#      ${libdir}/libhomescreen.so \
-#      ${libdir}/pkgconfig/libhomescreen.pc \
-#"
-#FILES_libhomescreen-dbg = "\
-#      ${libdir}/.debug/libhomescreen.so.* \
-#"
-#RDEPENDS_libhomescreen-dbg += "${PN}-dbg libhomescreen-dev"
-#
-#RDEPENDS_${PN}-dev += "libhomescreen-dev"
+FILES_libhomescreen = "\
+       ${libdir}/libhomescreen.so.* \
+"
+FILES_libhomescreen-dev = "\
+       ${includedir}/libhomescreen.hpp \
+       ${libdir}/libhomescreen.so \
+       ${libdir}/pkgconfig/homescreen.pc \
+"
+FILES_libhomescreen-dbg = "\
+       ${libdir}/.debug/libhomescreen.so.* \
+"
+RDEPENDS_libhomescreen-dbg += "${PN}-dbg libhomescreen-dev"
+
+RDEPENDS_${PN}-dev += "libhomescreen-dev"