You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.3 KiB
60 lines
1.3 KiB
4 months ago
|
# Copyright 1999-2024 Gentoo Authors
|
||
8 months ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
4 months ago
|
inherit linux-info optfeature
|
||
8 months ago
|
|
||
|
DESCRIPTION="Dynamic Kernel Module Support"
|
||
|
HOMEPAGE="https://github.com/dell/dkms"
|
||
|
SRC_URI="https://github.com/dell/dkms/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
8 months ago
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||
8 months ago
|
SLOT="0"
|
||
|
|
||
|
IUSE="systemd"
|
||
|
|
||
|
CONFIG_CHECK="~MODULES"
|
||
|
|
||
|
RDEPEND="
|
||
|
sys-apps/kmod
|
||
|
virtual/linux-sources
|
||
|
systemd? ( sys-apps/systemd )
|
||
|
"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}/${P}-add-gentoo-os-id.patch"
|
||
|
)
|
||
|
|
||
|
# Can not work in the emerge sandbox
|
||
|
RESTRICT="test"
|
||
|
|
||
|
src_compile() {
|
||
|
# Nothing to do here
|
||
|
return
|
||
|
}
|
||
|
|
||
|
src_test() {
|
||
|
chmod +x dkms || die
|
||
|
PATH="${PATH}:$(pwd)" ./run_test.sh || die "Tests failed"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
if use systemd; then
|
||
|
emake install-redhat DESTDIR="${ED}" KCONF="/usr/lib/kernel"
|
||
|
else
|
||
|
emake install DESTDIR="${ED}" KCONF="/usr/lib/kernel"
|
||
|
fi
|
||
4 months ago
|
# Backwards compatibility with sys-kernel/installkernel[-systemd]
|
||
|
dosym ../../../usr/lib/kernel/postinst.d/dkms /etc/kernel/postinst.d/dkms
|
||
|
dosym ../../../usr/lib/kernel/prerm.d/dkms /etc/kernel/prerm.d/dkms
|
||
8 months ago
|
einstalldocs
|
||
|
keepdir /var/lib/dkms
|
||
|
}
|
||
4 months ago
|
|
||
|
pkg_postinst() {
|
||
|
optfeature "automatically running \"dkms autoinstall\" on each kernel installation" \
|
||
|
"sys-kernel/installkernel[systemd]"
|
||
|
}
|