update 2026-05-27 23:25:57

This commit is contained in:
action committed 2026-05-27 23:25:57 +08:00
1 parent 84f707b52b
commit d0159b49a5
759 files changed
+362365

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=docker
PKG_VERSION:=29.5.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/docker/cli/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=e5cf80d9e0b6630bb2e97decf664ad5f0c732b296b7c47030044c3a7287bbddb
PKG_BUILD_DIR:=$(BUILD_DIR)/cli-$(PKG_VERSION)
PKG_GIT_SHORT_COMMIT:=$(shell $(CURDIR)/git-short-commit.sh 'github.com/docker/cli' 'v$(PKG_VERSION)' '$(TMP_DIR)/git-short-commit/$(PKG_NAME)-$(PKG_VERSION)')
PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
GO_PKG:=github.com/docker/cli
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/docker
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Docker Community Edition CLI
URL:=https://www.docker.com/
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/docker/description
The CLI used in the Docker CE and Docker EE products.
endef
GO_PKG_INSTALL_EXTRA:=\
cli/compose/schema/data \
vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lc -lgcc_eh)
define Build/Prepare
$(Build/Prepare/Default)
# Verify PKG_GIT_SHORT_COMMIT
( \
EXPECTED_PKG_GIT_SHORT_COMMIT=$$$$( $(CURDIR)/git-short-commit.sh 'github.com/docker/cli' 'v$(PKG_VERSION)' '$(TMP_DIR)/git-short-commit/$(PKG_NAME)-$(PKG_VERSION)' ); \
if [ "$$$${EXPECTED_PKG_GIT_SHORT_COMMIT}" != "$(strip $(PKG_GIT_SHORT_COMMIT))" ]; then \
echo "ERROR: Expected 'PKG_GIT_SHORT_COMMIT:=$$$${EXPECTED_PKG_GIT_SHORT_COMMIT}', found 'PKG_GIT_SHORT_COMMIT:=$(strip $(PKG_GIT_SHORT_COMMIT))'"; \
exit 1; \
fi \
)
endef
define Build/Compile
( \
cd $(PKG_BUILD_DIR); \
$(GO_PKG_VARS) \
GITCOMMIT=$(PKG_GIT_SHORT_COMMIT) \
VERSION=$(PKG_VERSION) \
./scripts/build/binary; \
)
endef
define Package/docker/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/docker $(1)/usr/bin/
endef
$(eval $(call BuildPackage,docker))
+49
View File
@@ -0,0 +1,49 @@
#!/bin/sh
#
# USAGE: git-short-commit.sh <GIT_URL> <GIT_REF> <GIT_DIR>
#
set -e
error() {
echo "ERROR: ${*}" >&2
exit 1
}
GIT_URL="${1}"
if [ -z "${GIT_URL}" ]; then
error "Git URL not specified"
fi
GIT_REF="${2}"
if [ -z "${GIT_REF}" ]; then
error "Git reference not specified"
fi
GIT_DIR="${3}"
if [ -z "${GIT_DIR}" ]; then
error "Git clone directory not specified"
fi
clean_up() {
rm -rf "${GIT_DIR}"
}
trap clean_up EXIT
git init --quiet "${GIT_DIR}"
(
cd "${GIT_DIR}"
for PREFIX in "" "https://" "http://" "git@"; do
echo "Trying remote '${PREFIX}${GIT_URL}'" >&2
git remote add origin "${PREFIX}${GIT_URL}"
if git fetch --depth 1 origin "${GIT_REF}"; then
git checkout --detach FETCH_HEAD --
git rev-parse --short HEAD
break
fi
git remote remove origin
done
)