diff options
Diffstat (limited to 'recipes-devtools/go-cross/go-native.inc')
-rw-r--r-- | recipes-devtools/go-cross/go-native.inc | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/recipes-devtools/go-cross/go-native.inc b/recipes-devtools/go-cross/go-native.inc deleted file mode 100644 index cb2dd2a7..00000000 --- a/recipes-devtools/go-cross/go-native.inc +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | inherit native | ||
2 | |||
3 | export GOOS = "${BUILD_GOOS}" | ||
4 | export GOARCH = "${BUILD_GOARCH}" | ||
5 | export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go" | ||
6 | export CGO_ENABLED = "1" | ||
7 | |||
8 | do_configure[noexec] = "1" | ||
9 | |||
10 | do_compile() { | ||
11 | export GOBIN="${B}/bin" | ||
12 | rm -rf ${GOBIN} | ||
13 | mkdir ${GOBIN} | ||
14 | |||
15 | export TMPDIR=${WORKDIR}/build-tmp | ||
16 | mkdir -p ${WORKDIR}/build-tmp | ||
17 | |||
18 | cd src | ||
19 | CGO_ENABLED=0 ./make.bash --host-only | ||
20 | } | ||
21 | |||
22 | |||
23 | make_wrapper() { | ||
24 | rm -f ${D}${bindir}/$2 | ||
25 | cat <<END >${D}${bindir}/$2 | ||
26 | #!/bin/bash | ||
27 | here=\`dirname \$0\` | ||
28 | export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" | ||
29 | \$here/../lib/go/bin/$1 "\$@" | ||
30 | END | ||
31 | chmod +x ${D}${bindir}/$2 | ||
32 | } | ||
33 | |||
34 | do_install() { | ||
35 | install -d ${D}${libdir}/go | ||
36 | cp -a ${B}/pkg ${D}${libdir}/go/ | ||
37 | install -d ${D}${libdir}/go/src | ||
38 | (cd ${S}/src; for d in *; do \ | ||
39 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ | ||
40 | done) | ||
41 | install -d ${D}${bindir} ${D}${libdir}/go/bin | ||
42 | for f in ${B}/bin/* | ||
43 | do | ||
44 | base=`basename $f` | ||
45 | install -m755 $f ${D}${libdir}/go/bin | ||
46 | make_wrapper $base $base | ||
47 | done | ||
48 | } | ||
49 | |||
50 | do_package[noexec] = "1" | ||
51 | do_packagedata[noexec] = "1" | ||
52 | do_package_write_ipk[noexec] = "1" | ||
53 | do_package_write_deb[noexec] = "1" | ||
54 | do_package_write_rpm[noexec] = "1" | ||