coreos/coreos-cloudinit: Update for arm64

Convert to coreos-go eclass and add arm64 keywords.

Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
Geoff Levand 2015-05-20 10:45:41 -07:00
parent 1d9b0523c7
commit 71f9fe1779

View File

@ -1,20 +1,20 @@
# 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/coreos-cloudinit"
CROS_WORKON_LOCALNAME="coreos-cloudinit"
CROS_WORKON_REPO="git://github.com"
COREOS_GO_PACKAGE="github.com/coreos/coreos-cloudinit"
inherit coreos-doc cros-workon systemd toolchain-funcs udev coreos-go
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64"
KEYWORDS="~amd64 ~arm64"
else
CROS_WORKON_COMMIT="ca6f97d050bb51ae37aa1d91996e7fb6a66687c4" # tag v1.4.1
KEYWORDS="amd64"
KEYWORDS="amd64 arm64"
fi
inherit coreos-doc cros-workon systemd toolchain-funcs udev
DESCRIPTION="coreos-cloudinit"
HOMEPAGE="https://github.com/coreos/coreos-cloudinit"
SRC_URI=""
@ -23,27 +23,23 @@ LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND=">=dev-lang/go-1.2
!<coreos-base/coreos-init-0.0.1-r69"
DEPEND="!<coreos-base/coreos-init-0.0.1-r69"
RDEPEND="
>=sys-apps/shadow-4.1.5.1
"
src_compile() {
# setup CFLAGS and LDFLAGS for separate build target
export CGO_CFLAGS="-I${ROOT}/usr/include"
export CGO_LDFLAGS="-L${ROOT}/usr/lib"
src_prepare() {
coreos-go_src_prepare
GOPATH+=":${S}/third_party"
if gcc-specs-pie; then
CGO_LDFLAGS+=" -fno-PIC"
fi
./build || die
}
src_install() {
dobin ${S}/bin/coreos-cloudinit
dobin ${GOBIN}/coreos-cloudinit
udev_dorules units/*.rules
systemd_dounit units/*.mount
systemd_dounit units/*.path