Now that the pkg-golang infra automatically sets _INSTALL_BINS by default to the list of notdir of _BUILD_TARGETS, there is no need to do that in packages anymore. Most packages were already using the notdir construct, so those are trivially fixed; a few had a hard-coded list that matched the built targets list, so they too are trivially fixed. host-mender-artifact was slightly different, in that it explicitly set the _BIN_NAME to mender-artifact, which happens to be the default; it also set _INSTALL_BINS to _BIN_NAME, so again using the default. This package can also be fixed easily. Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com> Cc: Christian Stewart <christian@aperture.us> Cc: James Hilliard <james.hilliard1@gmail.com> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Romain Naour <romain.naour@smile.fr>
42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# docker-cli
|
|
#
|
|
################################################################################
|
|
|
|
DOCKER_CLI_VERSION = 28.3.2
|
|
DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION))
|
|
|
|
DOCKER_CLI_LICENSE = Apache-2.0
|
|
DOCKER_CLI_LICENSE_FILES = LICENSE
|
|
|
|
DOCKER_CLI_DEPENDENCIES = host-pkgconf
|
|
|
|
DOCKER_CLI_CPE_ID_VENDOR = docker
|
|
DOCKER_CLI_CPE_ID_PRODUCT = docker
|
|
|
|
DOCKER_CLI_TAGS = autogen
|
|
DOCKER_CLI_BUILD_TARGETS = cmd/docker
|
|
DOCKER_CLI_GOMOD = github.com/docker/cli
|
|
|
|
DOCKER_CLI_LDFLAGS = \
|
|
-X $(DOCKER_CLI_GOMOD)/cli/version.GitCommit=$(DOCKER_CLI_VERSION) \
|
|
-X $(DOCKER_CLI_GOMOD)/cli/version.Version=$(DOCKER_CLI_VERSION)
|
|
|
|
ifeq ($(BR2_PACKAGE_DOCKER_CLI_STATIC),y)
|
|
DOCKER_CLI_LDFLAGS += -extldflags '-static'
|
|
DOCKER_CLI_TAGS += osusergo netgo
|
|
DOCKER_CLI_GO_ENV = CGO_ENABLED=no
|
|
endif
|
|
|
|
# create the go.mod file with language version go1.19
|
|
# remove the conflicting vendor/modules.txt
|
|
# https://github.com/moby/moby/issues/44618#issuecomment-1343565705
|
|
define DOCKER_CLI_FIX_VENDORING
|
|
printf "module $(DOCKER_CLI_GOMOD)\n\ngo 1.19\n" > $(@D)/go.mod
|
|
rm -f $(@D)/vendor/modules.txt
|
|
endef
|
|
DOCKER_CLI_POST_EXTRACT_HOOKS += DOCKER_CLI_FIX_VENDORING
|
|
|
|
$(eval $(golang-package))
|