archrelease: copy trunk to community-any
[ArchLinux/community.git] / runc / trunk / PKGBUILD
blobd392f5283b2af2d870443c53384ce58ca246d4ce
1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
2 # Maintainer: Frederik Schwan <freswa at archlinux dot org>
3 # Contributor: Sébastien "Seblu" Luttringer
5 pkgname=runc
6 pkgver=1.1.7
7 pkgrel=1
8 pkgdesc='CLI tool for managing OCI compliant containers'
9 arch=(x86_64)
10 url='https://runc.io/'
11 license=(Apache)
12 provides=('oci-runtime')
13 depends=(libseccomp)
14 makedepends=(git go go-md2man)
15 optdepends=(
16   'criu: checkpoint support'
18 source=("${pkgname}-${pkgver}.tar.xz::https://github.com/opencontainers/runc/releases/download/v${pkgver}/runc.tar.xz"
19         "${pkgname}-${pkgver}.tar.xz.sig::https://github.com/opencontainers/runc/releases/download/v${pkgver}/runc.tar.xz.asc")
20 validpgpkeys=("5F36C6C61B5460124A75F5A69E18AA267DDB8DB4"
21                           "C9C370B246B09F6DBCFC744C34401015D1D2D386")
22 sha256sums=('86444cc07461b81bbcb8d15c5fc2cad20afc64a70be0fc623073538aa91bafdd'
23             'SKIP')
25 prepare() {
26   mkdir -p src/github.com/opencontainers
27   cp -r runc-${pkgver} src/github.com/opencontainers/runc
30 build() {
31   cd src/github.com/opencontainers/runc
32   export GOPATH="$srcdir"
33   export BUILDTAGS='seccomp apparmor'
34   export CGO_CPPFLAGS="${CPPFLAGS}"
35   export CGO_CFLAGS="${CFLAGS}"
36   export CGO_CXXFLAGS="${CXXFLAGS}"
37   export CGO_LDFLAGS="${LDFLAGS}"
38   export GOFLAGS="-trimpath -mod=readonly -modcacherw"
39   make runc man
42 package() {
43   cd src/github.com/opencontainers/runc
45   install -Dm755 runc "$pkgdir/usr/bin/runc"
46   install -Dm644 contrib/completions/bash/runc \
47     "$pkgdir/usr/share/bash-completion/completions/runc"
49   install -d "$pkgdir/usr/share/man/man8"
50   install -m644 man/man8/*.8 "$pkgdir/usr/share/man/man8"