533bdd71f7270656a6159a28648895699c6adffb
[AGL/meta-agl-devel.git] / meta-agl-flutter / recipes-graphics / flutter-apps / flutter-gallery_aglflutter.inc
1 FILESEXTRAPATHS:prepend := "${THISDIR}/flutter-gallery:"
2
3 SRC_URI += " \
4     file://flutter-gallery.service \
5     file://gallery_on_bg-debug.json \
6     file://gallery_on_bg-profile.json \
7     file://gallery_on_bg-release.json \
8 "
9
10 APP_CONFIG = "gallery_on_bg-release.json"
11 APP_CONFIG:class-runtimedebug = "gallery_on_bg-debug.json"
12 APP_CONFIG:class-runtimeprofile = "gallery_on_bg-profile.json"
13
14 # To avoid conflicts with the systemd template scheme added via bbappend in
15 # meta-agl-demo, package the standalone systemd unit separately.  This is not
16 # needed when meta-agl-flutter is used without meta-agl-demo, but that is not
17 # going to be the default usecase for most users, so this still allows them to
18 # build working agl-image-flutter images in the same build tree.
19 #
20 # This can be dropped if/when flutter-gallery is no longer packaged as a demo
21 # in meta-agl-demo.
22
23 #SYSTEMD_SERVICE:${PN}-init = "flutter-gallery.service"
24
25 do_install:append() {
26     install -D -m 0644 ${WORKDIR}/flutter-gallery.service ${D}${systemd_user_unitdir}/flutter-gallery.service
27     install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
28     ln -s ../flutter-gallery.service ${D}${systemd_user_unitdir}/agl-session.target.wants/flutter-gallery.service
29
30     install -D -m 0644 ${WORKDIR}/${APP_CONFIG} ${D}${datadir}/flutter/default.json
31 }
32
33 PACKAGE_BEFORE_PN += "${PN}-init"
34
35 FILES:${PN} += "${datadir}"
36
37 FILES:${PN}-init = "${systemd_user_unitdir}"
38
39 RDEPENDS:${PN}-init = "${PN}"