golang: Add GO_PKG_TAGS for Go packages

This adds a new Makefile variable, GO_PKG_TAGS, for Go packages. When
set, the value is passed as the parameter of the -tags option for 'go
install'.

This also updates syncthing to use this variable.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2020-07-16 11:55:15 +08:00
committed by Paul Spooren
parent 9694fb2987
commit 34a3e58a12
2 changed files with 19 additions and 13 deletions
+2 -5
View File
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=syncthing
PKG_VERSION:=1.6.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
@@ -29,6 +29,7 @@ GO_PKG_LDFLAGS_X:=\
github.com/syncthing/syncthing/lib/build.User=openwrt \
github.com/syncthing/syncthing/lib/build.Host=openwrt \
github.com/syncthing/syncthing/lib/build.Program=syncthing
GO_PKG_TAGS:=noupgrade
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
@@ -42,10 +43,6 @@ define Package/syncthing
USERID:=syncthing:syncthing
endef
define Build/Compile
$(call GoPackage/Build/Compile,-tags noupgrade)
endef
define Package/syncthing/conffiles
/etc/config/syncthing
/etc/syncthing