PKGBUILDs/community/docker/PKGBUILD

106 lines
3.8 KiB
Bash
Raw Normal View History

2013-12-20 14:00:48 +00:00
# $Id$
# Maintainer: Sébastien "Seblu" Luttringer
2013-12-20 14:00:48 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2013-12-20 14:00:48 +00:00
pkgname=docker
2016-12-30 14:37:41 +00:00
pkgver=1.12.5
2016-08-19 00:23:18 +00:00
pkgrel=1
2013-12-20 14:00:48 +00:00
epoch=1
pkgdesc='Pack, ship and run any application as a lightweight container'
2016-12-30 14:37:41 +00:00
arch=('x86_64' 'i686')
url='https://www.docker.com/'
2013-12-20 14:00:48 +00:00
license=('Apache')
2016-08-19 00:23:18 +00:00
depends=('bridge-utils' 'iproute2' 'device-mapper' 'sqlite' 'systemd' 'libseccomp')
2015-05-14 16:20:29 +00:00
makedepends=('git' 'go' 'btrfs-progs' 'go-md2man')
2014-03-10 18:07:12 +00:00
optdepends=('btrfs-progs: btrfs backend support'
'lxc: lxc backend support')
2013-12-20 14:00:48 +00:00
# don't strip binaries! A sha1 is used to check binary consistency.
options=('!strip')
install=$pkgname.install
2016-08-19 00:23:18 +00:00
# Use exact commit version from Dockerfile for runc and containerd until 1.0.0
# https://github.com/docker/containerd/issues/299#issuecomment-240745119
2015-05-09 15:35:15 +00:00
source=("git+https://github.com/docker/docker.git#tag=v$pkgver"
2016-08-19 00:23:18 +00:00
'git+https://github.com/opencontainers/runc.git#commit=cc29e3dded8e27ba8f65738f40d251c885030a28'
'git+https://github.com/docker/containerd.git#commit=0ac3cd1be170d180b2baed755e8f0da547ceb267'
2016-02-06 00:33:24 +00:00
"$pkgname.sysusers")
2015-05-09 15:35:15 +00:00
md5sums=('SKIP'
2016-08-19 00:23:18 +00:00
'SKIP'
'SKIP'
2016-02-06 00:33:24 +00:00
'8cf9900ebada61f352a03465a088da34')
prepare() {
2016-03-12 19:39:30 +00:00
cd docker
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
2016-12-30 14:37:41 +00:00
msg2 "Applying patch ${filename##*/}"
patch -p1 -N -i "$srcdir/${filename##*/}"
2016-03-12 19:39:30 +00:00
fi
done
:
}
2013-12-20 14:00:48 +00:00
build() {
2016-08-19 00:23:18 +00:00
export GOPATH="$srcdir"
# runc
msg2 'Building runc'
mkdir -p src/github.com/opencontainers
ln -rsf "$srcdir/runc" src/github.com/opencontainers/runc
cd src/github.com/opencontainers/runc
make BUILDTAGS='seccomp'
# containerd
msg2 'Building containerd'
cd "$srcdir"
mkdir -p src/github.com/docker
ln -rsf containerd src/github.com/docker
cd src/github.com/docker/containerd
LDFLAGS= make
# docker
msg2 'Building docker'
cd "$srcdir"/docker
2016-06-24 00:07:28 +00:00
export AUTO_GOPATH=1 DOCKER_BUILDTAGS='seccomp'
2015-06-25 17:56:25 +00:00
hack/make.sh dynbinary
2015-05-14 16:20:29 +00:00
# man pages
2016-05-01 01:56:47 +00:00
man/md2man-all.sh 2>/dev/null
2013-12-20 14:00:48 +00:00
}
#check() {
2015-05-14 02:43:12 +00:00
# cd docker
# ./hack/make.sh dyntest
#}
2013-12-20 14:00:48 +00:00
package() {
2016-08-19 00:23:18 +00:00
# runc & containerd
install -Dm755 containerd/bin/containerd "$pkgdir/usr/bin/docker-containerd"
install -Dm755 containerd/bin/containerd-shim "$pkgdir/usr/bin/docker-containerd-shim"
install -Dm755 containerd/bin/ctr "$pkgdir/usr/bin/docker-containerd-ctr"
install -Dm755 runc/runc "$pkgdir/usr/bin/docker-runc"
# docker binary
cd docker
2016-08-19 00:23:18 +00:00
install -Dm755 "bundles/$pkgver/dynbinary-client/docker-$pkgver" "$pkgdir/usr/bin/docker"
install -Dm755 "bundles/$pkgver/dynbinary-daemon/docker-proxy-$pkgver" "$pkgdir/usr/bin/docker-proxy"
install -Dm755 "bundles/$pkgver/dynbinary-daemon/dockerd-$pkgver" "$pkgdir/usr/bin/dockerd"
2013-12-20 14:00:48 +00:00
# completion
install -Dm644 'contrib/completion/bash/docker' "$pkgdir/usr/share/bash-completion/completions/docker"
install -Dm644 'contrib/completion/zsh/_docker' "$pkgdir/usr/share/zsh/site-functions/_docker"
2015-07-19 00:00:04 +00:00
install -Dm644 'contrib/completion/fish/docker.fish' "$pkgdir/usr/share/fish/vendor_completions.d/docker.fish"
2013-12-20 14:00:48 +00:00
# systemd
2015-05-09 15:35:15 +00:00
install -Dm644 'contrib/init/systemd/docker.service' "$pkgdir/usr/lib/systemd/system/docker.service"
install -Dm644 'contrib/init/systemd/docker.socket' "$pkgdir/usr/lib/systemd/system/docker.socket"
2016-08-19 00:23:18 +00:00
install -Dm644 'contrib/udev/80-docker.rules' "$pkgdir/usr/lib/udev/rules.d/80-docker.rules"
2015-05-09 15:35:15 +00:00
install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# vim syntax
2015-05-09 15:35:15 +00:00
install -Dm644 'contrib/syntax/vim/syntax/dockerfile.vim' "$pkgdir/usr/share/vim/vimfiles/syntax/dockerfile.vim"
install -Dm644 'contrib/syntax/vim/ftdetect/dockerfile.vim' "$pkgdir/usr/share/vim/vimfiles/ftdetect/dockerfile.vim"
2015-05-14 16:20:29 +00:00
# man
install -dm755 "$pkgdir/usr/share/man"
2015-06-25 17:56:25 +00:00
mv man/man* "$pkgdir/usr/share/man"
2013-12-20 14:00:48 +00:00
}
# vim:set ts=2 sw=2 et: