Fixed an issue that libhomescreen can not be used
[AGL/meta-agl-demo.git] / recipes-demo-hmi / homescreen / homescreen_git.bb
1 SUMMARY     = "AGL Home Screen Application"
2 DESCRIPTION = "AGL Home Screen Application + SampleAppTimeDate + HomeScreenAppFrameworkBinderAGL + WindowManager + InputEventManager"
3 HOMEPAGE    = "https://wiki.automotivelinux.org/homescreen"
4 LICENSE     = "Apache-2.0"
5 SECTION     = "apps"
6 S           = "${WORKDIR}/git/"
7
8 BBCLASSEXTEND = " nativesdk"
9
10 inherit qmake5 systemd pkgconfig
11 DEPENDS = " qtbase "
12
13 # for HomeScreenAppFrameworkBinderTizen:
14 #DEPENDS += " pkgmgr-info aul "
15 # for WindowManager:
16 DEPENDS += " wayland-ivi-extension "
17 # for libhomescreen
18 DEPENDS += " glib-2.0 "
19 # for sample apps
20 DEPENDS += " qtdeclarative qtquickcontrols2 "
21
22 LIC_FILES_CHKSUM = "file://HomeScreen/LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
23 SRCREV  = "${AUTOREV}"
24 # PV needs to be modified with SRCPV to work AUTOREV correctly
25 PV = "0.0+git${SRCPV}"
26
27 SRC_URI = "git://gerrit.automotivelinux.org/gerrit/p/staging/HomeScreen.git;protocol=http"
28
29 PATH_prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:"
30
31 do_install() {
32     install -d ${D}/usr/AGL/${PN}
33     install -m 0755 ${B}/HomeScreen/HomeScreen ${D}/usr/AGL/${PN}/
34     install -m 0755 ${B}/SampleAppTimeDate/SampleAppTimeDate ${D}/usr/AGL/${PN}/
35     install -m 0755 ${B}/SampleHomeScreenInterfaceApp/SampleHomeScreenInterfaceApp ${D}/usr/AGL/${PN}/
36     install -m 0755 ${B}/HomeScreenAppFrameworkBinderAGL/HomeScreenAppFrameworkBinderAGL ${D}/usr/AGL/${PN}/
37     install -m 0755 ${B}/WindowManager/WindowManager ${D}/usr/AGL/${PN}/
38     install -m 0755 ${B}/InputEventManager/InputEventManager ${D}/usr/AGL/${PN}/
39     
40     install -d ${D}${libdir}
41     install -m 0644 ${B}/libhomescreen/libhomescreen.so.1.0.0 ${D}${libdir}/
42     ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so
43     ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1
44     ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1.0
45
46 # kooltux: still some problem with paths inside .pc file
47 # error at build time:
48 # 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]
49 #
50 #    install -d ${D}${libdir}/pkgconfig
51 #    install -m 0644 ${B}/libhomescreen/pkgconfig/homescreen.pc ${D}${libdir}/pkgconfig/
52
53         install -d ${D}${includedir}
54         install -m 0644 ${S}/libhomescreen/include/libhomescreen.hpp ${D}${includedir}/
55
56     install -d ${D}${systemd_user_unitdir}
57     install -m 0644 ${S}/HomeScreen/conf/HomeScreen.service ${D}${systemd_user_unitdir}
58     install -m 0644 ${S}/HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service ${D}${systemd_user_unitdir}
59     install -m 0644 ${S}/InputEventManager/conf/InputEventManager.service ${D}${systemd_user_unitdir}
60     install -m 0644 ${S}/WindowManager/conf/WindowManager.service ${D}${systemd_user_unitdir}
61
62     install -d ${D}${sysconfdir}/systemd/user/default.target.wants
63     ln -sf ${systemd_user_unitdir}/WindowManager.service ${D}${sysconfdir}/systemd/user/default.target.wants
64     ln -sf ${systemd_user_unitdir}/HomeScreen.service ${D}${sysconfdir}/systemd/user/default.target.wants
65 }
66
67 FILES_${PN} += "/usr/AGL/${PN}/ ${libdir} ${systemd_user_unitdir}"
68 FILES_${PN}-dbg += "/usr/AGL/${PN}/.debug"
69
70
71 PACKAGES =+ "libhomescreen libhomescreen-dev libhomescreen-dbg"
72
73 FILES_libhomescreen = "\
74         ${libdir}/libhomescreen.so.* \
75 "
76 FILES_libhomescreen-dev = "\
77         ${includedir}/libhomescreen.hpp \
78         ${libdir}/libhomescreen.so \
79         ${libdir}/pkgconfig/homescreen.pc \
80 "
81 FILES_libhomescreen-dbg = "\
82         ${libdir}/.debug/libhomescreen.so.* \
83 "
84 RDEPENDS_libhomescreen-dbg += "${PN}-dbg libhomescreen-dev"
85
86 RDEPENDS_${PN}-dev += "libhomescreen-dev"
87