Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=udev
  10. PKG_VERSION:=106
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/
  14. PKG_MD5SUM:=320ccd2d0f4540d10e021bafa14f8985
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/udev
  17. SECTION:=utils
  18. CATEGORY:=Utilities
  19. DEPENDS:=@LINUX_2_6
  20. TITLE:=Dynamic device management subsystem
  21. URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
  22. endef
  23. define Package/udev/description
  24. udev provides a dynamic device directory containing only the files for
  25. actually present devices. It creates or removes device node files in
  26. the /dev directory, or it renames network interfaces.
  27. endef
  28. define Package/udevtrigger
  29. $(call Package/udev)
  30. SECTION:=base
  31. CATEGORY:=Base system
  32. TITLE:=Small utility to request kernel devices events for coldplug
  33. endef
  34. define Package/udevextras
  35. $(call Package/udev)
  36. TITLE:=Utilities for udev scripts, for general device discovery
  37. MENU:=1
  38. endef
  39. define Package/udevextras/config
  40. source "$(SOURCE)/udevextras-config.in"
  41. endef
  42. UDEV_ALL_EXTRAS=ata_id cdrom_id dasd_id edd_id scsi_id path_id usb_id volume_id
  43. UDEV_EXTRAS=$(strip $(foreach e, $(UDEV_ALL_EXTRAS), \
  44. $(if $(CONFIG_UDEVEXTRAS_$(e)),extras/$(e))))
  45. define Build/Compile
  46. $(MAKE) -C $(PKG_BUILD_DIR) \
  47. CROSS_COMPILE="$(TARGET_CROSS)" \
  48. STRIP="/bin/true" \
  49. OPTFLAGS="$(TARGET_CFLAGS)" \
  50. DESTDIR="$(PKG_INSTALL_DIR)" \
  51. INSTALL="install -c" \
  52. EXTRAS="$(UDEV_EXTRAS)" \
  53. VOLUME_ID_STATIC=true \
  54. all install
  55. endef
  56. define Package/udev/install
  57. install -d -m0775 $(1)/etc/udev
  58. $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/
  59. install -d -m0775 $(1)/lib/udev
  60. install -d -m0775 $(1)/sbin/
  61. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/
  64. install -d -m0775 $(1)/usr/bin/
  65. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
  67. install -d -m0775 $(1)/usr/sbin/
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/
  69. install -d -m0775 $(1)/etc/udev/rules.d
  70. $(CP) files/20-input-grouping.rules $(1)/etc/udev/rules.d/
  71. endef
  72. define Package/udevtrigger/install
  73. $(INSTALL_DIR) $(1)/sbin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevtrigger $(1)/sbin/
  75. endef
  76. define Package/udevextras/install
  77. $(INSTALL_DIR) $(1)/etc/udev
  78. $(CP) $(PKG_BUILD_DIR)/etc/udev/rules.d $(1)/etc/udev/
  79. $(INSTALL_DIR) $(1)/lib/udev
  80. $$(foreach f, $$(shell $(FIND) $(PKG_INSTALL_DIR)/lib/udev/ -type f), \
  81. $(CP) $$(f) $(1)/lib/udev/ ; \
  82. )
  83. endef
  84. $(eval $(call BuildPackage,udev))
  85. $(eval $(call BuildPackage,udevtrigger))
  86. $(eval $(call BuildPackage,udevextras))