Skip to content

Instantly share code, notes, and snippets.

@djmaze
Created September 22, 2014 21:20
Show Gist options
  • Save djmaze/9357147645b0bae354e5 to your computer and use it in GitHub Desktop.
Save djmaze/9357147645b0bae354e5 to your computer and use it in GitHub Desktop.
Docker 1.2.0 PKGBUILD with patch against tag-naming bug
# $Id$
# Maintainer: Sébastien "Seblu" Luttringer
pkgname=docker
pkgver=1.2.0
pkgrel=1
epoch=1
pkgdesc='Pack, ship and run any application as a lightweight container'
arch=('x86_64')
url='http://www.docker.io/'
license=('Apache')
depends=('bridge-utils' 'iproute2' 'device-mapper' 'sqlite' 'systemd')
makedepends=('git' 'go' 'btrfs-progs')
optdepends=('btrfs-progs: btrfs backend support'
'lxc: lxc backend support')
# don't strip binaries! A sha1 is used to check binary consistency.
options=('!strip')
install=$pkgname.install
source=(
"git+https://github.com/docker/docker.git#tag=v$pkgver"
"https://github.com/docker/docker/pull/7716.diff")
md5sums=(
'SKIP'
'58d83579fc88628e10041ef97195ea1b')
build() {
cd docker
patch -p1 <$srcdir/7716.diff
export AUTO_GOPATH=1
./hack/make.sh dynbinary
}
#check() {
# cd "$_magic/docker"
# # Will be added upstream soon
# ./hack/make.sh dyntest
#}
package() {
cd docker
install -Dm755 "bundles/$pkgver/dynbinary/docker-$pkgver" "$pkgdir/usr/bin/docker"
install -Dm755 "bundles/$pkgver/dynbinary/dockerinit-$pkgver" "$pkgdir/usr/lib/docker/dockerinit"
# 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"
install -Dm644 'contrib/init/systemd/docker.socket' \
"$pkgdir/usr/lib/systemd/system/docker.socket"
# vim syntax
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"
}
# vim:set ts=2 sw=2 et:
@djmaze
Copy link
Author

djmaze commented Sep 22, 2014

Includes this patch so you can use tags for building packages again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment