1
0
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
Lakka-rk322x/packages/addons/addon-depends/runc/package.mk
2022-06-14 15:44:32 +00:00

35 lines
1.2 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="runc"
PKG_VERSION="1.1.3"
PKG_SHA256="fc1c70e095d662e38a5889bc6de41857762ce022caaf8be2852663198c533a63"
PKG_LICENSE="APL"
PKG_SITE="https://github.com/opencontainers/runc"
PKG_URL="https://github.com/opencontainers/runc/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain go:host"
PKG_LONGDESC="A CLI tool for spawning and running containers according to the OCI specification."
PKG_TOOLCHAIN="manual"
# Git commit of the matching release https://github.com/opencontainers/runc/releases
PKG_GIT_COMMIT="6724737f999df9ee0d8ca5c6d7b81f97adc34374"
pre_make_target() {
go_configure
export LDFLAGS="-w -extldflags -static -X main.gitCommit=${PKG_GIT_COMMIT} -X main.version=$(cat ./VERSION) -extld ${CC}"
mkdir -p ${GOPATH}
if [ -d ${PKG_BUILD}/vendor ]; then
mv ${PKG_BUILD}/vendor ${GOPATH}/src
fi
ln -fs ${PKG_BUILD} ${GOPATH}/src/github.com/opencontainers/runc
}
make_target() {
mkdir -p bin
${GOLANG} build -v -o bin/runc -a -tags "cgo static_build" -ldflags "${LDFLAGS}" ./
}