blob: ae6c5ec96a721a5dfa958fddde9356af4b9cfb1c [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001HOMEPAGE = "https://github.com/jfrazelle/riddler"
2SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
5
6SRC_URI = "git://github.com/jfrazelle/riddler;branch=master"
7SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
8PV = "0.1.0+git${SRCPV}"
9
10S = "${WORKDIR}/git"
11
12inherit goarch
13inherit go
14
15# This disables seccomp and apparmor, which are on by default in the
16# go package.
17EXTRA_OEMAKE="BUILDTAGS=''"
18
19do_compile() {
20 export GOARCH="${TARGET_GOARCH}"
21 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
22 # Setup vendor directory so that it can be used in GOPATH.
23 #
24 # Go looks in a src directory under any directory in GOPATH but riddler
25 # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
26 #
27 # We also need to link in the ipallocator directory as that is not under
28 # a src directory.
29 ln -sfn . "${S}/vendor/src"
30 mkdir -p "${S}/vendor/src/github.com/jessfraz/riddler"
31 ln -sfn "${S}/parse" "${S}/vendor/src/github.com/jessfraz/riddler/parse"
32 export GOPATH="${S}/vendor"
33
34 # Pass the needed cflags/ldflags so that cgo
35 # can find the needed headers files and libraries
36 export CGO_ENABLED="1"
37 export CFLAGS=""
38 export LDFLAGS=""
39 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
40 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
41
42 oe_runmake static
43}
44
45do_install() {
46 install -d ${D}/${sbindir}
47 install ${S}/riddler ${D}/${sbindir}/riddler
48}