crun

A fast and lightweight fully featured OCI runtime and C library for running containers

runtime dependencies libseccomp (Libraries/Other)
libcap (Libraries/Other)
yajl (Libraries/JSON/XML)
systemd (System tools)
criu
make dependencies git (Development tools)
libtool (Development tools)
python (Interpreter languages and scripting)
systemd (System tools)
go-md2man
libyajl-dev
libseccomp-dev
python3-dev
libpython3-dev
mkdir /data/buildroot/package/crun
cat > /data/buildroot/package/crun/Config.in<< 'EOF'
config BR2_PACKAGE_CRUN
        bool "crun"
        depends on BR2_PACKAGE_YAJL
        depends on BR2_PACKAGE_SYSTEMD
        depends on BR2_PACKAGE_LIBCAP
        depends on BR2_PACKAGE_LIBSECCOMP
        depends on BR2_PACKAGE_CRIU
        help
          A fast and lightweight fully featured OCI runtime and C library for running containers
EOF

cat > /data/buildroot/package/crun/crun.mk<< 'EOF'
#############################################################
#
# crun
#
#############################################################
CRUN_VERSION = 1.4.3
CRUN_SOURCE = crun-$(CRUN_VERSION).tar.gz
CRUN_SITE = https://github.com/containers/crun/releases/download/$(CRUN_VERSION)

CRUN_DEPENDENCIES = yajl systemd libcap libseccomp criu
CRUN_INSTALL_STAGING = YES

define CRUN_BUILD_CMDS
  cd $(@D)/ && \
  ./autogen.sh && \
  ./configure                     \
        --prefix=/usr             \
        --enable-shared           \
        --enable-dynamic          \
        --with-python-bindings && \
  make
endef

define CRUN_INSTALL_STAGING_CMDS
  cd $(@D)/ && \
  make DESTDIR="${STAGINGS_DIR}" install
endef

define CRUN_INSTALL_TARGET_CMDS
  cd $(@D)/ && \
  make DESTDIR="${TARGET_DIR}" install
endef

$(eval $(generic-package))
EOF

sed -i '/menu "Custom packages"/a source "package/crun/Config.in' /data/buildroot/package/Config.in