Added first boot service for AGL
[AGL/meta-agl.git] / meta-agl / recipes-devtools / run-agl-postinsts / run-agl-postinsts_1.0.bb
1 SUMMARY = "Runs AGL postinstall scripts on first boot of the target device"
2 SECTION = "devel"
3
4 LICENSE = "MIT"
5 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
6                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7
8 SRC_URI = "file://run-agl-postinsts \
9            file://run-agl-postinsts.service"
10
11 S = "${WORKDIR}"
12
13 inherit allarch systemd
14
15 SYSTEMD_SERVICE_${PN} = "run-agl-postinsts.service"
16
17 SYSTEMD_SERVICE_AFTER ?= "dbus.service cynara.service"
18
19 do_configure() {
20     :
21 }
22
23 do_compile () {
24     :
25 }
26
27 do_install() {
28     install -d ${D}${sbindir}
29     install -m 0755 ${WORKDIR}/run-agl-postinsts ${D}${sbindir}/
30
31     install -d ${D}${systemd_unitdir}/system/
32     install -m 0644 ${WORKDIR}/run-agl-postinsts.service ${D}${systemd_unitdir}/system/
33
34     sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
35                -e 's:#SBINDIR#:${sbindir}:g' \
36                -e 's:#BASE_BINDIR#:${base_bindir}:g' \
37                -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \
38                ${D}${sbindir}/run-agl-postinsts \
39                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
40  
41     sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \
42                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
43 }
44