avs_mtk_voice/meta/meta-mediatek-aud/recipes-avs/avs-device-sdk/avs-device-sdk_1.26.0.bb

160 lines
8.0 KiB
BlitzBasic

#
# Copyright (c) 2019 Amazon.com, Inc.
# Copyright (c) 2019 Luxoft Sweden AB
#
# SPDX-License-Identifier: Apache-2.0
#
SUMMARY = "An SDK for commercial device makers to integrate Alexa directly into connected products."
HOMEPAGE = "https://developer.amazon.com/avs/sdk"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d92e60ee98664c54f68aa515a6169708"
DEPENDS = "useradd curl nghttp2 sqlite3 openssl gstreamer1.0 gstreamer1.0-plugins-base libopus libarchive cjson"
SRC_URI = "git://xajhuang.com:3100/avs/avs-device-sdk.git;protocol=https;branch=master \
file://avs-device-sdk.service \
file://setup_avs.sh \
file://AlexaClientSDKConfig.json \
file://feier/appLWA.json \
file://feier/asound.conf \
file://feier/led_config.json \
file://feier/WakewordModelMapping.json \
file://feier/led_animation/active-ending.animation \
file://feier/led_animation/active-talking.animation \
file://feier/led_animation/active-thinking.animation \
file://feier/led_animation/active-waking.animation \
file://feier/led_animation/alert.animation \
file://feier/led_animation/alert_mic-off.animation \
file://feier/led_animation/alert_notification.animation \
file://feier/led_animation/alert_notification_mic-off.animation \
file://feier/led_animation/alert-short.animation \
file://feier/led_animation/blue.animation \
file://feier/led_animation/bootup.animation \
file://feier/led_animation/btconnect.animation \
file://feier/led_animation/btdisconnect.animation \
file://feier/led_animation/btscaning.animation \
file://feier/led_animation/do_not_disturb.animation \
file://feier/led_animation/error.animation \
file://feier/led_animation/green.animation \
file://feier/led_animation/idle.animation \
file://feier/led_animation/mics-off_end.animation \
file://feier/led_animation/mics-off_on.animation \
file://feier/led_animation/mics-off_start.animation \
file://feier/led_animation/net_configing.animation \
file://feier/led_animation/ntf_alert.animation \
file://feier/led_animation/ntf_incoming.animation \
file://feier/led_animation/ntf_mic-off.animation \
file://feier/led_animation/ntf_queued.animation \
file://feier/led_animation/red.animation \
file://feier/led_animation/volume_01.animation \
file://feier/led_animation/volume_02.animation \
file://feier/led_animation/volume_03.animation \
file://feier/led_animation/volume_04.animation \
file://feier/led_animation/volume_05.animation \
file://feier/led_animation/volume_06.animation \
file://feier/led_animation/volume_07.animation \
file://feier/led_animation/volume_08.animation \
file://feier/led_animation/volume_09.animation \
file://feier/led_animation/volume_10.animation \
file://feier/led_animation/volume_11.animation \
file://feier/led_animation/volume_12.animation \
file://feier/led_animation/white.animation \
"
SRCREV = "${AUTOREV}"
COMPATIBLE_HOST = "aarch64-poky-linux"
S = "${WORKDIR}/git/srcs"
KWDRESDIR = "${S}/extension/avs-weakup-sdk/wakeword-models/x1f8"
KWDINSDIR = "${D}/data/avs/wakeword-models/x1f8"
EXTRA_OECMAKE = "${S} -DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/home/avs/SampleApp -DCOMPANION_APP_AUTH=ON \
-DGSTREAMER_MEDIA_PLAYER=ON -DASPMIC=ON -DCMAKE_BUILD_TYPE=DEBUG -DPKCS11=ON \
-DCURL_INCLUDE_DIR=${STAGING_DIR_HOST}${includedir}/curl \
-DCURL_LIBRARY=${STAGING_DIR_HOST}${libdir}/libcurl.so \
-DLibArchive_INCLUDE_DIR=${STAGING_DIR_HOST}${includedir} \
-DLibArchive_LIBRARY=${STAGING_DIR_HOST}${libdir}/libarchive.so \
-DAMAZONLITE_KEY_WORD_DETECTOR=ON \
-DAMAZONLITE_KEY_WORD_DETECTOR_LIB_PATH=${S}/extension/avs-weakup-sdk/aarch64-tuya-mt8516/PRL2000/libpryon_lite-PRL2000.a \
-DAMAZONLITE_KEY_WORD_DETECTOR_INCLUDE_DIR=${S}/extension/avs-weakup-sdk/aarch64-tuya-mt8516 \
-DEXTENSION_PATH=${S}/extension/avs-cpp-sdk/KWD \
-DASPMIC_INCLUDE_DIR=${S}/extension/mic-asp-sdk/include \
"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "avs-device-sdk.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
FILES_${PN} = "/home/avs/SampleApp/* /etc/* /lib/* /data/dingdong/*"
FILES_${PN} += "/data/dingdong/etc/ /data/database/"
FILES_${PN} += "/data/avs/*"
do_compile() {
make -j8 SampleApp
}
do_install() {
install -d ${B}/avs_app
make install DESTDIR=${B}/avs_app
}
do_install_append() {
# Install Sample application to test Alexa Voice Service
install -d ${D}/etc
install -d ${D}/lib/firmware/
install -d ${D}/lib/firmware/led_animation
install -d -o avs -g avs ${D}/home/avs
install -d -o avs -g avs ${D}/home/avs/SampleApp
install -d -o avs -g avs ${D}/data/avs
install -d -o avs -g avs ${D}/data/avs/samples
install -d -o avs -g avs ${D}/data/avs/wakeword-models
install -d -o avs -g avs ${D}/data/avs/samples/fingerprinting
install -d -o avs -g avs ${D}/data/avs/samples/watermarking
install -d -o avs -g avs ${D}/data/avs/wakeword-models/x1f8
install -d -o avs -g avs ${D}/data/dingdong/
install -d -o avs -g avs ${D}/data/dingdong/etc/
install -d -o avs -g avs ${D}/data/database/
install -d ${D}${sysconfdir}/
install -d ${D}${sysconfdir}/systemd/system/
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/avs-device-sdk.service ${D}${systemd_unitdir}/system
install -m 0755 -o avs -g avs ${WORKDIR}/setup_avs.sh ${D}/home/avs/SampleApp/setup_avs.sh
install -m 0644 -o avs -g avs ${WORKDIR}/AlexaClientSDKConfig.json ${D}/data/avs/AlexaClientSDKConfig.json
install -m 0644 -o avs -g avs ${WORKDIR}/feier/asound.conf ${D}/etc/asound.conf
install -m 0644 -o avs -g avs ${WORKDIR}/feier/led_config.json ${D}/etc/led_config.json
install -m 0644 -o avs -g avs ${WORKDIR}/feier/WakewordModelMapping.json ${D}/etc/WakewordModelMapping.json
install -m 0644 -o avs -g avs ${S}/extension/avs-weakup-sdk/samples/fingerprinting/fingerprint_test_list \
${D}/data/avs/samples/fingerprinting/fingerprint_test_list
install -m 0644 -o avs -g avs ${S}/extension/avs-weakup-sdk/samples/watermarking/watermark.alexa+echo.bin \
${D}/data/avs/samples/watermarking/watermark.alexa+echo.bin
install -m 0644 -o avs -g avs ${WORKDIR}/feier/led_animation/* ${D}/lib/firmware/led_animation/
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.ar-SA.alexa.bin ${KWDINSDIR}/X.ar-SA.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.de-DE+fr-FR.alexa.bin ${KWDINSDIR}/X.de-DE+fr-FR.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.en-CA+en-US.alexa.bin ${KWDINSDIR}/X.en-CA+en-US.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.en-GB.alexa.bin ${KWDINSDIR}/X.en-GB.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.en-IN.alexa.bin ${KWDINSDIR}/X.en-IN.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.es-ES+es-US.alexa.bin ${KWDINSDIR}/X.es-ES+es-US.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.es-MX.alexa.bin ${KWDINSDIR}/X.es-MX.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.it-IT.alexa.bin ${KWDINSDIR}/X.it-IT.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.ja-JP.alexa.bin ${KWDINSDIR}/X.ja-JP.alexa.bin
install -m 0644 -o avs -g avs ${KWDRESDIR}/X.pt-BR.alexa.bin ${KWDINSDIR}/X.pt-BR.alexa.bin
install -m 0644 -o avs -g avs ${WORKDIR}/feier/appLWA.json ${D}/home/avs/SampleApp/appLWA.json
install -m 0755 -o avs -g avs ${B}/SampleApp/src/SampleApp ${D}/home/avs/SampleApp/SampleApp
install -m 0755 -o avs -g avs ${B}/SampleApp/src/libLibSampleApp.so ${D}/home/avs/SampleApp/libLibSampleApp.so
install -m 0755 -o avs -g avs ${B}/extension/avs-app-auth/libapp_auth.so ${D}/home/avs/SampleApp/libapp_auth.so
install -m 0755 -o avs -g avs ${B}/avs_app/home/avs/SampleApp/lib/*.so ${D}/home/avs/SampleApp/
}
INSANE_SKIP_${PN} += "rpaths"