summaryrefslogtreecommitdiff
blob: 88ab03786eb3efe43e6bf6665b8a23016b865515 (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module linux-info

DESCRIPTION="System container image builder for LXC and LXD"
HOMEPAGE="https://linuxcontainers.org/distrobuilder/introduction/"

SRC_URI="https://linuxcontainers.org/downloads/distrobuilder/distrobuilder-${PV}.tar.gz
	verify-sig? ( https://linuxcontainers.org/downloads/distrobuilder/distrobuilder-${PV}.tar.gz.asc )"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
IUSE="verify-sig"

RDEPEND="app-crypt/gnupg
	dev-util/debootstrap
	dev-vcs/git
	net-misc/rsync
	sys-fs/squashfs-tools"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"

# Test deps aren't vendored.
RESTRICT="test"

CONFIG_CHECK="~OVERLAY_FS"

VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc

PATCHES=( "${FILESDIR}"/distrobuilder-2.1-glibc-2.36-fix.patch )

GOPATH="${S}/_dist"

src_compile() {
	export GOPATH="${S}/_dist"
	emake
}

src_test() {
	export GOPATH="${S}/_dist"
	emake check
}

src_install() {
	export GOPATH="${S}/_dist"
	dobin ${GOPATH}/bin/distrobuilder
	dodoc -r doc/*
}