You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2015 Jeff Waugh
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=kmod
  9. PKG_VERSION:=27
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod
  13. PKG_HASH:=c1d3fbf16ca24b95f334c1de1b46f17bbe5a10b0e81e72668bdc922ebffbbc0c
  14. PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. CONFIGURE_ARGS += --with-zlib
  22. define Package/kmod/Default
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=Linux kernel module handling
  26. URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
  27. DEPENDS:=+zlib
  28. endef
  29. define Package/kmod
  30. $(call Package/kmod/Default)
  31. TITLE+= (tools)
  32. ALTERNATIVES:=\
  33. 200:/sbin/depmod:/sbin/kmod \
  34. 200:/sbin/insmod:/sbin/kmod \
  35. 200:/sbin/lsmod:/sbin/kmod \
  36. 200:/sbin/modinfo:/sbin/kmod \
  37. 200:/sbin/modprobe:/sbin/kmod \
  38. 200:/sbin/rmmod:/sbin/kmod
  39. endef
  40. define Package/kmod/description
  41. Linux kernel module handling
  42. kmod is a set of tools to handle common tasks with Linux kernel modules like
  43. insert, remove, list, check properties, resolve dependencies and aliases.
  44. endef
  45. define Package/kmod/install
  46. $(INSTALL_DIR) $(1)/sbin
  47. $(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
  48. endef
  49. define Package/libkmod
  50. $(call Package/kmod/Default)
  51. SECTION:=libs
  52. CATEGORY:=Libraries
  53. TITLE+= (library)
  54. endef
  55. define Package/libkmod/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.so.* $(1)/usr/lib/
  58. endef
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include
  61. $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.{so*,la} $(1)/usr/lib/
  64. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libkmod.pc $(1)/usr/lib/pkgconfig/
  66. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libkmod.pc
  67. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libkmod.pc
  68. endef
  69. $(eval $(call BuildPackage,kmod))
  70. $(eval $(call BuildPackage,libkmod))