summaryrefslogtreecommitdiff
path: root/sys-boot/tboot/tboot-1.9.6_p20171118.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-11-18 18:38:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-11-18 18:38:22 +0000
commita5956e0a0daddcad648e0d8d8e5cb3e49e09bda7 (patch)
tree3d2e0a61f348a5299e73ca7c2b236156a8cc79b5 /sys-boot/tboot/tboot-1.9.6_p20171118.ebuild
parent38f60b3ec9ff175535d9a056a76ae42931e61e21 (diff)
gentoo resync : 18.11.2017
Diffstat (limited to 'sys-boot/tboot/tboot-1.9.6_p20171118.ebuild')
-rw-r--r--sys-boot/tboot/tboot-1.9.6_p20171118.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/sys-boot/tboot/tboot-1.9.6_p20171118.ebuild b/sys-boot/tboot/tboot-1.9.6_p20171118.ebuild
new file mode 100644
index 000000000000..3da7e7525a77
--- /dev/null
+++ b/sys-boot/tboot/tboot-1.9.6_p20171118.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic mount-boot
+
+DESCRIPTION="Performs a measured and verified boot using Intel Trusted Execution Technology"
+HOMEPAGE="https://sourceforge.net/projects/tboot/"
+SRC_URI="https://dev.gentoo.org/~perfinion/distfiles/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 -*"
+IUSE="custom-cflags selinux"
+
+# requires patching the kernel src
+RESTRICT="test"
+
+DEPEND="app-crypt/trousers
+app-crypt/tpm-tools
+dev-libs/openssl:0=[-bindist]"
+
+RDEPEND="${DEPEND}
+sys-boot/grub:2
+selinux? ( sec-policy/selinux-tboot )"
+
+DOCS=( README COPYING CHANGELOG )
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-genkernel-path.patch" )
+
+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[@]}"
+ dodoc docs/*.txt lcptools/*.{txt,pdf} || die "docs failed"
+
+ cd "${D}"
+ mkdir -p usr/lib/tboot/ || die
+ mv boot usr/lib/tboot/ || die
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ cp ${ROOT%/}/usr/lib/tboot/boot/* ${ROOT%/}/boot/
+
+ mount-boot_pkg_postinst
+
+ 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/"
+}