2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://dev.gentoo.org/~blueness/eudev/
16 PKG_MD5SUM:=7e42d9b9ed8162021665139520676367
19 include $(INCLUDE_DIR)/package.mk
21 PKG_BUILD_DEPENDS:=gperf/host
25 define Package/libudev
28 TITLE:=Dynamic device management subsystem
29 URL:=https://wiki.gentoo.org/wiki/Project:Eudev
30 MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
36 TITLE:=Dynamic device management subsystem
37 URL:=https://wiki.gentoo.org/wiki/Project:Eudev
38 MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
40 DEPENDS:=+EUDEV_EXTRA_blkid:libblkid +EUDEV_EXTRA_kmod:libkmod +librt +libudev
45 define Package/eudev/description
46 udev allows Linux users to have a dynamic /dev directory and it
47 provides the ability to have persistent device names.
48 eudev is a fork of systemd-udev with the goal of obtaining better
49 compatibility with existing software such as OpenRC and Upstart, older
50 kernels, various toolchains and anything else required by users and
51 various distributions.
54 define Package/eudev/conffiles
58 define Package/eudev/config
59 source "$(SOURCE)/Config.in"
63 --prefix=/usr --exec-prefix= --sysconfdir=/etc \
64 --libexecdir=/lib/udev --sbindir=/sbin \
65 --disable-hwdb --disable-introspection --disable-manpages \
67 $(if $(CONFIG_EUDEV_EXTRA_blkid),--enable-blkid,--disable-blkid) \
68 $(if $(CONFIG_EUDEV_EXTRA_kmod),--enable-kmod,--disable-kmod)
71 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_ata_id) += ata_id
73 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_blkid) += 60-persistent-storage.rules
75 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_cdrom_id) += cdrom_id
76 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
78 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_collect) += collect
80 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_input_id) += 60-persistent-input.rules
82 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_mtd_probe) += mtd_probe
83 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_mtd_probe) += 75-probe_mtd.rules
85 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_scsi_id) += scsi_id
87 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_v4l_id) += v4l_id
88 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_v4l_id) += 60-persistent-v4l.rules
90 define Build/InstallDev
91 $(INSTALL_DIR) $(1)/usr/include
92 $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include
93 $(INSTALL_DIR) $(1)/usr/share/pkgconfig
94 $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc $(1)/usr/share/pkgconfig
95 $(INSTALL_DIR) $(1)/lib
96 $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
97 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
98 $(CP) $(PKG_INSTALL_DIR)/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig
101 define Package/libudev/install
102 $(INSTALL_DIR) $(1)/lib
103 $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib
106 define Package/eudev/install
107 $(INSTALL_DIR) $(1)/etc/udev/rules.d
108 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
110 $(INSTALL_DIR) $(1)/sbin
112 $(PKG_INSTALL_DIR)/usr/bin/udevadm \
113 $(PKG_INSTALL_DIR)/sbin/udevd \
116 $(INSTALL_DIR) $(1)/lib/udev/rules.d
118 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
119 $(eudev-extra-rules-y)) \
120 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
121 50-udev-default.rules \
125 60-persistent-alsa.rules \
126 60-persistent-storage-tape.rules \
130 75-net-description.rules \
131 78-sound-card.rules \
132 80-net-name-slot.rules) \
133 $(1)/lib/udev/rules.d
135 ifneq ($(eudev-extra-lib-bin-y),)
137 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
138 $(eudev-extra-lib-bin-y)) \
143 $(eval $(call BuildPackage,eudev))
144 $(eval $(call BuildPackage,libudev))