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

pkgname=crun
pkgver=1.25
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-2.1-or-later')
arch=('x86_64' 'aarch64')
provides=('oci-runtime')
depends=('yajl' 'systemd-libs' 'libcap' 'libseccomp' 'criu')
makedepends=('libtool' 'python' 'go-md2man' 'systemd' 'git')
source=("git+https://github.com/containers/crun.git#tag=$pkgver?signed")
validpgpkeys=('AC404C1C0BF735C63FF4D562263D6DF2E163E1EA')
sha256sums=('bfa43678d3de3f38d00b0011d819e45b8f6ad25fdaf175eae39380cb35703ded')

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

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