summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa417baf3f83508762d5076be0dc73fe37efd3bd (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
#Maintainer: Iwan Timmer <irtimmer@gmail.com>

pkgname=runc-git
pkgver=v0.0.5.r431.g6c88a52
pkgrel=1
pkgdesc="Container CLI tools"
depends=('glibc')
makedepends=('godep' 'go')
arch=('x86_64' 'i686')
source=("git+https://github.com/opencontainers/runc.git")
url="http://runc.io/"
license=("APACHE")
sha256sums=('SKIP')

prepare() {
    cd $srcdir/runc
    mkdir -p Godeps/_workspace/src/github.com/opencontainers
    ln -sfT ../../../../../ Godeps/_workspace/src/github.com/opencontainers/runc
}

build() {
    cd $srcdir/runc
    godep go build -o runc .
}

package() {
    cd $srcdir/runc
    install -Dm755 runc $pkgdir/usr/bin/runc
}

pkgver() {
    cd $srcdir/runc
    ( set -o pipefail
        git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}