diff --git a/app-emulation/fex-rootfs-gentoo/Manifest b/app-emulation/fex-rootfs-gentoo/Manifest new file mode 100644 index 0000000..c02f626 --- /dev/null +++ b/app-emulation/fex-rootfs-gentoo/Manifest @@ -0,0 +1,2 @@ +DIST fex-rootfs-gentoo-20240909-root.sqfs 1588703232 BLAKE2B 480b33bd92ac88471d09841372670abd2700261859414c88e66a684cdc0acb8b8da771310be1e501d724dd17fe961c4f0eb46cca8cdb7798f069c64a5ea61333 SHA512 63145041935f3bf95303209e18f20f0f631106a2d58ca97ee25277badc6ecdd3157a3731789e72c0ba1df94b6576529d90b37aa22300dcb43579a471589723cb +DIST fex-rootfs-gentoo-20240909.tar.gz 7089 BLAKE2B 617bab6bc524ab427b7554824ab74cd7daf5ae4f18730ac0f1aa2937dd71781ba379e08bf54fedbfec17683999832b2d910682817babdb1be69f0d4c42fa4ae7 SHA512 37f2ed0ffffdeec9e807b836b87bad480c20e4d1d657b1a9ac0c8004da51d9f839f449eb4c0b2c5717492eb880a580522d2edadb7d403796bbe43232b434ed0d diff --git a/app-emulation/fex-rootfs-gentoo/fex-rootfs-gentoo-20240909.ebuild b/app-emulation/fex-rootfs-gentoo/fex-rootfs-gentoo-20240909.ebuild new file mode 100644 index 0000000..7074054 --- /dev/null +++ b/app-emulation/fex-rootfs-gentoo/fex-rootfs-gentoo-20240909.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd linux-info + +DESCRIPTION="A x86 system image used for FEX" +HOMEPAGE="https://github.com/WhatAmISupposedToPutHere/fex-rootfs" + +SRC_URI=" + https://github.com/WhatAmISupposedToPutHere/fex-rootfs/releases/download/${PV}/fex-rootfs.sqfs -> ${P}-root.sqfs + https://github.com/WhatAmISupposedToPutHere/fex-rootfs/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz +" + +S="${WORKDIR}/fex-rootfs-${PV}" + +LICENSE="metapackage MIT" +SLOT="0" +KEYWORDS="-* ~arm64" +RDEPEND=" + systemd? ( sys-apps/systemd ) +" +DEPEND="${RDEPEND}" +IUSE="systemd" + +pkg_pretend() { + CONFIG_CHECK="~SQUASHFS ~SQUASHFS_ZSTD" + check_extra_config + [[ "${MERGE_TYPE}" != "buildonly" && "$(systemd_is_booted)" == 0 ]] || return + ewarn "This package depends on systemd being the init system for correct operation" + ewarn "On non-systemd systems assembling all the mount points correctly is left" + ewarn "as an excercise for the user." +} + +src_install() { + local base="/usr/share/fex-emu-rootfs-layers/gentoo" + insinto "${base}/images/" + newins "${DISTDIR}/${P}-root.sqfs" 00-base.sqfs + keepdir "${base}/work/" + keepdir "${base}/writable/" + gen_dir="$(systemd_get_systemgeneratordir)" + exeinto "${gen_dir#"${EPREFIX}"}" + doexe systemd/fex-gentoo-rootfs-generator + systemd_dounit 'systemd/usr-share-fex\x2demu\x2drootfs\x2dlayers-gentoo-layers-00\x2dbase.mount' +} + +pkg_prerm() { + [[ "${MERGE_TYPE}" == "buildonly" || "$(systemd_is_booted)" == 0 ]] && return + systemctl daemon-reload + systemctl stop 'usr-share-fex\x2demu\x2drootfs\x2dlayers-gentoo-layers-00\x2dbase.mount' +} + +pkg_postinst() { + [[ "${MERGE_TYPE}" == "buildonly" || "$(systemd_is_booted)" == 0 ]] && return + systemctl daemon-reload + systemctl start 'usr-share-fex\x2demu-RootFS-Gentoo.mount' +} diff --git a/app-emulation/fex-rootfs-gentoo/metadata.xml b/app-emulation/fex-rootfs-gentoo/metadata.xml new file mode 100644 index 0000000..4f4ac33 --- /dev/null +++ b/app-emulation/fex-rootfs-gentoo/metadata.xml @@ -0,0 +1,10 @@ + + + + + asahi@gentoo.org + + + WhatAmISupposedToPutHere/fex-rootfs + +