blob: 905a751b8741fa956cd0c80771612e32bbf949ee [file] [log] [blame]
Patrick Williamse69d2352017-02-23 20:56:04 -06001HOMEPAGE = "https://github.com/opencontainers/runc"
2SUMMARY = "runc container cli tools"
3DESCRIPTION = "runc is a CLI tool for spawning and running containers according to the OCI specification."
4
5# Note: this rev is before the required protocol field, update when all components
6# have been updated to match.
7SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
8SRC_URI = "\
9 git://github.com/opencontainers/runc;branch=master \
10 "
11
12# Apache-2.0 for containerd
13LICENSE = "Apache-2.0"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
15
16S = "${WORKDIR}/git"
17
18RUNC_VERSION = "1.0.0-rc1"
19PV = "${RUNC_VERSION}+git${SRCREV}"
20
21DEPENDS = "go-cross \
22 "
23RRECOMMENDS_${PN} = "lxc docker"
24
25LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
26
27do_configure[noexec] = "1"
28EXTRA_OEMAKE="BUILDTAGS=''"
29
30inherit go-osarchmap
31
32do_compile() {
33 export GOARCH="${TARGET_GOARCH}"
34
35 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
36 # docker to download its dependencies but rather
37 # use dependencies packaged independently.
38 cd ${S}
39 rm -rf .gopath
40 dname=`dirname "${LIBCONTAINER_PACKAGE}"`
41 bname=`basename "${LIBCONTAINER_PACKAGE}"`
42 mkdir -p .gopath/src/${dname}
43
44 (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
45 export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
46 cd -
47
48 # Pass the needed cflags/ldflags so that cgo
49 # can find the needed headers files and libraries
50 export CGO_ENABLED="1"
51 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
52 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
53 export CFLAGS=""
54 export LDFLAGS=""
55
56 oe_runmake static
57}
58
59do_install() {
60 mkdir -p ${D}/${bindir}
61
62 cp ${S}/runc ${D}/${bindir}/runc
63 ln -sf runc ${D}/${bindir}/docker-runc
64}
65
66INHIBIT_PACKAGE_STRIP = "1"