# Maintainer: Eivind Uggedal pkgname=docker pkgver=1.8.0 pkgrel=0 _gitcommit=0d03096 pkgdesc="Pack, ship and run any application as a lightweight container" url="http://www.docker.io/" arch="x86_64" license="ASL 2.0" depends="iptables git xz" depends_dev="" makedepends="go sqlite-dev btrfs-progs-dev bash linux-headers" options="!strip" install="$pkgname.pre-install" subpackages=" $pkgname-bash-completion:completion $pkgname-vim:vim " source=" $pkgname-$pkgver.tar.gz::https://github.com/docker/docker/archive/v$pkgver.tar.gz openrc-fixes.patch " _builddir="$srcdir"/$pkgname-$pkgver _buildtags="exclude_graphdriver_aufs exclude_graphdriver_devicemapper" prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" export AUTO_GOPATH=1 export DOCKER_GITCOMMIT=$_gitcommit export DOCKER_BUILDTAGS=$_buildtags unset CC # prevent possible ccache issues ./hack/make.sh dynbinary } package() { local ver cd "$_builddir" ver=$(cat VERSION) install -Dm755 bundles/$ver/dynbinary/docker-$ver \ "$pkgdir"/usr/bin/docker install -Dm755 bundles/$ver/dynbinary/dockerinit-$ver \ "$pkgdir"/usr/lib/docker/dockerinit install -Dm755 contrib/init/openrc/docker.initd \ "$pkgdir"/etc/init.d/docker install -Dm644 contrib/init/openrc/docker.confd \ "$pkgdir"/etc/conf.d/docker } completion() { depends="" pkgdesc="Bash completion script for Docker" arch="noarch" install -Dm644 "$_builddir"/contrib/completion/bash/$pkgname \ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname } vim() { local f depends="" pkgdesc="Vim syntax for Docker" arch="noarch" for f in ftdetect/dockerfile.vim syntax/dockerfile.vim; do install -Dm644 "$_builddir"/contrib/syntax/vim/$f \ "$subpkgdir"/usr/share/vim/vimfiles/$f done } md5sums="aef944123b35eebc275f14c800ba5fa5 docker-1.8.0.tar.gz 2c31dfb597ded751e566602611ddb6ae openrc-fixes.patch" sha256sums="e2794aba10c04cfe996a91aff14fa1a88629a09eb7977fcd096b3a795fbbd7d8 docker-1.8.0.tar.gz ae9c3c780ef5e9ffb5666cbe343b0ecb9f498f1ab5d68373b39eea76b68a0f7c openrc-fixes.patch" sha512sums="c13cab01400a35909e2e9eb4661330a9035e1367db8a977590a33e11cac09c9268cd80e9d87168c3caa93c54f37edde6eecc016725ae1375e8e69ee6c7702851 docker-1.8.0.tar.gz 79e78eed7eb1bfc468103fd4b171f66eabbffd3e504bfe1b8bdb40441292f316f6584fae415b93f0630d6975f888f1db4fb702886e78b6adc3a9a156a80de9b3 openrc-fixes.patch"