void-packages/srcpkgs/moby/template

52 lines
1.8 KiB
Bash

# Template file for 'moby'
pkgname=moby
version=20.10.9
revision=1
_libnetwork_commit=64b7a4574d1426139437d20e81c0b6d391130ec8
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="https://www.docker.com"
distfiles="https://github.com/moby/moby/archive/v${version}.tar.gz>moby-$version.tar.gz
https://github.com/moby/libnetwork/archive/$_libnetwork_commit.tar.gz>libnetwork-$_libnetwork_commit.tar.gz"
checksum="359e8854d0d51bc884d434f182f64ca62f25fbbe7b9c6a336eb09f212fe8cc9a
ede21e645ff6552b3a508f6186d3f34d267015ec0f96eefecf6d08c03cbd2987"
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
}