You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=tailscale
  9. PKG_VERSION:=1.12.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=tailscale-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/tailscale/tailscale/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=05e5b1d382cad7ac5737d87d0b61277791c75938468c2c662f21665998d431e9
  14. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/tailscale-$(PKG_VERSION)
  18. PKG_BUILD_DEPENDS:=golang/host
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_USE_MIPS16:=0
  21. GO_PKG:=\
  22. tailscale.com/cmd/tailscale \
  23. tailscale.com/cmd/tailscaled
  24. include $(INCLUDE_DIR)/package.mk
  25. include ../../lang/golang/golang-package.mk
  26. define Package/tailscale/Default
  27. SECTION:=net
  28. CATEGORY:=Network
  29. SUBMENU:=VPN
  30. TITLE:=Zero config VPN
  31. URL:=https://tailscale.com
  32. DEPENDS:=$(GO_ARCH_DEPENDS)
  33. endef
  34. define Package/tailscaled
  35. $(call Package/tailscale/Default)
  36. TITLE+= (daemon)
  37. DEPENDS+= +ca-bundle +kmod-tun
  38. endef
  39. define Package/tailscale
  40. $(call Package/tailscale/Default)
  41. TITLE+= (utility)
  42. DEPENDS+= +tailscaled
  43. endef
  44. define Package/tailscale/description
  45. It creates a secure network between your servers, computers,
  46. and cloud instances. Even when separated by firewalls or subnets.
  47. endef
  48. Package/tailscaled/description:=$(Package/tailscale/description)
  49. define Package/tailscale/install
  50. $(INSTALL_DIR) $(1)/usr/sbin
  51. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/tailscale $(1)/usr/sbin
  52. endef
  53. define Package/tailscaled/install
  54. $(INSTALL_DIR) $(1)/usr/sbin
  55. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/tailscaled $(1)/usr/sbin
  56. $(INSTALL_DIR) $(1)/etc/init.d/
  57. $(INSTALL_BIN) ./files//tailscale.init $(1)/etc/init.d/tailscale
  58. $(INSTALL_DIR) $(1)/etc/config/
  59. $(INSTALL_DATA) ./files//tailscale.conf $(1)/etc/config/tailscale
  60. endef
  61. $(eval $(call BuildPackage,tailscale))
  62. $(eval $(call BuildPackage,tailscaled))