summaryrefslogtreecommitdiff
path: root/repo/system/kmod.xibuild
blob: b6f873ef819df0400f92bf669df74e5c4b0f321a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

DEPS=(glibc zlib openssl xz zstd)

SOURCE=https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-29.tar.xz
DESC="Libraries and utilities for managing kernel modules"

build () {
    ./autogen.sh
    ./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --with-xz              \
            --with-zstd            \
            --with-zlib

    make
    make DESTDIR=$PKG_DEST install 
}

package () {
    mkdir -p /usr/sbin
    mkdir -p /usr/bin

    for target in depmod insmod modinfo modprobe rmmod; do
        ln -sfv ../bin/kmod $PKG_DERT/usr/sbin/$target
    done

    ln -sfv kmod $PKG_DEST/usr/bin/lsmod
}