commit 21617afba8251bdac69c6c4036d891e94472d58c Author: EnumDev Date: Fri Sep 4 18:07:30 2026 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d96df7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore BPM archives and signatures +*.bpm +*.bpm.sig diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..f1d8e1f --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="checkpoint-restore/criu" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/tags | jq -r '.[0].name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/info.yml b/info.yml new file mode 100644 index 0000000..d3aa59f --- /dev/null +++ b/info.yml @@ -0,0 +1,37 @@ +name: criu +description: Utilities to checkpoint and restore processes in userspace +version: 4.2.1 +revision: 1 +url: https://criu.org +license: GPL-2.0-only,LGPL-2.1-only +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - gcc-libs + - glibc + - gnutls + - libbpf + - libbsd + - libdrm + - libnet + - libnl + - nftables + - protobuf-c + - python3=3.14.* + - python-protobuf + - util-linux +make_depends: + - asciidoc + - python-build + - python-installer + - python-pip + - python-setuptools + - python-wheel + - xmlto +downloads: + - url: https://github.com/checkpoint-restore/criu/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: feffdf4638125ebb12d2434754f80a1d7bbba85a3e6bee98c216f88fb99a5d96 diff --git a/recipe.sh b/recipe.sh new file mode 100644 index 0000000..09b69b8 --- /dev/null +++ b/recipe.sh @@ -0,0 +1,40 @@ +# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + make criu crit amdgpu_plugin docs + + # Build python bindings + #python -m build --wheel --no-isolation crit + #python -m build --wheel --no-isolation --skip-dependency-check lib +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + make unittest +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" \ + PREFIX=/usr \ + SBINDIR=/usr/sbin \ + LIBDIR=/usr/lib \ + LIBEXECDIR=/usr/libexec \ + install + + # Install python bindings + #python -m installer --destdir="$BPM_OUTPUT" crit/dist/*.whl + #python -m installer --destdir="$BPM_OUTPUT" lib/dist/*.whl + + # Remove empty directory + rm -r "$BPM_OUTPUT"/usr/include/compel/common/asm + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/criu/COPYING +}