Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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:=31
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod
  13. PKG_HASH:=f5a6949043cc72c001b728d8c218609c5a15f3c33d75614b78c79418fcf00d80
  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))