blob: 201a02f3392aaf68c31ded47b63c751ee55364b3 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#Basic Configuration
2DESCRIPTION = "service for modem to control afe"
3LICENSE = "MediaTekProprietary"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
5
6SRC_URI = "file://LICENSE"
7SRC_URI += "file://libmodem-afe-ctrl-server.c"
8SRC_URI += "file://libmodem_afe_service.service"
9
10S = "${WORKDIR}"
11
12inherit systemd
13
14SYSTEMD_PACKAGES = "${PN}"
15SYSTEMD_SERVICE_${PN} = "libmodem_afe_service.service"
16FILES_${PN} += "${systemd_unitdir}/system/libmodem_afe_service.service"
17FILES_${PN} += "${bindir}/libmodem-afe-ctrl-server-bin"
18
19DEPENDS = "libmodem-afe-ctrl"
20
21TARGET_CC_ARCH += "${LDFLAGS}"
22
23#Skip strip check in QA test.
24INSANE_SKIP_${PN} += "already-stripped"
25
26do_compile_append() {
27 ${CC} libmodem-afe-ctrl-server.c -lpthread -lmodemafectrl -lasound -lmtk_audio_mixer_ctrl -o libmodem-afe-ctrl-server-bin
28}
29
30do_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