# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: hexchian <i at hexchain dot org>

pkgname=crun
pkgver=1.1
pkgrel=1
pkgdesc="A fast and lightweight fully featured OCI runtime and C library for running containers"
url="https://github.com/containers/crun"
license=('LGPL')
arch=('x86_64')
depends=('yajl' 'systemd-libs' 'libcap' 'libseccomp')
makedepends=('libtool' 'python' 'go-md2man' 'systemd' 'git')
optdepends=(
    'criu: checkpoint support'
)
source=("https://github.com/containers/crun/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc})
validpgpkeys=('AC404C1C0BF735C63FF4D562263D6DF2E163E1EA')
sha256sums=('ba282aadaf7987976c376d322f770354e210770bd8a53a670ee45f61d03f054e'
            'SKIP')

build() {
    cd "$pkgname-$pkgver"
    ./autogen.sh
    ./configure \
        --prefix=/usr \
        --enable-dynamic \
        --with-python-bindings
    make
}

package() {
    cd "$pkgname-$pkgver"
    make DESTDIR="$pkgdir" install
}
