SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "module-init-tools"

# SliTaz package receipt.

PACKAGE="module-init-tools"
VERSION="3.12"
CATEGORY="base-system"
SHORT_DESC="Kernel modules manipulation tools."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/"
WGET_URL="${WEB_SITE}$TARBALL"

DEPENDS="glibc-base gcc-lib-base zlib lzlib depmod"
BUILD_DEPENDS="wget zlib-dev lzlib-dev lzlib"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*} 2>/dev/null | \
    sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q 
}

# Rules to configure and make the package.
compile_rules()
{
    for patch_file in lzlib depmod; do
        if [ -f done.$patch_file ]; then
            echo "Skipping $patch_file"
            continue
        fi
        echo "Apply $patch_file.u"
        patch -p1 < $stuff/$patch_file.u || return 1
        touch done.$patch_file
    done

    # Don't generate manpages to avoid failure.
    echo '.so man5/modprobe.conf.5' > modprobe.d.5

    ./configure --enable-zlib \
    --sbindir=/sbin --bindir=/bin --sysconfdir=/etc \
    $CONFIGURE_ARGS &&
    make &&    make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/sbin $fs/etc
    cp $install/sbin/insmod $fs/sbin
    cp $install/sbin/modinfo $fs/sbin
    cp $install/sbin/modprobe $fs/sbin
    cp $install/sbin/rmmod $fs/sbin
    # lsmod goes in /bin.
    cp -a $install/bin $fs
    # Create the modprobe config directory
    mkdir -p $fs/etc/modprobe.d
}

# Remove Busybox symlink before installing
pre_install()
{
    rm -f "$1/sbin/insmod"
    rm -f "$1/sbin/modinfo"
    rm -f "$1/sbin/modprobe"
    rm -f "$1/sbin/rmmod"
    # BusyBox puts lsmod in /sbin, not /bin
    rm -f "$1/sbin/lsmod"
}

post_remove()
{
    ln -s /bin/busybox "$1/sbin/insmod"
    ln -s /bin/busybox "$1/sbin/modinfo"
    ln -s /bin/busybox "$1/sbin/modprobe"
    ln -s /bin/busybox "$1/sbin/rmmod"
    # BusyBox puts lsmod in /sbin, not /bin
    ln -s /bin/busybox "$1/sbin/lsmod"
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)