summaryrefslogtreecommitdiff
path: root/app-portage/grs/grs-0.8-r1.ebuild
blob: ef4a845d146af7ce927ddbe8dc1bfd2582f7cfa6 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="8"
PYTHON_COMPAT=( python3_{10,11,12} )
DISTUTILS_USE_SETUPTOOLS=no

inherit distutils-r1 linux-info

ISO="ISO-1.tar.gz"

if [[ ${PV} == *9999 ]] ; then
	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/grss.git"
	SRC_URI="https://dev.gentoo.org/~blueness/${PN}/${ISO}"
	inherit git-r3
else
	SRC_URI="https://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz
	https://dev.gentoo.org/~blueness/${PN}/${ISO}"
	KEYWORDS="amd64 ~arm ~arm64 ~x86"
fi

DESCRIPTION="Suite to build Gentoo Reference Systems"
HOMEPAGE="https://dev.gentoo.org/~blueness/grs"

LICENSE="GPL-2"
SLOT="0"
IUSE="server"

DEPEND=""
RDEPEND="
	sys-apps/portage[${PYTHON_USEDEP}]
	server? (
		app-arch/tar[xattr]
		app-cdr/cdrtools
		app-crypt/md5deep
		dev-libs/libcgroup
		dev-vcs/git
		net-misc/rsync
		sys-fs/squashfs-tools
		sys-kernel/genkernel
	)"

pkg_setup() {
	if use server; then
		local CONFIG_CHECK="~CGROUPS"
		local ERROR_CGROUPS="WARNING: grsrun requires CONFIG_CGROUPS enabled in the kernel."
		linux-info_pkg_setup
	fi
}

src_install() {
	distutils-r1_src_install
	echo "CONFIG_PROTECT=\"/etc/grs/systems.conf\"" > "${T}"/20grs
	doenvd "${T}"/20grs
	if use server; then
		mkdir "${D}"/usr/share/${PN}
		cp "${DISTDIR}"/${ISO} "${D}"/usr/share/${PN}
	else
		rm "${D}"/usr/bin/grsrun
	fi
}