| # Copyright 2012 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_COMMIT="424149d2a083ff5213897ca292ab4f986f0b58c0" |
| CROS_WORKON_TREE=("1647a468f15f85e89d45c799e27359e3e664c67b" "eefdbdd1fc1ebba4472d615dce2391b37e2c6872" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_REPO="${CROS_GIT_HOST_URL}" |
| #CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_SUBTREE="common-mk verity .gn" |
| CROS_WORKON_DESTDIR="${S}/platform2" |
| CROS_WORKON_EGIT_BRANCH="main" |
| |
| PLATFORM_SUBDIR="verity" |
| |
| inherit cros-workon platform |
| |
| DESCRIPTION="File system integrity image generator for Chromium OS" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/verity/" |
| |
| LICENSE="BSD-Google GPL-2" |
| KEYWORDS="*" |
| |
| PATCHES=( |
| "${FILESDIR}/verity-print.patch" |
| ) |
| |
| src_prepare() { |
| # The workdir is platform2/nnapi - we need to pop up one level in the stack |
| # to apply our patches. |
| pushd .. || exit |
| eapply -p1 "${FILESDIR}/support-new-dm-verity-format.patch" |
| eapply -p1 "${FILESDIR}/0001-Add-version-to-PrintTable-and-GetTable.patch" |
| popd || exit |
| |
| eapply_user |
| } |
| |
| src_install() { |
| platform_src_install |
| |
| dobin "${OUT}"/verity |
| |
| dolib.so "${OUT}"/lib/libdm-bht.so |
| insinto "/usr/$(get_libdir)/pkgconfig" |
| doins libdm-bht.pc |
| |
| insinto /usr/include/verity |
| doins dm-bht.h dm-bht-userspace.h file_hasher.h |
| cd include || die |
| doins -r asm-generic |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/verity_tests" |
| } |