diff options
| -rw-r--r-- | recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch | 8 | ||||
| -rw-r--r-- | recipes-containers/riddler/riddler_git.bb | 24 |
2 files changed, 11 insertions, 21 deletions
diff --git a/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch b/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch index 0c4f3fd2..9432c63c 100644 --- a/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch +++ b/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch | |||
| @@ -5,13 +5,13 @@ Subject: [PATCH] build: use to select cross compiler | |||
| 5 | 5 | ||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> |
| 7 | --- | 7 | --- |
| 8 | git/src/import/Makefile | 10 +++++----- | 8 | git/Makefile | 10 +++++----- |
| 9 | 1 file changed, 5 insertions(+), 5 deletions(-) | 9 | 1 file changed, 5 insertions(+), 5 deletions(-) |
| 10 | 10 | ||
| 11 | diff --git git/src/import/Makefile git/src/import/Makefile | 11 | diff --git git/Makefile git/Makefile |
| 12 | index c6976af..f3c8d17 100644 | 12 | index c6976af..f3c8d17 100644 |
| 13 | --- git/src/import/Makefile | 13 | --- git/Makefile |
| 14 | +++ git/src/import/Makefile | 14 | +++ git/Makefile |
| 15 | @@ -10,11 +10,11 @@ all: clean build static fmt lint test vet | 15 | @@ -10,11 +10,11 @@ all: clean build static fmt lint test vet |
| 16 | 16 | ||
| 17 | build: | 17 | build: |
diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb index 191becfe..f172f5bd 100644 --- a/recipes-containers/riddler/riddler_git.bb +++ b/recipes-containers/riddler/riddler_git.bb | |||
| @@ -1,17 +1,17 @@ | |||
| 1 | HOMEPAGE = "https://github.com/jfrazelle/riddler" | 1 | HOMEPAGE = "https://github.com/jfrazelle/riddler" |
| 2 | SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec." | 2 | SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec." |
| 3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
| 4 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" |
| 5 | 5 | ||
| 6 | SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https \ | 6 | SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https;destsuffix=git/src/github.com/jessfraz/riddler \ |
| 7 | file://0001-build-use-to-select-cross-compiler.patch \ | 7 | file://0001-build-use-to-select-cross-compiler.patch \ |
| 8 | " | 8 | " |
| 9 | 9 | ||
| 10 | SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6" | 10 | SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6" |
| 11 | PV = "0.1.0+git${SRCPV}" | 11 | PV = "0.1.0+git${SRCPV}" |
| 12 | GO_IMPORT = "import" | ||
| 13 | 12 | ||
| 14 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git/src/github.com/jessfraz/riddler" |
| 14 | GO_IMPORT = "github.com/jessfraz/riddler" | ||
| 15 | 15 | ||
| 16 | inherit goarch | 16 | inherit goarch |
| 17 | inherit go | 17 | inherit go |
| @@ -27,17 +27,7 @@ EXTRA_OEMAKE="BUILDTAGS=''" | |||
| 27 | do_compile() { | 27 | do_compile() { |
| 28 | export GOARCH="${TARGET_GOARCH}" | 28 | export GOARCH="${TARGET_GOARCH}" |
| 29 | export GOROOT="${STAGING_LIBDIR}/go" | 29 | export GOROOT="${STAGING_LIBDIR}/go" |
| 30 | # Setup vendor directory so that it can be used in GOPATH. | 30 | export GOPATH="${S}/src/import/vendor:${WORKDIR}/git/" |
| 31 | # | ||
| 32 | # Go looks in a src directory under any directory in GOPATH but riddler | ||
| 33 | # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink. | ||
| 34 | # | ||
| 35 | # We also need to link in the ipallocator directory as that is not under | ||
| 36 | # a src directory. | ||
| 37 | ln -sfn . "${S}/src/import/vendor/src" | ||
| 38 | mkdir -p "${S}/src/import/vendor/src/github.com/jessfraz/riddler" | ||
| 39 | ln -sfn "${S}/src/import/parse" "${S}/src/import/vendor/src/github.com/jessfraz/riddler/parse" | ||
| 40 | export GOPATH="${S}/src/import/vendor" | ||
| 41 | 31 | ||
| 42 | # Pass the needed cflags/ldflags so that cgo | 32 | # Pass the needed cflags/ldflags so that cgo |
| 43 | # can find the needed headers files and libraries | 33 | # can find the needed headers files and libraries |
| @@ -49,12 +39,12 @@ do_compile() { | |||
| 49 | export GO111MODULE=off | 39 | export GO111MODULE=off |
| 50 | export GOBUILDFLAGS="-trimpath" | 40 | export GOBUILDFLAGS="-trimpath" |
| 51 | 41 | ||
| 52 | cd ${S}/src/import | 42 | cd ${S} |
| 53 | 43 | ||
| 54 | oe_runmake static | 44 | oe_runmake static |
| 55 | } | 45 | } |
| 56 | 46 | ||
| 57 | do_install() { | 47 | do_install() { |
| 58 | install -d ${D}/${sbindir} | 48 | install -d ${D}/${sbindir} |
| 59 | install ${S}/src/import/riddler ${D}/${sbindir}/riddler | 49 | install ${S}/riddler ${D}/${sbindir}/riddler |
| 60 | } | 50 | } |
