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.

88 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:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod/
  13. PKG_HASH:=89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0
  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_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. ALTERNATIVES:=\
  29. 200:/sbin/depmod:/sbin/kmod \
  30. 200:/sbin/insmod:/sbin/kmod \
  31. 200:/sbin/lsmod:/sbin/kmod \
  32. 200:/sbin/modinfo:/sbin/kmod \
  33. 200:/sbin/modprobe:/sbin/kmod \
  34. 200:/sbin/rmmod:/sbin/kmod
  35. endef
  36. define Package/kmod
  37. $(call Package/kmod/Default)
  38. TITLE+= (tools)
  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. endef
  67. $(eval $(call BuildPackage,kmod))
  68. $(eval $(call BuildPackage,libkmod))