meta-app-framework: make applaunchd polkit dependency explicit
[AGL/meta-agl.git] / meta-app-framework / recipes-core / applaunchd / applaunchd_git.bb
1 SUMMARY     = "AGL Application Launcher service"
2 DESCRIPTION = "AGL Application Launcher service build with recipe method"
3 HOMEPAGE    = "https://git.automotivelinux.org/src/applaunchd"
4 SECTION     = "apps"
5 LICENSE     = "Apache-2.0"
6 LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
7
8 DEPENDS = " \
9     glib-2.0 \
10     glib-2.0-native \
11     protobuf-native \
12     grpc-native \
13     grpc \
14     systemd \
15 "
16
17 PV = "2.0+git${SRCPV}"
18
19 SRC_URI = " \
20     git://gerrit.automotivelinux.org/gerrit/src/applaunchd;protocol=https;branch=${AGL_BRANCH}  \
21     file://applaunchd.service \
22     file://agl-app@.service \
23     file://agl-app-web@.service \
24     file://agl-app-flutter@.service \
25     file://no-network.conf \
26     file://private-tmp.conf \
27 "
28 SRCREV = "7a3e870a8349d43a4838604db2c28140c2f76c9f"
29
30 S = "${WORKDIR}/git"
31
32 inherit meson pkgconfig systemd useradd features_check
33
34 REQUIRED_DISTRO_FEATURES = "systemd polkit"
35
36 USERADD_PACKAGES = "${PN}"
37 USERADDEXTENSION = "useradd-staticids"
38 GROUPADD_PARAM:${PN} = "-g 1003 applaunchd ; "
39 USERADD_PARAM:${PN} = "\
40     -g 1003 -u 1003 -o -d / -K PASS_MAX_DAYS=-1 applaunchd ; \
41 "
42
43 SYSTEMD_SERVICE:${PN} = "applaunchd.service"
44
45 do_install:append() {
46     # Install generic template for all agl-app services
47     install -d ${D}${systemd_system_unitdir}
48     install -m 644 ${WORKDIR}/applaunchd.service ${D}${systemd_system_unitdir}/
49     install -m 644 ${WORKDIR}/agl-app@.service ${D}${systemd_system_unitdir}/
50     install -m 644 ${WORKDIR}/agl-app-web@.service ${D}${systemd_system_unitdir}/
51     install -m 644 ${WORKDIR}/agl-app-flutter@.service ${D}${systemd_system_unitdir}/
52
53     # Install individual sandboxing overrides/drop-ins to be used by apps
54     install -d ${D}${systemd_system_unitdir}/sandboxing
55     install -m 644 ${WORKDIR}/no-network.conf ${D}${systemd_system_unitdir}/sandboxing/
56     install -m 644 ${WORKDIR}/private-tmp.conf ${D}${systemd_system_unitdir}/sandboxing/
57 }
58
59 PACKAGE_BEFORE_PN += "${PN}-template-agl-app ${PN}-template-agl-app-web ${PN}-template-agl-app-flutter"
60
61 FILES:${PN} += "${systemd_system_unitdir}"
62
63 FILES:${PN}-template-agl-app = "${systemd_system_unitdir}/agl-app@.service"
64
65 FILES:${PN}-template-agl-app-web = "${systemd_system_unitdir}/agl-app-web@.service"
66
67 FILES:${PN}-template-agl-app-flutter = "${systemd_system_unitdir}/agl-app-flutter@.service"
68
69 RDEPENDS:${PN} += " \
70     agl-users \
71     polkit-rule-agl-app \
72 "
73
74 RDEPENDS:${PN}-template-agl-app = "${PN}"
75
76 RDEPENDS:${PN}-template-agl-app-web = "${PN}"
77
78 RDEPENDS:${PN}-template-agl-app-flutter = "${PN}"