1
0

Makefile 4.1 KB

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