distribution/packages/sysutils/kmod/package.mk

55 lines
2 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="kmod"
PKG_VERSION="30"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="GPL"
PKG_SITE="http://git.profusion.mobi/cgit.cgi/kmod.git/"
2023-02-24 13:53:43 +00:00
PKG_URL="https://www.kernel.org/pub/linux/utils/kernel/kmod/${PKG_NAME}-${PKG_VERSION}.tar.xz"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_HOST="toolchain"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="kmod offers the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules."
PKG_CONFIGURE_OPTS_HOST="--enable-tools \
--disable-logging \
--disable-debug \
--disable-gtk-doc \
--disable-gtk-doc-html \
--disable-gtk-doc-pdf \
--disable-manpages \
--with-gnu-ld \
--without-xz \
--without-zlib"
PKG_CONFIGURE_OPTS_TARGET="--enable-tools \
--enable-logging \
--disable-debug \
--disable-gtk-doc \
--disable-gtk-doc-html \
--disable-gtk-doc-pdf \
--disable-manpages \
--with-gnu-ld \
--without-xz \
--without-zlib"
post_makeinstall_host() {
2023-02-24 13:53:43 +00:00
ln -sf kmod ${TOOLCHAIN}/bin/depmod
2022-02-05 14:23:32 +00:00
}
post_makeinstall_target() {
# make symlinks for compatibility
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/usr/sbin
ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/lsmod
ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/insmod
ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/rmmod
ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/modinfo
ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/modprobe
ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/depmod
2022-02-05 14:23:32 +00:00
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/etc
ln -sf /storage/.config/modprobe.d ${INSTALL}/etc/modprobe.d
2022-02-05 14:23:32 +00:00
# add user modprobe.d dir
2023-02-24 13:53:43 +00:00
mkdir -p ${INSTALL}/usr/config/modprobe.d
2022-02-05 14:23:32 +00:00
}