1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-22 13:56:19 +00:00
Lakka-LibreELEC/packages/addons/addon-depends/docker/cli/package.mk
2023-05-17 14:28:03 +00:00

48 lines
1.5 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="cli"
PKG_VERSION="$(get_pkg_version moby)"
PKG_SHA256="b31eb0343e8bb587e921a7630baa659896602072a77ad97720e5f2a8e48005e9"
PKG_LICENSE="ASL"
PKG_SITE="https://github.com/docker/cli"
PKG_URL="https://github.com/docker/cli/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain go:host"
PKG_LONGDESC="The Docker CLI"
PKG_TOOLCHAIN="manual"
# Git commit of the matching release https://github.com/docker/cli/releases
export PKG_GIT_COMMIT="ef23cbc4315ae76c744e02d687c09548ede461bd"
configure_target() {
go_configure
export LDFLAGS="-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld ${CC}"
# used for docker version
export GITCOMMIT=${PKG_GIT_COMMIT}
export VERSION=${PKG_VERSION}
export BUILDTIME="$(date --utc)"
cat > "${PKG_BUILD}/go.mod" << EOF
module github.com/docker/cli
go 1.18
EOF
GO111MODULE=auto ${GOLANG} mod tidy -modfile 'vendor.mod' -compat 1.18
GO111MODULE=auto ${GOLANG} mod vendor -modfile vendor.mod
}
make_target() {
mkdir -p bin
PKG_CLI_FLAGS="-X 'github.com/docker/cli/cli/version.Version=${VERSION}'"
PKG_CLI_FLAGS+=" -X 'github.com/docker/cli/cli/version.GitCommit=${GITCOMMIT}'"
PKG_CLI_FLAGS+=" -X 'github.com/docker/cli/cli/version.BuildTime=${BUILDTIME}'"
${GOLANG} build -mod=mod -modfile=vendor.mod -v -o bin/docker -a -tags "${PKG_DOCKER_BUILDTAGS}" -ldflags "${LDFLAGS} ${PKG_CLI_FLAGS}" ./cmd/docker
}
makeinstall_target() {
:
}