librespot: adjust to new rust build

This commit is contained in:
Lukas Rusak 2022-05-16 08:38:43 -07:00
parent 00a2573bc0
commit bbb42728df
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3

View File

@ -10,7 +10,7 @@ PKG_ARCH="any"
PKG_LICENSE="MIT" PKG_LICENSE="MIT"
PKG_SITE="https://github.com/librespot-org/librespot/" PKG_SITE="https://github.com/librespot-org/librespot/"
PKG_URL="https://github.com/librespot-org/librespot/archive/v${PKG_VERSION}.tar.gz" PKG_URL="https://github.com/librespot-org/librespot/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain alsa-lib avahi pulseaudio rust" PKG_DEPENDS_TARGET="toolchain alsa-lib avahi pulseaudio cargo:host"
PKG_SECTION="service" PKG_SECTION="service"
PKG_SHORTDESC="Librespot: play Spotify through Kodi using a Spotify app as a remote" PKG_SHORTDESC="Librespot: play Spotify through Kodi using a Spotify app as a remote"
PKG_LONGDESC="Librespot (${PKG_VERSION_DATE}) lets you play Spotify through Kodi using a Spotify app as a remote." PKG_LONGDESC="Librespot (${PKG_VERSION_DATE}) lets you play Spotify through Kodi using a Spotify app as a remote."
@ -23,17 +23,18 @@ PKG_ADDON_REQUIRES="script.module.requests:0.0.0"
PKG_MAINTAINER="Anton Voyl (awiouy)" PKG_MAINTAINER="Anton Voyl (awiouy)"
make_target() { make_target() {
. $(get_build_dir rust)/cargo/env
cargo build \ cargo build \
--target ${TARGET_NAME} \
--release \ --release \
--no-default-features \ --no-default-features \
--features "alsa-backend pulseaudio-backend with-dns-sd" --features "alsa-backend pulseaudio-backend with-dns-sd"
${STRIP} ${PKG_BUILD}/.${TARGET_NAME}/*/release/librespot
${STRIP} ${PKG_BUILD}/.${TARGET_NAME}/target/${TARGET_NAME}/release/librespot
} }
addon() { addon() {
mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp ${PKG_BUILD}/.${TARGET_NAME}/*/release/librespot \ cp ${PKG_BUILD}/.${TARGET_NAME}/target/${TARGET_NAME}/release/librespot \
${ADDON_BUILD}/${PKG_ADDON_ID}/bin ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib