mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
59 lines
1.6 KiB
Makefile
59 lines
1.6 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="v1.0.0-rc8"
|
|
PKG_SHA256="efe4ff9bbe49b19074346d65c914d809c0a3e90d062ea9619fe240f931f0b700"
|
|
PKG_LICENSE="APL"
|
|
PKG_SITE="https://github.com/opencontainers/runc"
|
|
PKG_URL="https://github.com/opencontainers/runc/archive/${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"
|
|
|
|
pre_make_target() {
|
|
case $TARGET_ARCH in
|
|
x86_64)
|
|
export GOARCH=amd64
|
|
;;
|
|
arm)
|
|
export GOARCH=arm
|
|
|
|
case $TARGET_CPU in
|
|
arm1176jzf-s)
|
|
export GOARM=6
|
|
;;
|
|
*)
|
|
export GOARM=7
|
|
;;
|
|
esac
|
|
;;
|
|
aarch64)
|
|
export GOARCH=arm64
|
|
;;
|
|
esac
|
|
|
|
export GOOS=linux
|
|
export CGO_ENABLED=1
|
|
export CGO_NO_EMULATION=1
|
|
export CGO_CFLAGS=$CFLAGS
|
|
export LDFLAGS="-w -extldflags -static -X main.gitCommit=${PKG_VERSION} -X main.version=$(cat ./VERSION) -extld $CC"
|
|
export GOLANG=$TOOLCHAIN/lib/golang/bin/go
|
|
export GOPATH=$PKG_BUILD/.gopath
|
|
export GOROOT=$TOOLCHAIN/lib/golang
|
|
export PATH=$PATH:$GOROOT/bin
|
|
|
|
mkdir -p $PKG_BUILD/.gopath
|
|
if [ -d $PKG_BUILD/vendor ]; then
|
|
mv $PKG_BUILD/vendor $PKG_BUILD/.gopath/src
|
|
fi
|
|
|
|
ln -fs $PKG_BUILD $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" ./
|
|
}
|