rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #Basic Configuration |
| 2 | DESCRIPTION = "service for modem to control afe" |
| 3 | LICENSE = "MediaTekProprietary" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 5 | |
| 6 | SRC_URI = "file://LICENSE" |
| 7 | SRC_URI += "file://libmodem-afe-ctrl-server.c" |
| 8 | SRC_URI += "file://libmodem_afe_service.service" |
| 9 | |
| 10 | S = "${WORKDIR}" |
| 11 | |
| 12 | inherit systemd |
| 13 | |
| 14 | SYSTEMD_PACKAGES = "${PN}" |
| 15 | SYSTEMD_SERVICE_${PN} = "libmodem_afe_service.service" |
| 16 | FILES_${PN} += "${systemd_unitdir}/system/libmodem_afe_service.service" |
| 17 | FILES_${PN} += "${bindir}/libmodem-afe-ctrl-server-bin" |
| 18 | |
| 19 | DEPENDS = "libmodem-afe-ctrl" |
| 20 | |
| 21 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 22 | |
| 23 | #Skip strip check in QA test. |
| 24 | INSANE_SKIP_${PN} += "already-stripped" |
| 25 | |
| 26 | do_compile_append() { |
| 27 | ${CC} libmodem-afe-ctrl-server.c -lpthread -lmodemafectrl -lasound -lmtk_audio_mixer_ctrl -o libmodem-afe-ctrl-server-bin |
| 28 | } |
| 29 | |
| 30 | do_install_append() { |
| 31 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 32 | install -d ${D}${systemd_unitdir}/system/ |
| 33 | install -m 0644 libmodem_afe_service.service ${D}${systemd_unitdir}/system |
| 34 | fi |
| 35 | |
| 36 | install -d ${D}${bindir} |
| 37 | install -m 0755 libmodem-afe-ctrl-server-bin ${D}${bindir} |
| 38 | } |
| 39 | |