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.

59 lines
1.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gateway-go
  3. PKG_VERSION:=0.1.95
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/OpenIoTHub/gateway-go/tar.gz/v${PKG_VERSION}?
  7. PKG_HASH:=50a1c0e997664ae71da5b7394b792634832df50e8eba90ba8be7afd64e65a866
  8. PKG_MAINTAINER:=Yu Fang <newfarry@126.com>
  9. PKG_LICENSE:=MIT
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/gateway-go-$(PKG_VERSION)
  12. PKG_BUILD_DEPENDS:=golang/host
  13. PKG_BUILD_PARALLEL:=1
  14. PKG_USE_MIPS16:=0
  15. GO_PKG:=github.com/OpenIoTHub/gateway-go
  16. GO_PKG_LDFLAGS_X:=\
  17. main.version=v$(PKG_VERSION) \
  18. main.commit=$(PKG_VERSION) \
  19. main.builtBy=openwrt \
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../../lang/golang/golang-package.mk
  22. define Package/gateway-go
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Web Servers/Proxies
  26. TITLE:=gateway-go - gateway of OpenIoTHub
  27. URL:=https://github.com/OpenIoTHub/gateway-go
  28. DEPENDS:=$(GO_ARCH_DEPENDS)
  29. endef
  30. define Package/gateway-go/description
  31. gateway-go is GateWay Client for OpenIoTHub.
  32. endef
  33. define Package/gateway-go/install
  34. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  35. $(INSTALL_DIR) $(1)/usr/bin/
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gateway-go $(1)/usr/bin/
  37. $(INSTALL_DIR) $(1)/etc/gateway-go/
  38. $(INSTALL_CONF) $(PKG_BUILD_DIR)/gateway-go.yaml $(1)/etc/gateway-go/
  39. $(INSTALL_DIR) $(1)/etc/init.d/
  40. $(INSTALL_BIN) ./files/gateway-go.init $(1)/etc/init.d/gateway-go
  41. endef
  42. define Package/gateway-go/conffiles
  43. /etc/gateway-go/gateway-go.yaml
  44. endef
  45. $(eval $(call GoBinPackage,gateway-go))
  46. $(eval $(call BuildPackage,gateway-go))