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.

93 lines
2.0 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:=20
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
  13. PKG_HASH:=89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0
  14. PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
  15. PKG_LICENSE:=LGPL-2.1+
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_FIXUP:=autoreconf
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=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. endef
  33. define Package/kmod/description
  34. Linux kernel module handling
  35. kmod is a set of tools to handle common tasks with Linux kernel modules like
  36. insert, remove, list, check properties, resolve dependencies and aliases.
  37. endef
  38. LEGACY_BINARIES:= \
  39. depmod \
  40. insmod \
  41. lsmod \
  42. modinfo \
  43. modprobe \
  44. rmmod
  45. define Package/kmod/install
  46. $(INSTALL_DIR) $(1)/sbin
  47. $(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
  48. for b in $(LEGACY_BINARIES); do \
  49. ln -sf kmod $(1)/sbin/$$$$b ; \
  50. done
  51. endef
  52. define Package/libkmod
  53. $(call Package/kmod/Default)
  54. SECTION:=libs
  55. CATEGORY:=Libraries
  56. TITLE+= (library)
  57. endef
  58. define Package/libkmod/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.so.* $(1)/usr/lib/
  61. endef
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.{so*,la} $(1)/usr/lib/
  67. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libkmod.pc $(1)/usr/lib/pkgconfig/
  69. endef
  70. $(eval $(call BuildPackage,kmod))
  71. $(eval $(call BuildPackage,libkmod))