void-packages/srcpkgs/moby/template

52 lines
1.8 KiB
Bash

# 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
}