2020-07-20 14:54:23 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# wifi-connect
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-10-06 11:05:59 +02:00
|
|
|
WIFI_CONNECT_VERSION = 258656bf9b531ff64438ba502166840e48125e33
|
2020-07-20 14:54:23 +02:00
|
|
|
WIFI_CONNECT_SITE = $(call github,balena-io,wifi-connect,$(WIFI_CONNECT_VERSION))
|
|
|
|
|
|
|
|
WIFI_CONNECT_DEPENDENCIES = host-cargo
|
|
|
|
|
|
|
|
WIFI_CONNECT_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo \
|
|
|
|
CC=$(TARGET_CC) \
|
|
|
|
HOST_CC=gcc \
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 \
|
|
|
|
OPENSSL_LIB_DIR=$(HOST_DIR)/lib \
|
|
|
|
OPENSSL_INCLUDE_DIR=$(HOST_DIR)/include
|
|
|
|
WIFI_CONNECT_BIN_DIR = target/$(RUSTC_TARGET_NAME)/release
|
|
|
|
|
|
|
|
WIFI_CONNECT_CARGO_OPTS = --release \
|
|
|
|
--target=$(RUSTC_TARGET_NAME) \
|
|
|
|
--manifest-path=$(@D)/Cargo.toml
|
|
|
|
|
|
|
|
define WIFI_CONNECT_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(WIFI_CONNECT_CARGO_ENV) rustc -V
|
|
|
|
$(TARGET_MAKE_ENV) $(WIFI_CONNECT_CARGO_ENV) cargo build $(WIFI_CONNECT_CARGO_OPTS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define WIFI_CONNECT_INSTALL_TARGET_CMDS
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/local/sbin
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/$(WIFI_CONNECT_BIN_DIR)/wifi-connect \
|
|
|
|
$(TARGET_DIR)/usr/local/sbin/wifi-connect
|
|
|
|
endef
|
|
|
|
|
|
|
|
define WIFI_CONNECT_INSTALL_INIT_SYSTEMD
|
2020-10-06 21:23:38 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/wifi-connect/wifi-connect.service \
|
2020-07-21 10:30:41 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/wifi-connect.service
|
2020-10-06 21:23:38 +02:00
|
|
|
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/wifi-connect/start-wifi-connect \
|
2020-07-21 10:30:41 +02:00
|
|
|
$(TARGET_DIR)/usr/local/sbin/start-wifi-connect
|
2020-07-20 14:54:23 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|