aboutsummaryrefslogblamecommitdiffstats
path: root/community/docker/APKBUILD
blob: 0b98c8108e4df8512becb4373864bc368d3a3bfa (plain) (tree)
1
2
3
4
5
6
7
8

                                                 
            

                  

                                                                       
                 


                         
                                                              
                

                              

                                         

                        
        
                                                                                         
                          
         



                                                                      









                                                                        





                                           
                                                 
 
                                


           
                       
                                









                                                               

 

                                            
                     

                                                              




                                                                           









                                                                               
       



                                       
                





                                                                   





                                                                                                                                                                 
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=docker
pkgver=1.9.0
pkgrel=0
_gitcommit=f4bf5c7
pkgdesc="Pack, ship and run any application as a lightweight container"
url="http://www.docker.io/"
arch="x86 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:bashcomp
	$pkgname-zsh-completion:zshcomp
	$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() {
	cd "$_builddir"
	local 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
}

bashcomp() {
	pkgdesc="Bash completion for Docker"
	arch="noarch"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	install -Dm644 "$_builddir"/contrib/completion/bash/$pkgname \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

zshcomp() {
	pkgdesc="Zsh completion for $pkgname"
	arch="noarch"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	install -Dm644 "$_builddir"/contrib/completion/zsh/_$pkgname \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname || return 1
}

vim() {
	depends=""
	pkgdesc="Vim syntax for Docker"
	arch="noarch"

	local f=
	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="b104e844d3f8b9c91cf587d33bb0a81e  docker-1.9.0.tar.gz
506e32a6157a7f92e67511111fba6fe8  openrc-fixes.patch"
sha256sums="1c06baea61971a711f9e510800fb4de5e0d8a6560963cfdc891e0037b40dc974  docker-1.9.0.tar.gz
864d229e21dfa6c931b29b908093302a48837ddb1aa4205088f6f7fd4d7da4e3  openrc-fixes.patch"
sha512sums="16c7fd900ff1122ccd62ce93b84209b026a165ff647cd4875e32c16251098c05e9e7de834cc6f27d164b5be168f8fd16323ec60593287a787f6fa8fcef144291  docker-1.9.0.tar.gz
1162f62e8a7a5ded0c54cfe46014449efd67491bdb678fa22862117adb08206c909a3f98b0062125d25256dc1f48596b696bd4b19a8804d2862e758678a8bb62  openrc-fixes.patch"