2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 SUMMARY = "Forward stdin to journald"
17 HOMEPAGE = "https://github.com/docker/docker"
19 LICENSE = "Apache-2.0"
20 LIC_FILES_CHKSUM = "file://src/forward-journald/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
23 SRCNAME = "forward-journald"
24 SRCREV = "77e02a9774a6ca054e41c27f6f319d701f1cbaea"
25 PV = "1.10.3+git${SRCPV}"
28 SRC_URI = "git://github.com/projectatomic/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};"
30 GO_IMPORT = "forward-journald"
35 ln -sfn ${S}/src/forward-journald ./_build/src/${SRCNAME}
36 export GOARCH=${TARGET_GOARCH}
37 export CGO_ENABLED="1"
38 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
39 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
41 export GOPATH="${WORKDIR}/build/_build:${STAGING_DIR_TARGET}/${prefix}/local/go"
42 cd _build/src/${SRCNAME}
43 export GOROOT=${STAGING_DIR_TARGET}/${prefix}/local/go
44 go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o ${WORKDIR}/build/bin/forward-journald forward-journald
48 install -m 0755 -d ${D}/${bindir}/
50 install -m 0755 bin/forward-journald ${D}/${bindir}/
53 INSANE_SKIP_${PN} = "ldflags"