Skip to content

Instantly share code, notes, and snippets.

@MTRNord
Last active August 18, 2018 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MTRNord/35b7d67be966173227b30b5f28f78357 to your computer and use it in GitHub Desktop.
Save MTRNord/35b7d67be966173227b30b5f28f78357 to your computer and use it in GitHub Desktop.
Test Package for Golang Openwrt
include $(TOPDIR)/rules.mk
PKG_NAME:=hello_world
PKG_VERSION:=0.1.0
PKG_RELEASE:=1
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/MTRNord/helloworld-go/
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/hello_world/Default
TITLE:=Hello World
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/hello_world
$(call Package/hello_world/Default)
SECTION:=utils
CATEGORY:=Utilities
endef
define Package/hello_world/description
Hello World in Go
endef
define Package/hello_world/install
$(call GoPackage/Package/Install/Bin,$(1))
$(CP) ./files/* $(1)/
endef
$(eval $(call GoBinPackage,hello_world))
$(eval $(call BuildPackage,hello_world))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment