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
1.9 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:=19
  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_MD5SUM:=a08643f814aa4efc12211c6e5909f4d9
  14. PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
  15. PKG_LICENSE:=LGPL-2.1+
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. CONFIGURE_ARGS += --with-zlib
  20. define Package/kmod/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Linux kernel module handling
  24. URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
  25. DEPENDS:=+zlib
  26. endef
  27. define Package/kmod
  28. $(call Package/kmod/Default)
  29. TITLE+= (tools)
  30. endef
  31. define Package/kmod/description
  32. Linux kernel module handling
  33. kmod is a set of tools to handle common tasks with Linux kernel modules like
  34. insert, remove, list, check properties, resolve dependencies and aliases.
  35. endef
  36. LEGACY_BINARIES:= \
  37. depmod \
  38. insmod \
  39. lsmod \
  40. modinfo \
  41. modprobe \
  42. rmmod
  43. define Package/kmod/install
  44. $(INSTALL_DIR) $(1)/sbin
  45. $(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
  46. for b in $(LEGACY_BINARIES); do \
  47. ln -sf kmod $(1)/sbin/$$$$b ; \
  48. done
  49. endef
  50. define Package/libkmod
  51. $(call Package/kmod/Default)
  52. SECTION:=libs
  53. CATEGORY:=Libraries
  54. TITLE+= (library)
  55. endef
  56. define Package/libkmod/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.so.* $(1)/usr/lib/
  59. endef
  60. define Build/InstallDev
  61. $(INSTALL_DIR) $(1)/usr/include
  62. $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.{so*,la} $(1)/usr/lib/
  65. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libkmod.pc $(1)/usr/lib/pkgconfig/
  67. endef
  68. $(eval $(call BuildPackage,kmod))
  69. $(eval $(call BuildPackage,libkmod))