Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=udev
  9. PKG_VERSION:=173
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/
  13. PKG_MD5SUM:=91a88a359b60bbd074b024883cc0dbde
  14. PKG_LICENSE:=GPL-2.0
  15. include $(INCLUDE_DIR)/package.mk
  16. PKG_INSTALL=1
  17. define Package/udev
  18. SECTION:=base
  19. CATEGORY:=Base system
  20. TITLE:=Dynamic device management subsystem
  21. URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
  22. MAINTAINER:=Geoff Levand <geoff@infradead.org>
  23. MENU:=1
  24. DEPENDS:=+librt
  25. endef
  26. define Package/udev/description
  27. udev allows Linux users to have a dynamic /dev directory and it
  28. provides the ability to have persistent device names.
  29. endef
  30. define Package/udev/conffiles
  31. /etc/udev/udev.conf
  32. endef
  33. define Package/udev/config
  34. source "$(SOURCE)/Config.in"
  35. endef
  36. udev-args-$(CONFIG_UDEV_DISABLE_LOGGING) += --disable-logging
  37. udev-args-$(CONFIG_UDEV_ENABLE_DEBUG) += --enable-debug
  38. udev-args-$(CONFIG_UDEV_EXTRA_edd_id) += --enable-edd
  39. udev-args-$(CONFIG_UDEV_EXTRA_floppy) += --enable-floppy
  40. # TODO: make hwdb and introspection work
  41. CONFIGURE_ARGS += --prefix=/usr --exec-prefix= --sysconfdir=/etc \
  42. --disable-hwdb --disable-keymap --disable-gudev --disable-introspection \
  43. --libexecdir=/lib/udev --disable-gtk-doc-html \
  44. --sbindir=/sbin $(udev-args-y)
  45. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_accelerometer) += accelerometer
  46. udev-extra-rules-$(CONFIG_UDEV_EXTRA_accelerometer) += 61-accelerometer.rules
  47. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_ata_id) += ata_id
  48. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_cdrom_id) += cdrom_id
  49. udev-extra-rules-$(CONFIG_UDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
  50. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_collect) += collect
  51. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_edd_id) += edd_id
  52. udev-extra-rules-$(CONFIG_UDEV_EXTRA_edd_id) += 61-persistent-storage-edd.rules
  53. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_firmware) += firmware
  54. udev-extra-rules-$(CONFIG_UDEV_EXTRA_firmware) += 50-firmware.rules
  55. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_floppy) += create_floppy_devices
  56. # TODO: make gudev work
  57. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_input_id) += input_id
  58. # TODO: make keymap work
  59. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_mtd_probe) += mtd_probe
  60. udev-extra-rules-$(CONFIG_UDEV_EXTRA_mtd_probe) += 75-probe_mtd.rules
  61. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_path_id) += path_id
  62. udev-extra-rules-$(CONFIG_UDEV_EXTRA_qemu) += 42-qemu-usb.rules
  63. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_rule_generator) += \
  64. write_cd_rules write_net_rules
  65. udev-extra-lib-data-$(CONFIG_UDEV_EXTRA_rule_generator) += \
  66. rule_generator.functions
  67. udev-extra-rules-$(CONFIG_UDEV_EXTRA_rule_generator) += \
  68. 75-cd-aliases-generator.rules 75-persistent-net-generator.rules
  69. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_scsi_id) += scsi_id
  70. # TODO: make udev-acl work
  71. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_usb_id) += usb_id
  72. udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_v4l_id) += v4l_id
  73. udev-extra-rules-$(CONFIG_UDEV_EXTRA_v4l_id) += 60-persistent-v4l.rules
  74. define Build/InstallDev
  75. $(INSTALL_DIR) $(1)/usr/include
  76. $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
  77. $(INSTALL_DIR) $(1)/usr/share/pkgconfig
  78. $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc $(1)/usr/share/pkgconfig
  79. $(INSTALL_DIR) $(1)/lib
  80. $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
  81. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  82. $(CP) $(PKG_INSTALL_DIR)/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
  83. endef
  84. define Package/udev/install
  85. $(INSTALL_DIR) $(1)/etc/udev/rules.d
  86. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
  87. $(INSTALL_DIR) $(1)/sbin
  88. $(INSTALL_BIN) \
  89. $(PKG_INSTALL_DIR)/sbin/udevadm \
  90. $(PKG_INSTALL_DIR)/sbin/udevd \
  91. $(1)/sbin
  92. $(INSTALL_DIR) $(1)/lib/udev/rules.d
  93. $(INSTALL_DATA) \
  94. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
  95. $(udev-extra-rules-y)) \
  96. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
  97. 50-udev-default.rules \
  98. 60-persistent-input.rules \
  99. 60-persistent-serial.rules \
  100. 60-persistent-storage.rules \
  101. 80-drivers.rules \
  102. 95-udev-late.rules) \
  103. $(1)/lib/udev/rules.d
  104. $(INSTALL_DIR) $(1)/lib
  105. $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
  106. $(INSTALL_DIR) $(1)/lib/udev
  107. ifneq ($(udev-extra-lib-bin-y),)
  108. $(INSTALL_BIN) \
  109. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
  110. $(udev-extra-lib-bin-y)) \
  111. $(1)/lib/udev/
  112. endif
  113. ifneq ($(udev-extra-lib-data-y),)
  114. $(INSTALL_DATA) \
  115. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
  116. $(udev-extra-lib-data-y)) \
  117. $(1)/lib/udev/
  118. endif
  119. endef
  120. $(eval $(call BuildPackage,udev))