|
| 1 | +# Copyright (c) 2015 CoreOS, Inc.. All rights reserved. |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=8 |
| 5 | + |
| 6 | +inherit go-module |
| 7 | + |
| 8 | +DESCRIPTION="Pre-boot provisioning utility" |
| 9 | +HOMEPAGE="https://github.com/coreos/ignition" |
| 10 | + |
| 11 | +if [[ ${PV} == 9999 ]]; then |
| 12 | + EGIT_REPO_URI="https://github.com/coreos/ignition.git" |
| 13 | + inherit git-r3 |
| 14 | +else |
| 15 | + SRC_URI="https://github.com/coreos/ignition/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
| 16 | + KEYWORDS="amd64 arm64" |
| 17 | + |
| 18 | + PATCHES=( |
| 19 | + "${FILESDIR}/0001-sed-s-coreos-flatcar.patch" |
| 20 | + "${FILESDIR}/0002-config-add-ignition-translation.patch" |
| 21 | + "${FILESDIR}/0003-mod-add-flatcar-ignition-0.36.2.patch" |
| 22 | + "${FILESDIR}/0004-config-v3_6-convert-ignition-2.x-to-3.x.patch" |
| 23 | + "${FILESDIR}/0005-vendor-go-mod-vendor.patch" |
| 24 | + "${FILESDIR}/0006-internal-prv-cmdline-backport-flatcar-patch.patch" |
| 25 | + "${FILESDIR}/0007-provider-qemu-apply-fw_cfg-patch.patch" |
| 26 | + "${FILESDIR}/0008-config-3_6-test-add-ignition-2.x-test-cases.patch" |
| 27 | + "${FILESDIR}/0009-internal-disk-fs-ignore-fs-format-mismatches-for-the.patch" |
| 28 | + "${FILESDIR}/0010-VMware-Fix-guestinfo.-.config.data-and-.config.url-v.patch" |
| 29 | + "${FILESDIR}/0011-config-version-handle-configuration-version-1.patch" |
| 30 | + "${FILESDIR}/0012-config-util-add-cloud-init-detection-to-initial-pars.patch" |
| 31 | + "${FILESDIR}/0013-Revert-drop-OEM-URI-support.patch" |
| 32 | + "${FILESDIR}/0014-internal-resource-url-support-btrfs-as-OEM-partition.patch" |
| 33 | + "${FILESDIR}/0015-translation-support-OEM-and-oem.patch" |
| 34 | + "${FILESDIR}/0016-revert-internal-oem-drop-noop-OEMs.patch" |
| 35 | + "${FILESDIR}/0017-docs-Add-re-added-platforms-to-docs-to-pass-tests.patch" |
| 36 | + "${FILESDIR}/0018-usr-share-oem-oem.patch" |
| 37 | + "${FILESDIR}/0019-internal-exec-stages-mount-Mount-oem.patch" |
| 38 | + ) |
| 39 | +fi |
| 40 | + |
| 41 | +LICENSE="Apache-2.0" |
| 42 | +SLOT="0/${PVR}" |
| 43 | + |
| 44 | +# need util-linux for libblkid at compile time |
| 45 | +DEPEND="sys-apps/util-linux" |
| 46 | + |
| 47 | +RDEPEND=" |
| 48 | + ${DEPEND} |
| 49 | + sys-apps/coreutils |
| 50 | + sys-apps/gptfdisk |
| 51 | + sys-apps/shadow |
| 52 | + sys-apps/systemd |
| 53 | + sys-fs/btrfs-progs |
| 54 | + sys-fs/dosfstools |
| 55 | + sys-fs/e2fsprogs |
| 56 | + sys-fs/mdadm |
| 57 | + sys-fs/xfsprogs |
| 58 | +" |
| 59 | + |
| 60 | +src_compile() { |
| 61 | + ego build \ |
| 62 | + -ldflags "-X github.com/flatcar/ignition/v2/internal/version.Raw=${PV} -X github.com/flatcar/ignition/v2/internal/distro.selinuxRelabel=false" \ |
| 63 | + "${S}"/internal/main.go |
| 64 | +} |
| 65 | + |
| 66 | +src_install() { |
| 67 | + newbin "${S}"/main ${PN} |
| 68 | + dosym -r /usr/bin/${PN} /usr/libexec/${PN}-rmcfg |
| 69 | +} |
0 commit comments