aboutsummaryrefslogtreecommitdiff
blob: 50e013ca8133d6af161737236a3cfb31c7d86010 (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
45
46
47
48
49
50
51
52
53
# Copyright 2021-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# Distributed under the terms of the GNU General Public License v2

EAPI=8

if [[ "$PV" == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://git.sr.ht/~lanodan/deblob"
else
	VERIFY_SIG_METHOD=signify
	inherit verify-sig

	SRC_URI="
		https://hacktivis.me/releases/${P}.tar.gz
		verify-sig? ( https://hacktivis.me/releases/${P}.tar.gz.sign )
	"
	KEYWORDS="~amd64 ~arm64 ~riscv"
fi

DESCRIPTION="remove binary executables from a directory"
HOMEPAGE="https://git.sr.ht/~lanodan/deblob"
LICENSE="BSD"
SLOT="0"

DEPEND="
	>=dev-lang/hare-0_pre20230615:=
	<dev-lang/hare-0_pre20231127
"

# built by hare
QA_FLAGS_IGNORED="usr/bin/deblob"

if [[ "${PV}" != "9999" ]]
then
	BDEPEND="${BDEPEND} verify-sig? ( sec-keys/signify-keys-lanodan:2023 )"

	VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/signify-keys/signify-keys-lanodan-2023.pub"

	src_unpack() {
		if use verify-sig; then
			# Too many levels of symbolic links
			cd "${DISTDIR}" || die
			cp ${A} "${WORKDIR}" || die
			cd "${WORKDIR}" || die
			verify-sig_verify_detached "${P}.tar.gz" "${P}.tar.gz.sign"
		fi
		default
	}
fi

src_install() {
	PREFIX="/usr" default
}