You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.5 KiB
69 lines
1.5 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
5 years ago
|
EAPI=7
|
||
8 years ago
|
|
||
|
inherit flag-o-matic mount-boot
|
||
|
|
||
|
DESCRIPTION="Performs a measured and verified boot using Intel Trusted Execution Technology"
|
||
|
HOMEPAGE="https://sourceforge.net/projects/tboot/"
|
||
5 years ago
|
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||
8 years ago
|
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
5 years ago
|
KEYWORDS="-* ~amd64 ~x86"
|
||
3 years ago
|
IUSE="custom-cflags selinux"
|
||
8 years ago
|
|
||
|
# requires patching the kernel src
|
||
|
RESTRICT="test"
|
||
|
|
||
|
DEPEND="app-crypt/trousers
|
||
|
app-crypt/tpm-tools
|
||
3 years ago
|
dev-libs/openssl:0=[-bindist(-)]
|
||
3 years ago
|
"
|
||
8 years ago
|
|
||
|
RDEPEND="${DEPEND}
|
||
|
sys-boot/grub:2
|
||
|
selinux? ( sec-policy/selinux-tboot )"
|
||
|
|
||
7 years ago
|
DOCS=( README COPYING CHANGELOG )
|
||
5 years ago
|
PATCHES=( "${FILESDIR}/${PN}-1.9.11-genkernel-path.patch" )
|
||
8 years ago
|
|
||
|
src_prepare() {
|
||
|
sed -i 's/ -Werror//g' Config.mk || die
|
||
|
sed -i 's/^INSTALL_STRIP = -s$//' Config.mk || die # QA Errors
|
||
|
|
||
|
default
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
use custom-cflags && export TBOOT_CFLAGS=${CFLAGS} || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
|
||
|
|
||
|
if use amd64; then
|
||
|
export MAKEARGS="TARGET_ARCH=x86_64"
|
||
|
else
|
||
|
export MAKEARGS="TARGET_ARCH=i686"
|
||
|
fi
|
||
|
|
||
|
default
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
emake DISTDIR="${D}" install
|
||
|
|
||
|
dodoc "${DOCS[@]}"
|
||
3 years ago
|
dodoc docs/*.txt lcptools/*.pdf
|
||
8 years ago
|
|
||
3 years ago
|
cd "${ED}"
|
||
8 years ago
|
mkdir -p usr/lib/tboot/ || die
|
||
|
mv boot usr/lib/tboot/ || die
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
5 years ago
|
cp "${ROOT}/usr/lib/tboot/boot/*" "${ROOT}/boot/" || die
|
||
8 years ago
|
|
||
|
ewarn "Please remember to download the SINIT AC Module relevant"
|
||
|
ewarn "for your platform from:"
|
||
|
ewarn "http://software.intel.com/en-us/articles/intel-trusted-execution-technology/"
|
||
|
}
|