Add a new image for Flutter instrument cluster app
[AGL/meta-agl-demo.git] / recipes-demo / flutter-cluster-dashboard / flutter-cluster-dashboard_git.bb
1 SUMMARY = "Flutter Instrument Cluster "
2 DESCRIPTION = "An instrument cluster app written in dart for the flutter runtime"
3 AUTHOR = "Aakash Solanki"
4 HOMEPAGE = "https://github.com/aakash-s45/ic"
5
6 SECTION = "graphics"
7
8 LICENSE = "Apache-2.0"
9 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0c52b0e4b5f0dbf57ea7d44bebb2e29d"
10
11 SRC_URI = "git://github.com/aakash-s45/ic;protocol=https;branch=main \
12     file://flutter-cluster-dashboard.service \
13     file://ic_on_bg-debug.json \
14     file://ic_on_bg-profile.json \
15     file://ic_on_bg-release.json \
16 "
17
18 PV = "1.0+git${SRCPV}"
19 SRCREV = "32f72bb68142a0dbde9ccf28b27c445598c95112"
20
21 S = "${WORKDIR}/git"
22
23 PUBSPEC_APPNAME = "ic"
24
25 FLUTTER_APPLICATION_INSTALL_PREFIX = "/flutter"
26
27 inherit flutter-app
28
29 APP_CONFIG = "ic_on_bg-release.json"
30 APP_CONFIG:class-runtimedebug = "ic_on_bg-debug.json"
31 APP_CONFIG:class-runtimeprofile = "ic_on_bg-profile.json"
32
33 # To avoid conflicts with the systemd template scheme added via bbappend in
34 # meta-agl-demo, package the standalone systemd unit separately.  This is not
35 # needed when meta-agl-flutter is used without meta-agl-demo, but that is not
36 # going to be the default usecase for most users, so this still allows them to
37 # build working agl-image-flutter images in the same build tree.
38 #
39 # This can be dropped if/when flutter-gallery is no longer packaged as a demo
40 # in meta-agl-demo.
41
42 #SYSTEMD_SERVICE:${PN}-init = "flutter-cluster-dashboard.service"
43
44 do_install:append() {
45     install -D -m 0644 ${WORKDIR}/flutter-cluster-dashboard.service ${D}${systemd_user_unitdir}/flutter-cluster-dashboard.service
46     install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
47     ln -s ../flutter-cluster-dashboard.service ${D}${systemd_user_unitdir}/agl-session.target.wants/flutter-cluster-dashboard.service
48
49     install -D -m 0644 ${WORKDIR}/${APP_CONFIG} ${D}${datadir}/flutter/default.json
50 }
51
52 PACKAGE_BEFORE_PN += "${PN}-init"
53
54 FILES:${PN} += "${datadir}"
55
56 FILES:${PN}-init = "${systemd_user_unitdir}"
57
58 RDEPENDS:${PN}-init = "${PN}"