Makefile (4212B)
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 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=eudev 11 PKG_VERSION:=3.2 12 PKG_RELEASE:=1 13 14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 15 PKG_SOURCE_URL:=http://dev.gentoo.org/~blueness/eudev/ 16 PKG_MD5SUM:=7e42d9b9ed8162021665139520676367 17 PKG_LICENSE:=GPL-2.0 18 19 include $(INCLUDE_DIR)/package.mk 20 21 PKG_BUILD_DEPENDS:=gperf/host 22 PKG_FIXUP:=autoreconf 23 PKG_INSTALL=1 24 25 define Package/libudev 26 SECTION:=libs 27 CATEGORY:=Libraries 28 TITLE:=Dynamic device management subsystem 29 URL:=https://wiki.gentoo.org/wiki/Project:Eudev 30 MAINTAINER:=Daniel Golle <daniel@makrotopia.org> 31 endef 32 33 define Package/eudev 34 SECTION:=base 35 CATEGORY:=Base system 36 TITLE:=Dynamic device management subsystem 37 URL:=https://wiki.gentoo.org/wiki/Project:Eudev 38 MAINTAINER:=Daniel Golle <daniel@makrotopia.org> 39 MENU:=1 40 DEPENDS:=+EUDEV_EXTRA_blkid:libblkid +EUDEV_EXTRA_kmod:libkmod +librt +libudev 41 PROVIDES:=udev 42 CONFLICTS:=udev 43 endef 44 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. 52 endef 53 54 define Package/eudev/conffiles 55 /etc/udev/udev.conf 56 endef 57 58 define Package/eudev/config 59 source "$(SOURCE)/Config.in" 60 endef 61 62 CONFIGURE_ARGS += \ 63 --prefix=/usr --exec-prefix= --sysconfdir=/etc \ 64 --libexecdir=/lib/udev --sbindir=/sbin \ 65 --disable-hwdb --disable-introspection --disable-manpages \ 66 --disable-selinux \ 67 $(if $(CONFIG_EUDEV_EXTRA_blkid),--enable-blkid,--disable-blkid) \ 68 $(if $(CONFIG_EUDEV_EXTRA_kmod),--enable-kmod,--disable-kmod) 69 70 71 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_ata_id) += ata_id 72 73 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_blkid) += 60-persistent-storage.rules 74 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 77 78 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_collect) += collect 79 80 eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_input_id) += 60-persistent-input.rules 81 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 84 85 eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_scsi_id) += scsi_id 86 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 89 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 99 endef 100 101 define Package/libudev/install 102 $(INSTALL_DIR) $(1)/lib 103 $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib 104 endef 105 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 109 110 $(INSTALL_DIR) $(1)/sbin 111 $(INSTALL_BIN) \ 112 $(PKG_INSTALL_DIR)/usr/bin/udevadm \ 113 $(PKG_INSTALL_DIR)/sbin/udevd \ 114 $(1)/sbin 115 116 $(INSTALL_DIR) $(1)/lib/udev/rules.d 117 $(INSTALL_DATA) \ 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 \ 122 60-block.rules \ 123 60-drm.rules \ 124 60-evdev.rules \ 125 60-persistent-alsa.rules \ 126 60-persistent-storage-tape.rules \ 127 60-serial.rules \ 128 64-btrfs.rules \ 129 70-mouse.rules \ 130 75-net-description.rules \ 131 78-sound-card.rules \ 132 80-net-name-slot.rules) \ 133 $(1)/lib/udev/rules.d 134 135 ifneq ($(eudev-extra-lib-bin-y),) 136 $(INSTALL_BIN) \ 137 $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \ 138 $(eudev-extra-lib-bin-y)) \ 139 $(1)/lib/udev/ 140 endif 141 endef 142 143 $(eval $(call BuildPackage,eudev)) 144 $(eval $(call BuildPackage,libudev))