Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Copyright (C) 2006 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. TITLE:=Small utility to request kernel devices events for coldplug
  31. endef
  32. define Build/Compile
  33. $(MAKE) -C $(PKG_BUILD_DIR) \
  34. CROSS_COMPILE="$(TARGET_CROSS)" \
  35. STRIP="/bin/true" \
  36. OPTFLAGS="$(TARGET_CFLAGS)" \
  37. DESTDIR="$(PKG_INSTALL_DIR)" \
  38. INSTALL="install -c" \
  39. all install
  40. endef
  41. define Package/udev/install
  42. install -d -m0775 $(1)/etc/udev
  43. $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/
  44. install -d -m0775 $(1)/lib/udev
  45. install -d -m0775 $(1)/sbin/
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/
  49. install -d -m0775 $(1)/usr/bin/
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
  52. install -d -m0775 $(1)/usr/sbin/
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/
  54. endef
  55. define Package/udevtrigger/install
  56. $(INSTALL_DIR) $(1)/sbin
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevtrigger $(1)/sbin/
  58. endef
  59. $(eval $(call BuildPackage,udev))
  60. $(eval $(call BuildPackage,udevtrigger))