Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | DESCRIPTION = "The Go language implementation of gRPC. HTTP/2 based RPC" |
| 2 | HOMEPAGE = "https://github.com/grpc/grpc-go" |
| 3 | SECTION = "devel/go" |
| 4 | LICENSE = "BSD" |
| 5 | LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=a4bad33881612090c6035d8393175996" |
| 6 | |
| 7 | SRCNAME = "grpc-go" |
| 8 | |
| 9 | PKG_NAME = "google.golang.org/grpc" |
| 10 | SRC_URI = "git://github.com/grpc/${SRCNAME}.git;destsuffix=git/src/${PKG_NAME}" |
| 11 | |
| 12 | SRCREV = "777daa17ff9b5daef1cfdf915088a2ada3332bf0" |
| 13 | PV = "1.4.0+git${SRCPV}" |
| 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | # NO-OP the do compile rule because this recipe is source only. |
| 18 | do_compile() { |
| 19 | } |
| 20 | |
| 21 | do_install() { |
| 22 | install -d ${D}${prefix}/local/go/src/${PKG_NAME} |
| 23 | for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do |
| 24 | if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then |
| 25 | mkdir -p ${D}${prefix}/local/go/$(dirname $j) |
| 26 | fi |
| 27 | cp $j ${D}${prefix}/local/go/$j |
| 28 | done |
| 29 | cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/ |
| 30 | } |
| 31 | |
| 32 | SYSROOT_PREPROCESS_FUNCS += "go_grpc_sysroot_preprocess" |
| 33 | |
| 34 | go_grpc_sysroot_preprocess () { |
| 35 | install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} |
| 36 | cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) |
| 37 | } |
| 38 | |
| 39 | FILES_${PN} += " \ |
| 40 | ${prefix}/local/go/src/${PKG_NAME}/* \ |
| 41 | " |