2015-02-18 13:35:27 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2015 Jeff Waugh
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=kmod
|
2023-10-02 07:45:19 +00:00
|
|
|
PKG_VERSION:=31
|
2023-04-06 06:23:52 +00:00
|
|
|
PKG_RELEASE:=1
|
2015-02-18 13:35:27 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
2020-09-02 23:56:41 +00:00
|
|
|
PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod
|
2023-10-02 07:45:19 +00:00
|
|
|
PKG_HASH:=f5a6949043cc72c001b728d8c218609c5a15f3c33d75614b78c79418fcf00d80
|
2020-09-02 23:56:41 +00:00
|
|
|
|
2015-02-18 13:35:27 +00:00
|
|
|
PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
|
2019-09-02 13:15:08 +00:00
|
|
|
PKG_LICENSE:=LGPL-2.1-or-later
|
2015-02-18 13:35:27 +00:00
|
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
|
2020-09-02 23:56:41 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
2015-02-18 13:35:27 +00:00
|
|
|
PKG_INSTALL:=1
|
2020-09-02 23:56:41 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2015-02-18 13:35:27 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
CONFIGURE_ARGS += --with-zlib
|
|
|
|
|
|
|
|
define Package/kmod/Default
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=Linux kernel module handling
|
|
|
|
URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
|
|
|
|
DEPENDS:=+zlib
|
2020-06-12 01:15:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Package/kmod
|
|
|
|
$(call Package/kmod/Default)
|
|
|
|
TITLE+= (tools)
|
2020-05-01 05:51:33 +00:00
|
|
|
ALTERNATIVES:=\
|
|
|
|
200:/sbin/depmod:/sbin/kmod \
|
|
|
|
200:/sbin/insmod:/sbin/kmod \
|
|
|
|
200:/sbin/lsmod:/sbin/kmod \
|
|
|
|
200:/sbin/modinfo:/sbin/kmod \
|
|
|
|
200:/sbin/modprobe:/sbin/kmod \
|
|
|
|
200:/sbin/rmmod:/sbin/kmod
|
2015-02-18 13:35:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/kmod/description
|
|
|
|
Linux kernel module handling
|
|
|
|
kmod is a set of tools to handle common tasks with Linux kernel modules like
|
|
|
|
insert, remove, list, check properties, resolve dependencies and aliases.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/kmod/install
|
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Package/libkmod
|
|
|
|
$(call Package/kmod/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE+= (library)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libkmod/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.{so*,la} $(1)/usr/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libkmod.pc $(1)/usr/lib/pkgconfig/
|
2020-12-09 10:53:22 +00:00
|
|
|
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libkmod.pc
|
|
|
|
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libkmod.pc
|
2015-02-18 13:35:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,kmod))
|
|
|
|
$(eval $(call BuildPackage,libkmod))
|