2019-07-14 11:52:45 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.opencontainers.org/
|
|
|
|
TERMUX_PKG_DESCRIPTION="A tool for spawning and running containers according to the OCI specification"
|
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
2022-01-31 19:41:15 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-09-07 19:33:22 +02:00
|
|
|
TERMUX_PKG_VERSION=1.0.0-rc92
|
2019-07-14 11:52:45 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/opencontainers/runc/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
2020-09-07 19:33:22 +02:00
|
|
|
TERMUX_PKG_SHA256=28378df983a3c586ed3ec8c76a774a9b10f36a0c323590a284b801cce95cc61f
|
2019-07-14 11:52:45 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libseccomp"
|
|
|
|
|
|
|
|
termux_step_make() {
|
2019-12-07 10:45:46 +01:00
|
|
|
termux_setup_golang
|
2019-07-14 11:52:45 +02:00
|
|
|
|
2019-12-07 10:45:46 +01:00
|
|
|
export GOPATH="${PWD}/go"
|
2019-07-14 11:52:45 +02:00
|
|
|
|
2019-12-07 10:45:46 +01:00
|
|
|
mkdir -p "${GOPATH}/src/github.com/opencontainers"
|
|
|
|
ln -sf "${TERMUX_PKG_SRCDIR}" "${GOPATH}/src/github.com/opencontainers/runc"
|
2019-07-14 11:52:45 +02:00
|
|
|
|
2019-12-07 10:45:46 +01:00
|
|
|
cd "${GOPATH}/src/github.com/opencontainers/runc" && make
|
2019-07-14 11:52:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
2019-12-07 10:45:46 +01:00
|
|
|
cd "${GOPATH}/src/github.com/opencontainers/runc"
|
|
|
|
install -Dm755 runc "${TERMUX_PREFIX}/bin/runc"
|
2019-07-14 11:52:45 +02:00
|
|
|
}
|
2019-07-14 14:34:08 +02:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
|
|
|
{
|
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh"
|
|
|
|
echo "echo"
|
|
|
|
echo 'echo "RunC requires support for devices cgroup support in kernel."'
|
|
|
|
echo "echo"
|
|
|
|
echo 'echo "If CONFIG_CGROUP_DEVICE was enabled during compile time,"'
|
|
|
|
echo 'echo "you need to run the following commands (as root) in order"'
|
|
|
|
echo 'echo "to use the RunC:"'
|
|
|
|
echo "echo"
|
|
|
|
echo 'echo " mount -t tmpfs -o mode=755 tmpfs /sys/fs/cgroup"'
|
|
|
|
echo 'echo " mkdir -p /sys/fs/cgroup/devices"'
|
|
|
|
echo 'echo " mount -t cgroup -o devices cgroup /sys/fs/cgroup/devices"'
|
|
|
|
echo "echo"
|
|
|
|
echo 'echo "If you got error when running commands listed above, this"'
|
|
|
|
echo 'echo "usually means that your kernel lacks CONFIG_CGROUP_DEVICE."'
|
|
|
|
echo "echo"
|
|
|
|
echo "exit 0"
|
|
|
|
} > postinst
|
|
|
|
}
|