1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-25 09:36:18 +00:00
Lakka-LibreELEC/packages/addons/addon-depends/runc/package.mk
2023-05-17 14:28:03 +00:00

36 lines
1.3 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.7"
PKG_SHA256="f1885d6dfa188f8112328ac2355e5d67346174a2e2e795ec514a972bcbfcc2fa"
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 libseccomp"
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}"
export PKG_CONFIG_PATH="$(get_install_dir libseccomp)/usr/lib/pkgconfig:${PKG_CONFIG_PATH}"
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 seccomp static_build" -ldflags "${LDFLAGS}" ./
}