void-packages/srcpkgs/moby/template
2021-05-03 14:45:22 -04:00

51 lines
1.8 KiB
Bash

# Template file for 'moby'
pkgname=moby
version=20.10.6
revision=1
_libnetwork_commit=b3507428be5b458cb0e2b4086b13531fb0706e46
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 <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="fd7f5571b1f64f26b5ca520a3e1fefb33c190f3732b931051c23a76bdba5000e
90a8dc84bc5d2d74dee0b2c3544f8786598ff85e9fc9f6a55a15b60b7cd78d63"
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
}