aboutsummaryrefslogtreecommitdiffstats
path: root/main/docker/APKBUILD
blob: bb1b949138c32a6fe852c34d69a1c8614df650a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=docker
pkgver=0.12.0
pkgrel=0
_gitcommit=14680bf
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"
options="!strip"
install="$pkgname.pre-install"
subpackages="
	$pkgname-bash-completion:completion
	$pkgname-doc
	$pkgname-vim:vim
	"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/dotcloud/docker/archive/v$pkgver.tar.gz
	http://dev.alpinelinux.org/archive/$pkgname/$pkgname-man-$pkgver.tar.gz
	"

_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

	./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

	install -dm755 "$pkgdir"/usr/share/man
	cp -a "$srcdir"/$pkgname-man-$pkgver/man1 "$pkgdir"/usr/share/man
}

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="800973801b4a833a94485cdc2f28ee30  docker-0.12.0.tar.gz
8628ab7b2f8badec557f13661c3c0107  docker-man-0.12.0.tar.gz"
sha256sums="64679e0722132ffc7a23e247150e3d70c5a4001e0c6d9dc97e85316048d09852  docker-0.12.0.tar.gz
cb7ed3c82b63fb69e2bdf31aa2535e1469ff29d076b60ad62c92a127739ddc14  docker-man-0.12.0.tar.gz"
sha512sums="08033431d97ce26d4db4c3a99accaede88fa5bf3da2fb8c8c8b99a60e0bbc4a7299f3f053573945991e5a0f5f2493cc81d6a5e69049b72035834e9a86f25a8be  docker-0.12.0.tar.gz
ea4505c0ea2e6eba48e6cf8d5ef34eb1fb7b1c9b484960c4c47efa679a1d943b46a8aadb141186219d9e1a15fd8147cfa0fafcfd62799a3b9673500d5fa015cd  docker-man-0.12.0.tar.gz"