SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-demo-control-panel;protocol=https;branch=${AGL_BRANCH} \
file://agl-demo-control-panel.service \
"
-SRCREV = "edfd96499fdbcf869c5182f2cfa89703cfb0dfd0"
+SRCREV = "31573c88e0ddefc3591bb7752b306601554ebbf2"
S = "${WORKDIR}/git"
-inherit systemd allarch
-
-require recipes-config/agl-users/agl-users.inc
+inherit systemd allarch update-alternatives
SYSTEMD_SERVICE:${PN} = "${BPN}.service"
install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
# Install conf file
- install -d ${D}/home/agl-driver/.local/share/agl-demo-control-panel
- sed 's/=user-session/=AGL-databroker/' ${S}/extras/config.ini > \
- ${D}/home/agl-driver/.local/share/agl-demo-control-panel/config.ini
- chown -R agl-driver:agl-driver ${D}/home/agl-driver
+ install -d ${D}${sysconfdir}/agl-demo-control-panel
+ install -m 0644 ${S}/extras/config.ini ${D}${sysconfdir}/agl-demo-control-panel/config.ini.default
+ sed 's/ip = localhost/ip = 192.168.10.2/' ${S}/extras/config.ini > \
+ ${D}${sysconfdir}/agl-demo-control-panel/config.ini.demo
+ sed -e 's/hvac-enabled = true/hvac-enabled = false/' \
+ -e 's/steering-wheel-enabled = true/steering-wheel-enabled = false/' \
+ ${S}/extras/config.ini > \
+ ${D}${sysconfdir}/agl-demo-control-panel/config.ini.gateway-demo
}
# For now generate resource wrapper on first boot, as it looks non-trivial
true
}
-FILES:${PN} += "/home/agl-driver"
+ALTERNATIVE_LINK_NAME[agl-demo-control-panel.ini] = "${sysconfdir}/agl-demo-control-panel/config.ini"
RDEPENDS:${PN} += " \
+ ${PN}-conf \
python3 \
python3-modules \
python3-packaging \
agl-users \
weston \
"
+
+PACKAGE_BEFORE_PN += "${PN}-conf"
+FILES:${PN}-conf += "${sysconfdir}/agl-demo-control-panel/config.ini.default"
+RDEPENDS:${PN}-conf = "${PN}"
+RPROVIDES:${PN}-conf = "agl-demo-control-panel.ini"
+ALTERNATIVE:${PN}-conf = "agl-demo-control-panel.ini"
+ALTERNATIVE_TARGET_${PN}-conf = "${sysconfdir}/agl-demo-control-panel/config.ini.default"
+
+PACKAGE_BEFORE_PN += "${PN}-conf-demo"
+FILES:${PN}-conf-demo += "${sysconfdir}/agl-demo-control-panel/config.ini.demo"
+RDEPENDS:${PN}-conf-demo = "${PN}"
+RPROVIDES:${PN}-conf-demo = "agl-demo-control-panel.ini"
+ALTERNATIVE:${PN}-conf-demo = "agl-demo-control-panel.ini"
+ALTERNATIVE_TARGET_${PN}-conf-demo = "${sysconfdir}/agl-demo-control-panel/config.ini.demo"
+ALTERNATIVE_PRIORITY_${PN}-conf-demo = "20"
+
+PACKAGE_BEFORE_PN += "${PN}-conf-gateway-demo"
+FILES:${PN}-conf-gateway-demo += "${sysconfdir}/agl-demo-control-panel/config.ini.gateway-demo"
+RDEPENDS:${PN}-conf-gateway-demo = "${PN}"
+RPROVIDES:${PN}-conf-gateway-demo = "agl-demo-control-panel.ini"
+ALTERNATIVE:${PN}-conf-gateway-demo = "agl-demo-control-panel.ini"
+ALTERNATIVE_TARGET_${PN}-conf-gateway-demo = "${sysconfdir}/agl-demo-control-panel/config.ini.gateway-demo"
+ALTERNATIVE_PRIORITY_${PN}-conf-gateway-demo = "30"