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.

140 lines
4.0 KiB

  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:=eudev
  9. PKG_VERSION:=3.1.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://dev.gentoo.org/~blueness/eudev/
  13. PKG_MD5SUM:=c4dace42deecede102b6c01904042acc
  14. PKG_LICENSE:=GPL-2.0
  15. include $(INCLUDE_DIR)/package.mk
  16. PKG_BUILD_DEPENDS:=gperf/host
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL=1
  19. define Package/eudev
  20. SECTION:=base
  21. CATEGORY:=Base system
  22. TITLE:=Dynamic device management subsystem
  23. URL:=https://wiki.gentoo.org/wiki/Project:Eudev
  24. MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  25. MENU:=1
  26. DEPENDS:=+librt +EUDEV_EXTRA_blkid:libblkid +EUDEV_EXTRA_kmod:libkmod
  27. PROVIDES:=udev
  28. CONFLICTS:=udev
  29. endef
  30. define Package/eudev/description
  31. udev allows Linux users to have a dynamic /dev directory and it
  32. provides the ability to have persistent device names.
  33. eudev is a fork of systemd-udev with the goal of obtaining better
  34. compatibility with existing software such as OpenRC and Upstart, older
  35. kernels, various toolchains and anything else required by users and
  36. various distributions.
  37. endef
  38. define Package/eudev/conffiles
  39. /etc/udev/udev.conf
  40. endef
  41. define Package/eudev/config
  42. source "$(SOURCE)/Config.in"
  43. endef
  44. CONFIGURE_ARGS += \
  45. --prefix=/usr --exec-prefix= --sysconfdir=/etc \
  46. --libexecdir=/lib/udev --sbindir=/sbin \
  47. --disable-hwdb --disable-introspection --disable-manpages \
  48. --disable-selinux \
  49. $(if $(CONFIG_EUDEV_EXTRA_blkid),--enable-blkid,--disable-blkid) \
  50. $(if $(CONFIG_EUDEV_EXTRA_kmod),--enable-kmod,--disable-kmod)
  51. eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_ata_id) += ata_id
  52. eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_blkid) += 60-persistent-storage.rules
  53. eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_cdrom_id) += cdrom_id
  54. eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
  55. eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_collect) += collect
  56. eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_input_id) += 60-persistent-input.rules
  57. eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_mtd_probe) += mtd_probe
  58. eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_mtd_probe) += 75-probe_mtd.rules
  59. eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_scsi_id) += scsi_id
  60. eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_v4l_id) += v4l_id
  61. eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_v4l_id) += 60-persistent-v4l.rules
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
  65. $(INSTALL_DIR) $(1)/usr/share/pkgconfig
  66. $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc $(1)/usr/share/pkgconfig
  67. $(INSTALL_DIR) $(1)/lib
  68. $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
  69. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  70. $(CP) $(PKG_INSTALL_DIR)/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
  71. endef
  72. define Package/eudev/install
  73. $(INSTALL_DIR) $(1)/etc/udev/rules.d
  74. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
  75. $(INSTALL_DIR) $(1)/sbin
  76. $(INSTALL_BIN) \
  77. $(PKG_INSTALL_DIR)/usr/bin/udevadm \
  78. $(PKG_INSTALL_DIR)/sbin/udevd \
  79. $(1)/sbin
  80. $(INSTALL_DIR) $(1)/lib/udev/rules.d
  81. $(INSTALL_DATA) \
  82. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
  83. $(eudev-extra-rules-y)) \
  84. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
  85. 50-udev-default.rules \
  86. 60-block.rules \
  87. 60-drm.rules \
  88. 60-evdev.rules \
  89. 60-persistent-alsa.rules \
  90. 60-persistent-storage-tape.rules \
  91. 60-serial.rules \
  92. 64-btrfs.rules \
  93. 70-mouse.rules \
  94. 75-net-description.rules \
  95. 78-sound-card.rules \
  96. 80-net-name-slot.rules) \
  97. $(1)/lib/udev/rules.d
  98. $(INSTALL_DIR) $(1)/lib
  99. $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
  100. $(INSTALL_DIR) $(1)/lib/udev
  101. ifneq ($(eudev-extra-lib-bin-y),)
  102. $(INSTALL_BIN) \
  103. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
  104. $(eudev-extra-lib-bin-y)) \
  105. $(1)/lib/udev/
  106. endif
  107. ifneq ($(eudev-extra-lib-data-y),)
  108. $(INSTALL_DATA) \
  109. $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
  110. $(eudev-extra-lib-data-y)) \
  111. $(1)/lib/udev/
  112. endif
  113. endef
  114. $(eval $(call BuildPackage,eudev))