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

EAPI=8

DESCRIPTION="generic modular initramfs generator (automation)"
HOMEPAGE="https://salsa.debian.org/kernel-team/initramfs-tools"
SRC_URI="https://salsa.debian.org/kernel-team/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2 -> ${P}.tar.bz2"

LICENSE="GPL-2.0"
SLOT="0"
KEYWORDS="~amd64"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

S="${WORKDIR}/${PN}-v${PV}"

src_install(){
	insinto /usr/share/${PN}
	doins -r scripts hooks init conf/modules

	insinto /etc/${PN}
	doins conf/initramfs.conf

	doman initramfs-tools.7
	doman lsinitramfs.8
	doman mkinitramfs.8
	doman unmkinitramfs.8
	doman update-initramfs.8
	doman update-initramfs.conf.5

	dodoc -r docs

	dobin lsinitramfs
	dosbin mkinitramfs
	dobin unmkinitramfs
	dobin update-initramfs
}