PKGBUILDs/community/docker/PKGBUILD

67 lines
2.1 KiB
Bash
Raw Normal View History

2013-12-20 14:00:48 +00:00
# $Id$
# Maintainer: Sébastien "Seblu" Luttringer
# Add patch for ARM being a supported platform.
2013-12-20 14:00:48 +00:00
pkgname=docker
2014-03-10 18:07:12 +00:00
_truever=0.9.0
2014-02-07 20:18:32 +00:00
pkgver=${_truever%.*}
2014-03-10 18:07:12 +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'
2014-02-22 23:01:39 +00:00
arch=('x86_64')
2013-12-20 14:00:48 +00:00
url='http://www.docker.io/'
license=('Apache')
2014-03-10 18:07:12 +00:00
depends=('bridge-utils' 'iproute2' 'device-mapper' 'sqlite' 'systemd')
2014-02-07 20:18:32 +00:00
makedepends=('git' 'go' 'btrfs-progs')
2014-03-10 18:07:12 +00:00
optdepends=('btrfs-progs: btrfs backend support'
'lxc: lxc driver 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
2014-02-07 20:18:32 +00:00
source=("git+https://github.com/dotcloud/docker.git#tag=v$_truever"
'docker-arm.patch'
'btrfs-arm.patch')
md5sums=('SKIP'
'47cc1cdf900af66660bfa3402012ea71'
'1ec4b4b42eb80f2692cee757324370b0')
2013-12-20 14:00:48 +00:00
# magic harcoded path
_magic=src/github.com/dotcloud
prepare() {
mkdir -p "$_magic"
ln -sfn "../../../docker" "$_magic/docker"
cd "${srcdir}/docker"
patch -p1 <"${srcdir}/docker-arm.patch"
patch -p1 <"${srcdir}/btrfs-arm.patch"
find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build amd64/\/\/ +build arm/'
find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build !linux !amd64/\/\/ +build !linux !arm/'
find . -name '*.go' | xargs sed --in-place= -e 's/\/\/ +build linux,amd64/\/\/ +build linux,arm/'
2013-12-20 14:00:48 +00:00
}
build() {
cd "$_magic/docker"
export GOPATH="$srcdir:$srcdir/$_magic/docker/vendor"
./hack/make.sh dynbinary
}
check() {
cd "$_magic/docker"
# Will be added upstream soon
#./hack/make.sh dyntest
}
package() {
cd "$_magic/docker"
2014-02-07 20:18:32 +00:00
install -Dm755 "bundles/$_truever/dynbinary/docker-$_truever" "$pkgdir/usr/bin/docker"
install -Dm755 "bundles/$_truever/dynbinary/dockerinit-$_truever" "$pkgdir/usr/lib/docker/dockerinit"
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"
# systemd
install -Dm644 "contrib/init/systemd/docker.service" "$pkgdir/usr/lib/systemd/system/docker.service"
}
# vim:set ts=2 sw=2 et: