1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit savedconfig toolchain-funcs
|
|
6 |
inherit savedconfig secureboot toolchain-funcs
|
|
7 |
|
|
8 |
# for 1.21.1_p20230601
|
|
9 |
COMMIT_SHA1="4fa4052c7ebb59e4d4aa396f1563c89118623ec7"
|
7 |
10 |
|
8 |
11 |
DESCRIPTION="Open source network boot (PXE) firmware"
|
9 |
12 |
HOMEPAGE="https://ipxe.org/"
|
10 |
13 |
SRC_URI="
|
11 |
|
!binary? ( https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz )
|
|
14 |
!binary? ( https://github.com/${PN}/${PN}/archive/${COMMIT_SHA1}.tar.gz -> ${P}.gh.tar.gz )
|
12 |
15 |
binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )"
|
13 |
|
S="${WORKDIR}/${P}/src"
|
|
16 |
S="${WORKDIR}/${PN}-${COMMIT_SHA1}/src"
|
14 |
17 |
|
15 |
18 |
LICENSE="GPL-2"
|
16 |
19 |
SLOT="0"
|
17 |
20 |
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv x86"
|
18 |
|
IUSE="+binary efi ipv6 iso lkrn +qemu undi usb vmware"
|
|
21 |
IUSE="+binary efi efi64 ipv6 iso lkrn +qemu undi usb vmware"
|
19 |
22 |
REQUIRED_USE="!amd64? ( !x86? ( binary ) )"
|
20 |
23 |
|
21 |
24 |
SOURCE_DEPEND="
|
... | ... | |
31 |
34 |
x86? ( ${SOURCE_DEPEND} )
|
32 |
35 |
)"
|
33 |
36 |
|
|
37 |
pkg_setup() {
|
|
38 |
if use efi || use efi64; then
|
|
39 |
secureboot_pkg_setup
|
|
40 |
fi
|
|
41 |
}
|
|
42 |
|
34 |
43 |
src_configure() {
|
35 |
44 |
use binary && return
|
36 |
45 |
|
... | ... | |
93 |
102 |
ipxemake bin/15ad07b0.rom # vmxnet3
|
94 |
103 |
fi
|
95 |
104 |
|
96 |
|
use efi && ipxemake PLATFORM=efi BIN=bin-efi bin-efi/ipxe.efi
|
|
105 |
use efi && ipxemake PLATFORM=efi BIN=bin-i386-efi bin-i386-efi/ipxe.efi
|
|
106 |
use efi64 && ipxemake PLATFORM=efi BIN=bin-x86_64-efi bin-x86_64-efi/ipxe.efi
|
97 |
107 |
use iso && ipxemake bin/ipxe.iso
|
98 |
108 |
use undi && ipxemake bin/undionly.kpxe
|
99 |
109 |
use usb && ipxemake bin/ipxe.usb
|
... | ... | |
107 |
117 |
doins bin/*.rom
|
108 |
118 |
fi
|
109 |
119 |
use vmware && doins bin/*.mrom
|
110 |
|
use efi && doins bin-efi/*.efi
|
|
120 |
use efi && newins bin-i386-efi/ipxe.efi ipxe-i386.efi
|
|
121 |
use efi64 && newins bin-x86_64-efi/ipxe.efi ipxe-x86_64.efi
|
|
122 |
# Add a symlink for backwards compatiblity, in case both variants are
|
|
123 |
# enabled the x86_64 bit variant takes presedence.
|
|
124 |
use efi && dosym ipxe-i386.efi /usr/share/ipxe/ipxe.efi
|
|
125 |
use efi64 && dosym ipxe-x86_64.efi /usr/share/ipxe/ipxe.efi
|
|
126 |
|
111 |
127 |
use iso && doins bin/*.iso
|
112 |
128 |
use undi && doins bin/*.kpxe
|
113 |
129 |
use usb && doins bin/*.usb
|
114 |
130 |
use lkrn && doins bin/*.lkrn
|
115 |
131 |
|
|
132 |
if use efi || use efi64; then
|
|
133 |
secureboot_auto_sign --in-place
|
|
134 |
fi
|
|
135 |
|
116 |
136 |
save_config config/local/general.h
|
117 |
137 |
}
|