void-packages/srcpkgs/moby/template

52 lines
1.8 KiB
Bash

# Template file for 'moby'
pkgname=moby
version=20.10.17
revision=1
_libnetwork_commit=f6ccccb1c082a432c2a5814aaedaca56af33d9ea
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="061cf8579aa3c813c353c80fa480744e2f6cca2e6392f546bd0942a6a10c7a14
05bf95637bae134d12d02bd7a7854cd0c768e6fccb662c2c64523f05b997b204"
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
}