docker: split package, update to 20.10.5
New package: docker-cli-20.10.5 New package: moby-20.10.5
This commit is contained in:
parent
3423ff7c82
commit
9b3c344a79
|
@ -0,0 +1 @@
|
|||
docker-cli
|
|
@ -0,0 +1,36 @@
|
|||
# Template file for 'docker-cli'
|
||||
pkgname=docker-cli
|
||||
version=20.10.5
|
||||
revision=1
|
||||
wrksrc="cli-${version}"
|
||||
build_style=go
|
||||
go_package="github.com/docker/cli/cmd/docker"
|
||||
go_import_path="github.com/docker/cli"
|
||||
_cli_ver_path="github.com/docker/cli/cli/version"
|
||||
go_ldflags="-X \"${_cli_ver_path}.Version=${version}\"
|
||||
-X \"${_cli_ver_path}.GitCommit=tag v${version}\""
|
||||
hostmakedepends="pkg-config"
|
||||
depends="git"
|
||||
short_desc="Command-line interface for the Docker daemon"
|
||||
maintainer="PWA COLLECTIVE <mail@pwa.cya.cx>"
|
||||
license="Apache-2.0"
|
||||
homepage="http://www.docker.io"
|
||||
distfiles="https://github.com/docker/cli/archive/v${version}.tar.gz"
|
||||
checksum=4ba845f8c7e2e0a2ca1ec6589847159ca8d0d37b609f0e6f78def7a893b9b342
|
||||
system_groups="docker"
|
||||
|
||||
pre_build() {
|
||||
go_ldflags+=" -X \"${_cli_ver_path}.BuildTime=$(date +%Y-%m-%dT%H:%M:%SZ)\""
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vcompletion contrib/completion/fish/docker.fish fish
|
||||
vcompletion contrib/completion/zsh/_docker zsh
|
||||
vcompletion contrib/completion/bash/docker bash
|
||||
}
|
||||
|
||||
docker_package() {
|
||||
build_style="meta"
|
||||
short_desc="Docker container runtime"
|
||||
depends="${sourcepkg}>=${version}_${revision} moby"
|
||||
}
|
|
@ -1,138 +0,0 @@
|
|||
# Template file for 'docker'
|
||||
pkgname=docker
|
||||
version=19.03.15
|
||||
revision=1
|
||||
create_wrksrc=yes
|
||||
build_style=go
|
||||
hostmakedepends="pkg-config cmake tar"
|
||||
makedepends="libbtrfs-devel sqlite-devel device-mapper-devel libseccomp-devel
|
||||
libapparmor-devel libltdl-devel"
|
||||
depends="containerd runc"
|
||||
short_desc="Pack, ship and run any application as a lightweight container"
|
||||
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
||||
license="Apache-2.0, MIT"
|
||||
homepage="http://www.docker.io"
|
||||
|
||||
_tini_version=0.18.0
|
||||
_libnetwork="bump_${version%.${version#*.*.}}"
|
||||
|
||||
distfiles="
|
||||
https://github.com/docker/docker-ce/archive/v${version}.tar.gz>docker-ce-$version.tar.gz
|
||||
https://github.com/krallin/tini/archive/v$_tini_version.tar.gz>tini-$_tini_version.tar.gz
|
||||
https://github.com/moby/libnetwork/archive/$_libnetwork.tar.gz>libnetwork-$_libnetwork.tar.gz"
|
||||
checksum="f2f31dd4137eaa735a26e590c9718fb06867afff4d8415cc80feb6cdc9e4a8cd
|
||||
1097675352d6317b547e73f9dc7c6839fd0bb0d96dafc2e5c95506bb324049a2
|
||||
753615b94b6a8e37a612f766870d9e2af7e17cae7820bc6104ba67b4c6c1109a"
|
||||
|
||||
|
||||
# These are required at run-time.
|
||||
depends+=" iptables xz git"
|
||||
nopie=yes
|
||||
nostrip=yes
|
||||
archs="aarch64* armv[67]l* x86_64* ppc64le*"
|
||||
system_groups="docker"
|
||||
|
||||
do_configure() {
|
||||
msg_normal "Configuring docker-init\n"
|
||||
mkdir -p $wrksrc/tini-$_tini_version/build
|
||||
cd $wrksrc/tini-$_tini_version/build
|
||||
local cmake_args="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None"
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*) _CMAKE_SYSTEM_PROCESSOR=x86_64 ;;
|
||||
aarch64*) _CMAKE_SYSTEM_PROCESSOR=aarch64 ;;
|
||||
arm*) _CMAKE_SYSTEM_PROCESSOR=arm ;;
|
||||
ppc64le*) _CMAKE_SYSTEM_PROCESSOR=ppc64le ;;
|
||||
*) msg_error "BUG: $pkgver: unknown target machine\n" ;;
|
||||
esac
|
||||
cat >cross_${XBPS_CROSS_TRIPLET}.cmake <<-_EOF
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
SET(CMAKE_C_COMPILER ${CC})
|
||||
SET(CMAKE_CXX_COMPILER ${CXX})
|
||||
SET(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
SET(CMAKE_SYSTEM_PROCESSOR ${_CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH ${XBPS_CROSS_BASE})
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
_EOF
|
||||
cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=cross_${XBPS_CROSS_TRIPLET}.cmake"
|
||||
fi
|
||||
CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
|
||||
cmake ${cmake_args} ..
|
||||
|
||||
mkdir -p $wrksrc/gopath/src/github.com/docker
|
||||
|
||||
msg_normal "Preparing docker-proxy import path\n"
|
||||
cd $wrksrc/libnetwork-$_libnetwork
|
||||
rm -f $wrksrc/gopath/src/github.com/docker/libnetwork
|
||||
ln -s "$PWD" $wrksrc/gopath/src/github.com/docker/libnetwork
|
||||
|
||||
msg_normal "Preparing docker-cli import path\n"
|
||||
cd $wrksrc/docker-ce-$version
|
||||
rm -f $wrksrc/gopath/src/github.com/docker/cli
|
||||
ln -s "$PWD/components/cli" $wrksrc/gopath/src/github.com/docker/cli
|
||||
rm -f $wrksrc/gopath/src/github.com/docker/docker
|
||||
ln -s "$PWD/components/engine" $wrksrc/gopath/src/github.com/docker/docker
|
||||
|
||||
BUILDTIME=$(date --utc --rfc-3339 ns)
|
||||
BUILDTIME=${BUILDTIME/ /T}
|
||||
vsed -i -e "
|
||||
/GitCommit/s/\".*\"/\"v$version\"/;
|
||||
/Version/s/\".*\"/\"$version\"/;
|
||||
/BuildTime/s/\".*\"/\"$BUILDTIME\"/;
|
||||
" \
|
||||
components/engine/dockerversion/version_lib.go \
|
||||
components/cli/cli/version/version.go
|
||||
}
|
||||
|
||||
do_build() {
|
||||
export GOPATH="$wrksrc/gopath"
|
||||
mkdir -p $wrksrc/gopath/bin
|
||||
|
||||
msg_normal "Building docker-init\n"
|
||||
cd $wrksrc/tini-$_tini_version/build
|
||||
make tini-static
|
||||
|
||||
msg_normal "Building docker-proxy\n"
|
||||
go build -buildmode=pie \
|
||||
-ldflags="$go_ldflags -linkmode=external" \
|
||||
-o $wrksrc/gopath/bin/docker-proxy \
|
||||
github.com/docker/libnetwork/cmd/proxy
|
||||
|
||||
msg_normal "Building docker cli\n"
|
||||
go build -buildmode=pie \
|
||||
-ldflags="$go_ldflags" -o $wrksrc/gopath/bin/docker \
|
||||
github.com/docker/cli/cmd/docker
|
||||
|
||||
msg_normal "Building docker daemon\n"
|
||||
go build -buildmode=pie \
|
||||
-tags 'libdm_dlsym_deferred_remove seccomp apparmor' \
|
||||
-ldflags="$go_ldflags" \
|
||||
-o $wrksrc/gopath/bin/dockerd \
|
||||
github.com/docker/docker/cmd/dockerd
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin tini-$_tini_version/build/tini-static docker-init
|
||||
vlicense tini-$_tini_version/LICENSE docker-init.MIT
|
||||
vbin gopath/bin/docker-proxy
|
||||
vbin gopath/bin/docker
|
||||
vbin gopath/bin/dockerd
|
||||
cd docker-ce-$version
|
||||
vcompletion components/cli/contrib/completion/bash/docker bash
|
||||
vcompletion components/cli/contrib/completion/zsh/_docker zsh
|
||||
vcompletion components/cli/contrib/completion/fish/docker.fish fish
|
||||
vinstall components/engine/contrib/syntax/vim/syntax/dockerfile.vim 644 \
|
||||
usr/share/vim/vimfiles/syntax/dockerfile.vim
|
||||
vinstall components/engine/contrib/syntax/vim/ftdetect/dockerfile.vim 644 \
|
||||
usr/share/vim/vimfiles/ftdetect/dockerfile.vim
|
||||
vlicense components/engine/contrib/syntax/vim/LICENSE dockerfile.vim.BSD-2-Clause
|
||||
vsv docker
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
pattern='href="/docker/docker-ce/releases/tag/v\K[\d\.]+(?=")'
|
|
@ -0,0 +1,51 @@
|
|||
# Template file for 'moby'
|
||||
pkgname=moby
|
||||
version=20.10.5
|
||||
revision=1
|
||||
_libnetwork_commit=fa125a3512ee0f6187721c88582bf8c4378bd4d7
|
||||
create_wrksrc=yes
|
||||
build_style=go
|
||||
go_import_path="github.com/docker/docker"
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="libbtrfs-devel device-mapper-devel libseccomp-devel"
|
||||
depends="containerd iptables xz"
|
||||
short_desc="Container engine for the Docker ecosystem"
|
||||
maintainer="PWA COLLECTIVE <mail@pwa.cya.cx>"
|
||||
license="Apache-2.0"
|
||||
homepage="http://www.docker.io"
|
||||
distfiles="https://github.com/moby/moby/archive/v${version}.tar.gz>moby-$version.tar.gz
|
||||
https://github.com/docker/libnetwork/archive/$_libnetwork_commit.tar.gz>libnetwork-$_libnetwork_commit.tar.gz"
|
||||
checksum="bcf651d75e5c80421e8cd3b0d47f3425e01047cf67aef0eda83b68776905a583
|
||||
9ce0fa64b00d9ef86971bdeb01cb24b02e6751c0d159ccb057521a41762750f4"
|
||||
system_groups="docker"
|
||||
|
||||
_moby_builddir="moby-$version"
|
||||
_libnetwork_builddir="libnetwork-$_libnetwork_commit"
|
||||
|
||||
do_build() {
|
||||
export AUTO_GOPATH=1
|
||||
export DOCKER_GITCOMMIT="tag v${version}"
|
||||
export DOCKER_BUILDTAGS="seccomp"
|
||||
export DISABLE_WARN_OUTSIDE_CONTAINER=1
|
||||
|
||||
mkdir -p "$wrksrc/$_moby_builddir"
|
||||
mkdir -p "$wrksrc/$_libnetwork_builddir"
|
||||
|
||||
msg_normal "Building docker-proxy (libnetwork)\n"
|
||||
cd "$wrksrc/$_libnetwork_builddir"
|
||||
mkdir -p src/github.com/docker/
|
||||
ln -sf "$wrksrc/$_libnetwork_builddir" src/github.com/docker/libnetwork
|
||||
GOPATH="$PWD" go build -v -ldflags="-linkmode=external" -o docker-proxy github.com/docker/libnetwork/cmd/proxy
|
||||
|
||||
msg_normal "Building docker-engine (moby)\n"
|
||||
cd "$wrksrc/$_moby_builddir"
|
||||
mkdir -p src/github.com/docker/
|
||||
ln -sf "$wrksrc/$_moby_builddir" src/github.com/docker/docker
|
||||
GOPATH="$PWD" VERSION="$version" hack/make.sh dynbinary
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin $_libnetwork_builddir/docker-proxy
|
||||
vbin $_moby_builddir/bundles/dynbinary-daemon/dockerd
|
||||
vsv docker
|
||||
}
|
Loading…
Reference in New Issue