e871e31ce9ddace70143dff9da135be2b38f827d
[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 SECTION     = "apps"
5
6 LICENSE     = "Apache-2.0"
7 LIC_FILES_CHKSUM = "file://HomeScreen/LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
8
9
10 SRC_URI = "git://gerrit.automotivelinux.org/gerrit/p/staging/HomeScreen.git;protocol=http \
11            file://0001-Hack-to-resolve-the-media-player-doesn-t-play-next.patch \
12            file://homescreen.pc.in \
13            file://dbus-homescreen.conf.in"
14 SRCREV  = "${AUTOREV}"
15
16 # Pinned SRCREV for Charming Chinook, staging projects do not follow release branches
17 SRCREV_chinook = "3b5d0701a25b19ee2ac91d7466652c8fc4025db0"
18
19
20 # PV needs to be modified with SRCPV to work AUTOREV correctly
21 PV = "0.0+git${SRCPV}"
22 # git repository used
23 S           = "${WORKDIR}/git/"
24
25 DEPENDS += " qtbase "
26 # for HomeScreenAppFrameworkBinderTizen:
27 #DEPENDS += " pkgmgr-info aul "
28 # for WindowManager:
29 DEPENDS += " wayland-ivi-extension "
30 # for libhomescreen
31 DEPENDS += " glib-2.0 "
32 # for sample apps
33 DEPENDS += " qtdeclarative qtquickcontrols2 "
34
35
36 inherit qmake5 systemd pkgconfig
37
38
39 PATH_prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:"
40
41 do_install() {
42     install -d ${D}/usr/AGL/${PN}
43     install -m 0755 ${B}/HomeScreen/HomeScreen ${D}/usr/AGL/${PN}/
44     install -m 0755 ${B}/SampleAppTimeDate/SampleAppTimeDate ${D}/usr/AGL/${PN}/
45     install -m 0755 ${B}/SampleHomeScreenInterfaceApp/SampleHomeScreenInterfaceApp ${D}/usr/AGL/${PN}/
46     install -m 0755 ${B}/HomeScreenAppFrameworkBinderAGL/HomeScreenAppFrameworkBinderAGL ${D}/usr/AGL/${PN}/
47     install -m 0755 ${B}/WindowManager/WindowManager ${D}/usr/AGL/${PN}/
48     install -m 0755 ${B}/InputEventManager/InputEventManager ${D}/usr/AGL/${PN}/
49     
50     install -d ${D}${libdir}
51     install -m 0644 ${B}/libhomescreen/libhomescreen.so.1.0.0 ${D}${libdir}/
52     ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so
53     ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1
54     ln -sf libhomescreen.so.1.0.0 ${D}${libdir}/libhomescreen.so.1.0
55
56 # claneys: add dbus policy to make wifi/bluetooth status icon working as quick 
57 # workaround. (jira.automotivelinux.org : SPEC-377)
58     install -d ${D}/etc/dbus-1/session.d
59     install -m 0644 ${WORKDIR}/dbus-homescreen.conf.in ${D}/etc/dbus-1/session.d/homescreen.conf
60
61 # kooltux: still some problem with paths inside .pc file
62 # error at build time:
63 # 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]
64 #
65     install -d ${D}${libdir}/pkgconfig
66     install -m 0644 ${WORKDIR}/homescreen.pc.in ${D}${libdir}/pkgconfig/homescreen.pc
67     sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/homescreen.pc
68     sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/homescreen.pc
69     sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/homescreen.pc
70
71         install -d ${D}${includedir}
72         install -m 0644 ${S}/libhomescreen/include/libhomescreen.hpp ${D}${includedir}/
73
74     install -d ${D}${systemd_user_unitdir}
75     install -m 0644 ${S}/HomeScreen/conf/HomeScreen.service ${D}${systemd_user_unitdir}
76     install -m 0644 ${S}/HomeScreenAppFrameworkBinderAGL/conf/HomeScreenAppFrameworkBinderAGL.service ${D}${systemd_user_unitdir}
77     install -m 0644 ${S}/InputEventManager/conf/InputEventManager.service ${D}${systemd_user_unitdir}
78     install -m 0644 ${S}/WindowManager/conf/WindowManager.service ${D}${systemd_user_unitdir}
79
80     install -d ${D}${sysconfdir}/systemd/user/default.target.wants
81     ln -sf ${systemd_user_unitdir}/WindowManager.service ${D}${sysconfdir}/systemd/user/default.target.wants
82     ln -sf ${systemd_user_unitdir}/HomeScreen.service ${D}${sysconfdir}/systemd/user/default.target.wants
83 }
84
85 FILES_${PN} += "/usr/AGL/${PN}/ ${libdir} ${systemd_user_unitdir}"
86 FILES_${PN}-dbg += "/usr/AGL/${PN}/.debug"
87
88
89 PACKAGES =+ "libhomescreen libhomescreen-dev libhomescreen-dbg"
90
91 FILES_libhomescreen = "\
92         ${libdir}/libhomescreen.so.* \
93 "
94 FILES_libhomescreen-dev = "\
95         ${includedir}/libhomescreen.hpp \
96         ${libdir}/libhomescreen.so \
97         ${libdir}/pkgconfig/homescreen.pc \
98 "
99 FILES_libhomescreen-dbg = "\
100         ${libdir}/.debug/libhomescreen.so.* \
101 "
102 RDEPENDS_libhomescreen-dbg += "${PN}-dbg libhomescreen-dev"
103
104 RDEPENDS_${PN}-dev += "libhomescreen-dev"
105
106
107 BBCLASSEXTEND = " nativesdk"