Update github.com git:// SRC_URIs
[AGL/meta-agl-demo.git] / 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://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
6
7 SRC_URI = "file://run-agl-postinsts \
8            file://run-agl-postinsts.service"
9
10 S = "${WORKDIR}"
11
12 inherit allarch systemd
13
14 SYSTEMD_SERVICE:${PN} = "run-agl-postinsts.service"
15
16 SYSTEMD_SERVICE_AFTER ?= "dbus.service cynagora.service"
17
18 SYSTEMD_SERVICE_BEFORE ?= "systemd-user-sessions.service"
19
20 do_configure() {
21     :
22 }
23
24 do_compile () {
25     :
26 }
27
28 do_install() {
29     install -d ${D}${sbindir}
30     install -m 0755 ${WORKDIR}/run-agl-postinsts ${D}${sbindir}/
31
32     install -d ${D}${systemd_unitdir}/system/
33     install -m 0644 ${WORKDIR}/run-agl-postinsts.service ${D}${systemd_unitdir}/system/
34
35     sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
36                -e 's:#SBINDIR#:${sbindir}:g' \
37                -e 's:#BASE_BINDIR#:${base_bindir}:g' \
38                -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \
39                ${D}${sbindir}/run-agl-postinsts \
40                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
41
42     sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \
43                -e 's:#SYSTEMD_SERVICE_BEFORE#:${SYSTEMD_SERVICE_BEFORE}:g' \
44                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
45 }
46