3.44. kmod-27

#!/bin/sh
# Copyright © 1999-2022 Gerard Beekmans
# Copyright © 2017-2022 Random Crew
# Distributed under the terms of MIT License.

Configuration

src_config()
{
    ./configure \
        --prefix=${PREFIX} \
        --bindir=/bin \
        --sysconfdir=/etc \
        --with-rootlibdir=/lib \
        --with-xz \
        --with-zlib
}

Compilation

src_compile()
{
    make ${MAKEOPTS}
}

Installation

src_install()
{
    make install ${MAKEOPTS} DESTDIR=${D}

    mkdir -p ${D}${PREFIX}/sbin
    for target in depmod insmod lsmod modinfo modprobe rmmod; do
        ln -sf ../bin/kmod ${D}/sbin/$target
    done
    
    ln -sf kmod ${D}/bin/lsmod
}

Build code

kmod.build

Other files

meta.txt

Links

url.lfs: https://linuxfromscratch.org/lfs/view/10.0/chapter08/kmod.html