# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

if [[ ${PV} == "9999" ]] ; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/breavyn/dracut-bcachefs.git"
        KEYWORDS="~amd64 ~x86"
else
        SRC_URI="https://github.com/breavyn/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
        KEYWORDS="~amd64 ~x86"
fi

DESCRIPTION="This module allows mounting an encrypted bcachefs subvolume as / . The root of the bcachefs filesystem is made available at /.bcachefs"
HOMEPAGE="https://github.com/breavyn/dracut-bcachefs"

LICENSE="GPL-2.0"
SLOT="0"

DEPEND=""
RDEPEND="${DEPEND}
		sys-kernel/dracut"
BDEPEND=""

src_install() {
		default
		
		exeinto /usr/lib/dracut/modules.d/90bcachefs
		doexe "${S}"/90bcachefs/*
}
