96c171fa8ea7239cefe8c480a8ec0edf42b85f5e
[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 SYSTEMD_SERVICE_BEFORE ?= "systemd-user-sessions.service"
20
21 do_configure() {
22     :
23 }
24
25 do_compile () {
26     :
27 }
28
29 do_install() {
30     install -d ${D}${sbindir}
31     install -m 0755 ${WORKDIR}/run-agl-postinsts ${D}${sbindir}/
32
33     install -d ${D}${systemd_unitdir}/system/
34     install -m 0644 ${WORKDIR}/run-agl-postinsts.service ${D}${systemd_unitdir}/system/
35
36     sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
37                -e 's:#SBINDIR#:${sbindir}:g' \
38                -e 's:#BASE_BINDIR#:${base_bindir}:g' \
39                -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \
40                ${D}${sbindir}/run-agl-postinsts \
41                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
42  
43     sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \
44                -e 's:#SYSTEMD_SERVICE_BEFORE#:${SYSTEMD_SERVICE_BEFORE}:g' \
45                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
46 }
47