coreos-base/coreos-metadata: add initial ebuild

This commit is contained in:
Alex Crawford 2015-07-17 12:43:51 -07:00
parent 6fe9289110
commit bc3ad318b4
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,38 @@
# Copyright (c) 2015 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
CROS_WORKON_PROJECT="coreos/coreos-metadata"
CROS_WORKON_LOCALNAME="coreos-metadata"
CROS_WORKON_REPO="git://github.com"
inherit cros-workon systemd
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64"
else
CROS_WORKON_COMMIT=""
KEYWORDS="amd64"
fi
DESCRIPTION="coreos-metadata"
HOMEPAGE="https://github.com/coreos/coreos-metadata"
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND="
dev-lang/rust-bin
dev-rust/cargo
"
src_compile() {
CARGO_HOME="${WORKDIR}/.cargo" cargo build \
--release --verbose --no-default-features || die
}
src_install() {
dobin "${S}/target/release/${PN}"
systemd_dounit "${FILESDIR}/coreos-metadata.service"
}

View File

@ -0,0 +1,10 @@
[Unit]
Description=CoreOS Metadata Agent
[Service]
Type=oneshot
EnvironmentFile=/usr/share/oem/oem-release
ExecStart=/usr/bin/coreos-metadata --provider=${OEM_ID} --output=/run/metadata/coreos
[Install]
RequiredBy=metadata.target