sys-kernel/dkms: new/p Dynamic modules support system

https://bugs.gentoo.org/100754

	Dynamic Kernel Module Support (DKMS) is a program/framework
that enables generating Linux kernel modules whose sources
generally reside outside the kernel source tree.
The concept is to have DKMS modules
automatically rebuilt when a new kernel is installed.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Denis Reva <denis7774@gmail.com>
This commit is contained in:
Denis Reva
2020-05-13 14:24:53 +05:00
parent f3fd094ae4
commit 32fbcd91c1
3 changed files with 70 additions and 0 deletions

1
sys-kernel/dkms/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST dkms-2.8.1.tar.gz 103894 BLAKE2B 9695c89fc1725f32e331969f94cd5b698df3cba2ef8a9d21dbb3d87ebeb6637898e184b2e8d99240763de4cb4528e2ff785e3f31c1265fdeb210df4dd060974e SHA512 25e57fcfdcdb460dc04d90db1d37577c2424b72be1019ea77af61d169460fbe8c397abf98634c72964d862cd3973f0c5e2bad7e157d48fe294750228e18e23bb

View File

@@ -0,0 +1,47 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils
DESCRIPTION="Dynamic Kernel Module Support"
HOMEPAGE="https://github.com/dell/dkms"
LICENSE="GPL-2"
DEPEND=""
KEYWORDS="~amd64 ~x86"
SLOT="0"
IUSE="kernel-hooks"
SRC_URI="https://github.com/dell/dkms/archive/v${PV}.tar.gz -> ${P}.tar.gz"
DOCS=( AUTHORS sample.conf sample.spec )
src_prepare() {
#Removing gzip compressions in Makefile
sed -i '/dkms.8.gz/d' "${S}"/Makefile
default
}
src_compile() {
einfo "Skipping compilation"
}
src_install() {
emake install DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir)/
keepdir /var/lib/dkms
insinto /var/lib/dkms
doins dkms_dbversion
keepdir /etc/dkms
doins template-dkms-mkrpm.spec
einstalldocs
if use kernel-hooks; then
einfo "You're installed kernel hooks that automatically rebuild your modules"
else rm -r "${D}"/etc/kernel/;
fi
ewarn "DKMS will say about missing headers even if sys-kernel/linux-headers installed"
ewarn "Just don't keep attention, that don't affect anything"
}

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>denis7774@gmail.com</email>
<name>Reva Denis</name>
</maintainer>
<upstream>
<remote-id type="github">dell/dkms</remote-id>
</upstream>
<longdescription lang="en">
Dynamic Kernel Module Support (DKMS) is a program/framework that enables generating Linux kernel modules whose sources generally reside outside the kernel source tree. The concept is to have DKMS modules automatically rebuilt when a new kernel is installed.
An essential feature of DKMS is that it automatically recompiles all DKMS modules if a new kernel version is installed. This allows drivers and devices outside of the mainline kernel to continue working after a Linux kernel upgrade.
Another benefit of DKMS is that it allows the installation of a new driver on an existing system, running an arbitrary kernel version, without any need for manual compilation or precompiled packages provided by the vendor.
DKMS was written by the Linux Engineering Team at Dell in 2003. It is included in many distributions, such as Ubuntu, Debian, Fedora, SUSE, and Arch. DKMS is free software released under the terms of the GNU General Public License (GPL) v2 or later.
DKMS supports both the rpm and deb package formats out-of-the-box.
</longdescription>
<use>
<flag name="kernel-hooks">Enable automatic rebuilding of modules via kernel source makefile hooks
</flag>
</use>
</pkgmetadata>