blob: 5d071b0a25d220f90b8738d2b270b0ca91c604b8 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001DESCRIPTION = "Utility package to work with network connections"
2HOMEPAGE = "https://github.com/docker/connections"
3SECTION = "devel/go"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=04424bc6f5a5be60691b9824d65c2ad8"
6
7SRCNAME = "go-connections"
8
9PKG_NAME = "github.com/docker/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "4ccf312bf1d35e5dbda654e57a9be4c3f3cd0366"
13PV = "0.2.1+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_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
32SYSROOT_PREPROCESS_FUNCS += "go_connections_sysroot_preprocess"
33
34go_connections_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
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"