summaryrefslogtreecommitdiff
path: root/repo/system/kmod.xibuild
blob: 29accd56dc3b9bd5984298a8bead3c1b49f291e4 (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
30
#!/bin/sh

MAKEDEPS="make "
DEPS="glibc zlib openssl xz zstd"

PKG_VER=29
SOURCE=https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-$PKG_VER.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
}

package () {
    make DESTDIR=$PKG_DEST install 
    mkdir -p /usr/bin
    ln -sv kmod $PKG_DEST/usr/bin/depmod
    ln -sv kmod $PKG_DEST/usr/bin/insmod
    ln -sv kmod $PKG_DEST/usr/bin/modinfo
    ln -sv kmod $PKG_DEST/usr/bin/modprobe
    ln -sv kmod $PKG_DEST/usr/bin/rmmod
    ln -sv kmod $PKG_DEST/usr/bin/lsmod
}