diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-0.1.0.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-0.1.0-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-0.1.0.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-0.1.0-r1.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-9999.ebuild index 94e9ae1add..c41bf27495 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/sdnotify-proxy/sdnotify-proxy-9999.ebuild @@ -1,21 +1,21 @@ # Copyright (c) 2014 CoreOS, Inc.. All rights reserved. # Distributed under the terms of the GNU General Public License v2 -EAPI=4 +EAPI=5 CROS_WORKON_PROJECT="coreos/sdnotify-proxy" CROS_WORKON_LOCALNAME="sdnotify-proxy" CROS_WORKON_REPO="git://github.com" +COREOS_GO_PACKAGE="github.com/coreos/sdnotify-proxy" +inherit coreos-go cros-workon if [[ "${PV}" == 9999 ]]; then - KEYWORDS="~amd64" + KEYWORDS="~amd64 ~arm64" else CROS_WORKON_COMMIT="f516129af110fd4a51bd5ea2654f4dc8dd02e5c4" - KEYWORDS="amd64" + KEYWORDS="amd64 arm64" fi -inherit cros-workon - -DESCRIPTION="fleet" +DESCRIPTION="sdnotify-proxy" HOMEPAGE="https://github.com/coreos/sdnotify-proxy" SRC_URI="" @@ -26,10 +26,10 @@ IUSE="" DEPEND=">=dev-lang/go-1.3" src_compile() { - ./build + go_build "${COREOS_GO_PACKAGE}" } src_install() { exeinto /usr/libexec - doexe ${S}/bin/sdnotify-proxy + doexe ${GOBIN}/sdnotify-proxy } diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass index 5280b424df..4130c130b2 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go.eclass @@ -9,41 +9,48 @@ # @DESCRIPTION: # Name of the Go package unpacked to ${S}, this is required. -[[ ${EAPI} != "5" ]] && die "Only EAPI=5 is supported" +[[ ${EAPI} != "5" ]] && die "${ECLASS}: Only EAPI=5 is supported" inherit flag-o-matic multiprocessing toolchain-funcs DEPEND="dev-lang/go" +# @FUNCTION: go_get_arch +# @USAGE: export GOARCH=$(go_get_arch) +go_get_arch() { + echo ${ARCH} +} + # @FUNCTION: go_build # @USAGE: [] go_build() { debug-print-function ${FUNCNAME} "$@" - [[ $# -eq 0 || $# -gt 2 ]] && die "go_install: incorrect # of arguments" + [[ $# -eq 0 || $# -gt 2 ]] && die "${ECLASS}: go_install: incorrect # of arguments" local package_name="$1" local binary_name="${package_name##*/}" go build -x -p "$(makeopts_jobs)" \ -ldflags "-extldflags '${LDFLAGS}'" \ -o "${GOPATH}/bin/${binary_name}" "${package_name}" \ - || die "go build failed" + || die "${ECLASS}: go build failed" } coreos-go_src_prepare() { debug-print-function ${FUNCNAME} "$@" + export GOARCH=$(go_get_arch) export GOPATH="${WORKDIR}/gopath" export GOBIN="${GOPATH}/bin" - mkdir -p "${GOBIN}" || die + mkdir -p "${GOBIN}" || die "${ECLASS}: bad path: ${GOBIN}" if [[ -z "${COREOS_GO_PACKAGE}" ]]; then - die "COREOS_GO_PACKAGE must be defined by the ebuild" + die "${ECLASS}: COREOS_GO_PACKAGE must be defined by the ebuild" fi local package_path="${GOPATH}/src/${COREOS_GO_PACKAGE}" - mkdir -p "${package_path%/*}" || die - ln -sT "${S}" "${package_path}" || die + mkdir -p "${package_path%/*}" || die "${ECLASS}: bad path: ${package_path%/*}" + ln -sT "${S}" "${package_path}" || die "${ECLASS}: bad path: ${S}" # Go's 6l linker does not support PIE, disable so cgo binaries # which use 6l+gcc for linking can be built correctly.