summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6ebab1d5db648378ba8c50c37fdd93c4ca35967f (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
# $Id$
# Maintainer: Chris Fordham aka flaccid

pkgname=containerd-git
_pkgname=containerd
pkgver=v1.1.0.rc.2.r0.gf630d5f0
pkgrel=1
pkgdesc='An open and reliable container runtime.'
url='https://containerd.io/'
conflicts=('containerd')
optdepends=('runc-git')
makedepends=('go' 'git' 'btrfs-progs')
replaces=('containerd')
arch=('i686' 'x86_64')
source=("containerd::git+https://github.com/containerd/containerd.git")
license=("Apache License 2.0")
md5sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  mkdir -p "$srcdir/go/src/github.com/containerd"
  ln -sv "$srcdir/containerd" "$srcdir/go/src/github.com/containerd/containerd"
  export GOPATH="$srcdir/go"
}

build() {
  pushd "$GOPATH/src/github.com/containerd/containerd"
    go get ./...
    make
  popd
}

package() {
  pushd "$GOPATH/src/github.com/containerd/containerd/bin"
    for f in $(find . -type f -print); do
      install -Dm755 "$f" "$pkgdir/usr/bin/$f"
    done
  popd
}

# vim:set ts=2 sw=2 et: