aboutsummaryrefslogtreecommitdiff
blob: cff9471d3f9009fd3f2e409e71bad1e19e8648bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-info
inherit toolchain-funcs

if [[ ${PV} == *9999* ]]; then
	EGIT_REPO_URI="https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git"
	inherit git-r3
else
	SRC_URI="https://git.kernel.org/pub/scm/fs/fsverity/${PN}.git/snapshot/${P}.tar.gz"
	KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
fi

DESCRIPTION="Userspace utility for file-level integrity/authenticity verification"
HOMEPAGE="https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git"
LICENSE="MIT"
SLOT="0"

DEPEND="dev-libs/openssl:="

RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

src_prepare() {
	# bug comment 937042#c3
	sed -e '/^DEFAULT_TARGETS += libfsverity.a/d' \
		-e '/install -m644 libfsverity.a/d' \
		-i Makefile || die
	default
}

src_compile() {
	export PKGCONF="$(tc-getPKG_CONFIG)" USE_SHARED_LIB=1
	tc-export AR CC
	default
}

src_install() {
	emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr" \
		LIBDIR="${EPREFIX}/usr/$(get_libdir)"
}