Merge pull request #2567 from dm0-/torcx

Add the torcx generator
This commit is contained in:
David Michael 2017-05-24 13:48:20 -07:00 committed by GitHub
commit 3feb415c5e
7 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[Unit]
Description=Verify torcx succeeded
DefaultDependencies=no
AssertPathExists=/run/metadata/torcx
[Install]
WantedBy=basic.target

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>

View File

@ -0,0 +1 @@
torcx-9999.ebuild

View File

@ -0,0 +1,49 @@
# Copyright (c) 2017 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
CROS_WORKON_PROJECT="coreos/torcx"
CROS_WORKON_LOCALNAME="torcx"
CROS_WORKON_REPO="git://github.com"
COREOS_GO_PACKAGE="github.com/coreos/torcx"
COREOS_GO_VERSION="go1.8"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm64"
else
CROS_WORKON_COMMIT="1987d1c516c6925280fade659569d5062999a1db" # v0.1.0-alpha.1a
KEYWORDS="amd64 arm64"
fi
inherit coreos-go cros-workon systemd
DESCRIPTION="torcx is a boot-time addon manager for immutable systems"
HOMEPAGE="https://github.com/coreos/torcx"
LICENSE="Apache-2.0"
SLOT="0"
src_compile() {
CGO_ENABLED=0 go_export
${EGO} build -v \
-p "$(makeopts_jobs)" \
-ldflags "-X ${COREOS_GO_PACKAGE}/pkg/version.VERSION=${PV}" \
-o "bin/${ARCH}/torcx" \
-tags containers_image_openpgp \
"${COREOS_GO_PACKAGE}"
}
src_install() {
local generatordir=/usr/lib/systemd/system-generators
local vendordir=/usr/share/torcx
# dobin "${S}/bin/${ARCH}/torcx"
exeinto "${generatordir}"
newexe "${S}/bin/${ARCH}/torcx" torcx-generator
# dosym ../../../bin/torcx "${generatordir}/torcx-generator"
systemd_dounit "${FILESDIR}/torcx.target"
insinto "${vendordir}/profiles"
doins "${FILESDIR}/vendor.json"
dodir "${vendordir}/store"
}

View File

@ -96,6 +96,7 @@ RDEPEND="${RDEPEND}
app-admin/toolbox
app-arch/gzip
app-arch/tar
app-arch/torcx
app-arch/unzip
app-arch/zip
app-crypt/gnupg