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

pkgname=crun
pkgver=1.25.1
pkgrel=2
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' 'libkrun')
makedepends=('libtool' 'python' 'go-md2man' 'systemd' 'git')
source=("git+https://github.com/containers/crun.git#tag=$pkgver?signed")
validpgpkeys=('AC404C1C0BF735C63FF4D562263D6DF2E163E1EA')
sha256sums=('67cc3ea1c28bcbd978fd0d81c6727598d4ad644fe9bf22f85e502f2c42b135c5')

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

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