diff --git a/Config.in b/Config.in index 73b2cc40d..15a640e29 100644 --- a/Config.in +++ b/Config.in @@ -52,6 +52,7 @@ source "$BR2_EXTERNAL_THINGINO_PATH/package/thingino-ledd/Config.in" source "$BR2_EXTERNAL_THINGINO_PATH/package/thingino-sounds/Config.in" source "$BR2_EXTERNAL_THINGINO_PATH/package/logcat-mini/Config.in" source "$BR2_EXTERNAL_THINGINO_PATH/package/logcat/Config.in" +source "$BR2_EXTERNAL_THINGINO_PATH/package/thingino-tailscale/Config.in" endif menuconfig BR2_THINGINO_STREAMER_PACKAGES diff --git a/package/thingino-tailscale/Config.in b/package/thingino-tailscale/Config.in new file mode 100644 index 000000000..c72c7f768 --- /dev/null +++ b/package/thingino-tailscale/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_THINGINO_TAILSCALE + bool "tailscale" + select BR2_PACKAGE_HOST_GO + help + Install Tailscale VPN on Thingino devices. diff --git a/package/thingino-tailscale/thingino-tailscale.mk b/package/thingino-tailscale/thingino-tailscale.mk new file mode 100644 index 000000000..0169065ca --- /dev/null +++ b/package/thingino-tailscale/thingino-tailscale.mk @@ -0,0 +1,26 @@ +THINGINO_TAILSCALE_VERSION = 1.76.1 +THINGINO_TAILSCALE_SITE = $(call github,tailscale,tailscale,v$(TAILSCALE_VERSION)) +THINGINO_TAILSCALE_LICENSE = BSD-3-Clause +THINGINO_TAILSCALE_LICENSE_FILES = LICENSE +THINGINO_TAILSCALE_GOMOD = tailscale.com +THINGINO_TAILSCALE_BUILD_TARGETS = cmd/tailscaled +THINGINO_TAILSCALE_INSTALL_BINS = tailscaled + +THINGINO_TAILSCALE_INSTALL_TARGET = YES + +THINGINO_TAILSCALE_DEPENDENCIES = host-upx +THINGINO_TAILSCALE_GO_ENV = GOARCH=mipsle +THINGINO_TAILSCALE_LDFLAGS = -s -w" -gcflags=all="-l -B +THINGINO_TAILSCALE_TAGS = ts_include_cli ./cmd/tailscaled + +define THINGINO_TAILSCALE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/tailscaled $(TARGET_DIR)/usr/bin/tailscaled + $(HOST_DIR)/bin/upx --best --lzma $(TARGET_DIR)/usr/bin/tailscaled + ln -sf tailscaled $(TARGET_DIR)/usr/bin/tailscale +endef + +define TAILSCALE_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_TUN) +endef + +$(eval $(golang-package))