kenzok8-package/tailscale/Makefile

65 lines
1.8 KiB
Makefile
Raw Permalink Normal View History

2023-02-01 20:20:39 +08:00
#
# Copyright (C) 2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=tailscale
2024-02-27 00:21:27 +08:00
PKG_VERSION:=1.58.2
PKG_RELEASE:=1
2023-02-01 20:20:39 +08:00
2023-09-28 23:36:39 +08:00
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
2023-02-01 20:20:39 +08:00
PKG_SOURCE_URL:=https://codeload.github.com/tailscale/tailscale/tar.gz/v$(PKG_VERSION)?
2024-02-27 00:21:27 +08:00
PKG_HASH:=452f355408e4e2179872387a863387e06346fc8a6f9887821f9b8a072c6a5b0a
2023-02-01 20:20:39 +08:00
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DIR:=$(BUILD_DIR)/tailscale-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
2023-09-11 14:52:04 +08:00
PKG_BUILD_FLAGS:=no-mips16
2023-02-01 20:20:39 +08:00
GO_PKG:=\
tailscale.com/cmd/tailscaled
2023-09-11 14:52:04 +08:00
GO_PKG_LDFLAGS:=-X 'tailscale.com/version.longStamp=$(PKG_VERSION)-$(PKG_RELEASE) (OpenWrt)'
GO_PKG_LDFLAGS_X:=tailscale.com/version.shortStamp=$(PKG_VERSION)
2024-02-08 09:08:52 +08:00
GO_PKG_TAGS:=ts_include_cli
2023-02-01 20:20:39 +08:00
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
2024-02-08 09:08:52 +08:00
define Package/tailscale
2023-02-01 20:20:39 +08:00
SECTION:=net
CATEGORY:=Network
SUBMENU:=VPN
TITLE:=Zero config VPN
URL:=https://tailscale.com
2024-02-08 09:08:52 +08:00
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle +kmod-tun
PROVIDES:=tailscaled
2023-02-01 20:20:39 +08:00
endef
define Package/tailscale/description
It creates a secure network between your servers, computers,
and cloud instances. Even when separated by firewalls or subnets.
endef
2024-02-08 09:08:52 +08:00
define Package/tailscale/conffiles
2023-09-11 14:52:04 +08:00
/etc/config/tailscale
2023-09-28 23:36:39 +08:00
/etc/tailscale/
2023-09-11 14:52:04 +08:00
endef
2023-02-01 20:20:39 +08:00
define Package/tailscale/install
2023-09-11 14:52:04 +08:00
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
2023-02-01 20:20:39 +08:00
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/tailscaled $(1)/usr/sbin
2024-02-08 09:08:52 +08:00
$(LN) tailscaled $(1)/usr/sbin/tailscale
2023-02-01 20:20:39 +08:00
$(INSTALL_BIN) ./files//tailscale.init $(1)/etc/init.d/tailscale
$(INSTALL_DATA) ./files//tailscale.conf $(1)/etc/config/tailscale
endef
$(eval $(call BuildPackage,tailscale))