2020-01-10 14:55:23 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# spotifyd
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-03-30 11:06:48 +02:00
|
|
|
SPOTIFYD_VERSION = v0.3.0
|
2020-01-10 14:55:23 +01:00
|
|
|
SPOTIFYD_SITE = $(call github,Spotifyd,spotifyd,$(SPOTIFYD_VERSION))
|
|
|
|
SPOTIFYD_LICENSE = GPL-3.0
|
|
|
|
SPOTIFYD_LICENSE_FILES = LICENSE
|
|
|
|
|
2020-11-16 20:18:10 +01:00
|
|
|
SPOTIFYD_DEPENDENCIES = host-rustc
|
2020-01-10 14:55:23 +01:00
|
|
|
|
|
|
|
SPOTIFYD_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo \
|
2020-04-11 17:22:15 +02:00
|
|
|
CC=$(TARGET_CC) \
|
2020-01-10 14:55:23 +01:00
|
|
|
HOST_CC=gcc \
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 \
|
|
|
|
OPENSSL_LIB_DIR=$(HOST_DIR)/lib \
|
|
|
|
OPENSSL_INCLUDE_DIR=$(HOST_DIR)/include
|
|
|
|
SPOTIFYD_BIN_DIR = target/$(RUSTC_TARGET_NAME)/release
|
|
|
|
|
|
|
|
SPOTIFYD_CARGO_OPTS = --release \
|
|
|
|
--no-default-features \
|
|
|
|
--features=pulseaudio_backend \
|
|
|
|
--target=$(RUSTC_TARGET_NAME) \
|
|
|
|
--manifest-path=$(@D)/Cargo.toml
|
|
|
|
|
|
|
|
define SPOTIFYD_BUILD_CMDS
|
2020-11-16 20:18:10 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(SPOTIFYD_CARGO_ENV) \
|
|
|
|
cargo build $(SPOTIFYD_CARGO_OPTS)
|
2020-01-10 14:55:23 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define SPOTIFYD_INSTALL_TARGET_CMDS
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/$(SPOTIFYD_BIN_DIR)/spotifyd \
|
|
|
|
$(TARGET_DIR)/usr/bin/spotifyd
|
2020-10-06 21:23:38 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/spotifyd/spotifyd.conf \
|
2020-01-10 14:55:23 +01:00
|
|
|
$(TARGET_DIR)/etc/spotifyd.conf
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SPOTIFYD_INSTALL_INIT_SYSTEMD
|
2020-10-06 21:23:38 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/spotifyd/spotifyd.service \
|
2020-01-10 14:55:23 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/spotifyd.service
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|