X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/53ac8685594781d00b2058c69690c826bb54ee6d..8b93389dcabc49295c3022bc5b81629fafbfe572:/package/udev/Makefile diff --git a/package/udev/Makefile b/package/udev/Makefile index 5cc807c83..f14fb3b8a 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -1,59 +1,120 @@ -# $Id: Makefile 2567 2005-11-29 11:13:32Z nico $ +# +# Copyright (C) 2006-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk PKG_NAME:=udev -PKG_VERSION:=077 +PKG_VERSION:=142 PKG_RELEASE:=1 -PKG_MD5SUM:=61ec646daf7795e9777e8f33975408fe - -PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ - http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ - ftp://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \ - http://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \ - ftp://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ \ - http://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,UDEV,udev,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR) \ - CROSS="$(TARGET_CROSS)" \ - STRIP="/bin/true" \ - OPTFLAGS="$(TARGET_CFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install - touch $@ - -$(IPKG_UDEV): - install -d -m0775 $(IDIR_UDEV)/etc/udev - cp -fpR $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/ - install -d -m0775 $(IDIR_UDEV)/lib/udev - install -d -m0775 $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udev $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevcontrol $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevd $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevsend $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevstart $(IDIR_UDEV)/sbin/ - install -d -m0775 $(IDIR_UDEV)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(IDIR_UDEV)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/udevtest $(IDIR_UDEV)/usr/bin/ - install -d -m0775 $(IDIR_UDEV)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(IDIR_UDEV)/usr/sbin/ - $(RSTRIP) $(IDIR_UDEV) - $(IPKG_BUILD) $(IDIR_UDEV) $(PACKAGE_DIR) - -mostlyclean: - -$(MAKE) -C $(PKG_BUILD_DIR) clean - rm -f $(PKG_BUILD_DIR)/.built +PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/ +PKG_MD5SUM:=3edc4cf383dccb06d866c5156d59ddd5 + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL=1 + +define Package/udev + SECTION:=base + CATEGORY:=Base system + DEPENDS:=@LINUX_2_6 + TITLE:=Dynamic device management subsystem + URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html + MAINTAINER:=Geoff Levand +endef + +define Package/udev/description + udev allows Linux users to have a dynamic /dev directory and it + provides the ability to have persistent device names. +endef + +define Package/udev/config + source "$(SOURCE)/udev-config.in" +endef + +udev-args-$(CONFIG_UDEV_DISABLE_LOGGING) += --disable-logging +udev-args-$(CONFIG_UDEV_ENABLE_DEBUG) += --enable-debug + +CONFIGURE_ARGS += --prefix=/usr --exec-prefix= --sysconfdir=/etc \ + --sbindir=/sbin $(udev-args-y) + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_ata_id) += ata_id + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_cdrom_id) += cdrom_id +udev-extra-rules-$(CONFIG_UDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_collect) += collect + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_edd_id) += edd_id +udev-extra-rules-$(CONFIG_UDEV_EXTRA_edd_id) += 61-persistent-storage-edd.rules + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_firmware) += firmware.sh +udev-extra-rules-$(CONFIG_UDEV_EXTRA_firmware) += 50-firmware.rules + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_floppy) += create_floppy_devices + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_fstab_import) += fstab_import +udev-extra-rules-$(CONFIG_UDEV_EXTRA_fstab_import) += 79-fstab_import.rules + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_path_id) += path_id + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_rule_generator) += \ + write_cd_rules write_net_rules +udev-extra-lib-data-$(CONFIG_UDEV_EXTRA_rule_generator) += \ + rule_generator.functions +udev-extra-rules-$(CONFIG_UDEV_EXTRA_rule_generator) += \ + 75-cd-aliases-generator.rules 75-persistent-net-generator.rules + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_scsi_id) += scsi_id + +udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_usb_id) += usb_id + +define Package/udev/install + $(INSTALL_DIR) $(1)/etc/udev/rules.d + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev + + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/sbin/udevadm \ + $(PKG_INSTALL_DIR)/sbin/udevd \ + $(1)/sbin + + $(INSTALL_DIR) $(1)/lib/udev/rules.d + $(INSTALL_DATA) \ + $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \ + $(udev-extra-rules-y)) \ + $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \ + 50-udev-default.rules \ + 60-persistent-input.rules \ + 60-persistent-serial.rules \ + 60-persistent-storage.rules \ + 80-drivers.rules \ + 95-udev-late.rules) \ + $(1)/lib/udev/rules.d + + $(INSTALL_DIR) $(1)/lib + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/lib/libudev.so.* \ + $(1)/lib + + $(INSTALL_DIR) $(1)/lib/udev +ifneq ($(udev-extra-lib-bin-y),) + $(INSTALL_BIN) \ + $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \ + $(udev-extra-lib-bin-y)) \ + $(1)/lib/udev/ +endif +ifneq ($(udev-extra-lib-data-y),) + $(INSTALL_DATA) \ + $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \ + $(udev-extra-lib-data-y)) \ + $(1)/lib/udev/ +endif +endef + +$(eval $(call BuildPackage,udev))