summaryrefslogtreecommitdiff
path: root/app-admin/foundry/foundry-0.6.2-r2.ebuild
blob: 96b1ca352c011d8d66c9ec380c10b5fd44d013b0 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 2026 Foundry contributors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} )
inherit distutils-r1

DESCRIPTION="Foundry system builder and shared Crucible runtime"
HOMEPAGE="https://www.hedronfire.com/"
SRC_URI="https://www.hedronfire.com/distfiles/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="usb-writer images boot-tests"

RDEPEND="
	${PYTHON_DEPS}
	acct-group/foundry
	acct-group/osforge
	!<app-admin/osforge-0.6.0
	app-arch/tar
	dev-python/prompt-toolkit[${PYTHON_USEDEP}]
	dev-vcs/git
	net-misc/rsync
	sys-apps/portage
	images? (
		dev-libs/libisoburn
		sys-apps/gptfdisk
		sys-boot/grub[fonts,grub_platforms_efi-64]
		sys-fs/e2fsprogs
		sys-fs/mtools
		sys-fs/squashfs-tools
	)
	boot-tests? (
		app-emulation/qemu[qemu_softmmu_targets_x86_64]
		sys-firmware/edk2-bin
	)
	usb-writer? (
		sys-apps/gptfdisk
		sys-block/parted
		sys-boot/grub
		sys-fs/dosfstools
		sys-fs/e2fsprogs
	)
"
BDEPEND="test? ( app-arch/tar dev-vcs/git net-misc/rsync )"

PATCHES=( "${FILESDIR}/foundry-0.6.2-export-access.patch" )

distutils_enable_tests unittest

python_test() {
	eunittest -s tests
}

python_install_all() {
	distutils-r1_python_install_all
	newinitd src/foundry/data/openrc/foundryd foundryd
	newconfd src/foundry/data/openrc/foundryd.confd foundryd
	newinitd src/foundry/data/openrc/osforged osforged
	newconfd src/foundry/data/openrc/osforged.confd osforged
	dodoc -r examples docs
	dosbin scripts/repository-candidate-gate
	if use usb-writer; then
		dosbin scripts/foundry-write-usb scripts/osforge-write-usb
	fi
}

pkg_postinst() {
    elog "Foundry is the canonical runtime. OSForge commands/imports remain aliases."
    elog "Configuration and job history are adopted in place; nothing is moved."
    elog "After jobs finish, stop/disable osforged before starting/enabling foundryd."
    elog "Read the installed docs/rename-0.6.md before switching service names."
}